file chooser: Avoid doing excess work
Whenever we change directories, we unset the model, and then we set a new model. This causes several emissions of GtkTreeSelection::changed, for each of which we do a bunch of work to update the path bar, the location entry, etc. We can savely ignore some of these signals, and do less work.
This commit is contained in:
@ -7584,6 +7584,9 @@ list_selection_changed (GtkTreeSelection *selection,
|
|||||||
{
|
{
|
||||||
GtkFileChooserWidgetPrivate *priv = impl->priv;
|
GtkFileChooserWidgetPrivate *priv = impl->priv;
|
||||||
|
|
||||||
|
if (gtk_tree_view_get_model (GTK_TREE_VIEW (priv->browse_files_tree_view)) == NULL)
|
||||||
|
return;
|
||||||
|
|
||||||
/* See if we are in the new folder editable row for Save mode */
|
/* See if we are in the new folder editable row for Save mode */
|
||||||
if (priv->operation_mode == OPERATION_MODE_BROWSE &&
|
if (priv->operation_mode == OPERATION_MODE_BROWSE &&
|
||||||
priv->action == GTK_FILE_CHOOSER_ACTION_SAVE)
|
priv->action == GTK_FILE_CHOOSER_ACTION_SAVE)
|
||||||
|
|||||||
Reference in New Issue
Block a user