diff options
author | Руслан Ижбулатов <lrn1986@gmail.com> | 2016-05-09 12:48:07 +0000 |
---|---|---|
committer | Руслан Ижбулатов <lrn1986@gmail.com> | 2016-05-26 11:44:13 +0000 |
commit | fcd3321fa7b675e940760c9b08ca9ade9e1e8b1d (patch) | |
tree | 34865d2952b3b1fb0b76398216f5ebcda4145785 /gtk/gtkfilechooserwidget.c | |
parent | 0fa3c3b73175a5f9de7a35c73f11bb7ea57b8e8a (diff) | |
download | gtk+-fcd3321fa7b675e940760c9b08ca9ade9e1e8b1d.tar.gz |
GtkFileChooser: don't override already opened folder
When filechooer is re-used (instead of being created and destroyed
every time it's needed), it might happen that the directory the
application wishes to initially show is the same directory that
was shown last time the filechooser was used. In that case, make sure
filechooser knows that it does not need to do its default "select $pwd
or $home" routine.
https://bugzilla.gnome.org/show_bug.cgi?id=766122
Diffstat (limited to 'gtk/gtkfilechooserwidget.c')
-rw-r--r-- | gtk/gtkfilechooserwidget.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gtk/gtkfilechooserwidget.c b/gtk/gtkfilechooserwidget.c index fcd928662a..79a099eb35 100644 --- a/gtk/gtkfilechooserwidget.c +++ b/gtk/gtkfilechooserwidget.c @@ -5667,6 +5667,9 @@ gtk_file_chooser_widget_select_file (GtkFileChooser *chooser, files.data = (gpointer) file; files.next = NULL; + /* Prevent the file chooser from loading a different folder when it is mapped */ + priv->reload_state = RELOAD_HAS_FOLDER; + result = show_and_select_files (impl, &files); g_object_unref (parent_file); return result; |