diff options
author | Federico Mena Quintero <federico@gnome.org> | 2011-07-27 17:30:05 -0500 |
---|---|---|
committer | Federico Mena Quintero <federico@gnome.org> | 2011-07-27 18:46:27 -0500 |
commit | a4927d05d822fd6247879a1dadc609cf039f7c82 (patch) | |
tree | de8d79876e04eb2f2855487ad893dbd871c6b9e5 | |
parent | 14b9b2f3e0c3f6987bb0c2f72733c03cafea3dce (diff) | |
download | gtk+-a4927d05d822fd6247879a1dadc609cf039f7c82.tar.gz |
Only unset the entry's contents if the entry exists
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
-rw-r--r-- | gtk/gtkfilechooserdefault.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gtk/gtkfilechooserdefault.c b/gtk/gtkfilechooserdefault.c index 754115801a..902e2443f7 100644 --- a/gtk/gtkfilechooserdefault.c +++ b/gtk/gtkfilechooserdefault.c @@ -9815,7 +9815,10 @@ shortcuts_activate_iter (GtkFileChooserDefault *impl, gpointer col_data; ShortcutType shortcut_type; - if (impl->location_mode == LOCATION_MODE_FILENAME_ENTRY + /* In the Save modes, we want to preserve what the uesr typed in the filename + * entry, so that he may choose another folder without erasing his typed name. + */ + if (impl->location_entry && !(impl->action == GTK_FILE_CHOOSER_ACTION_SAVE || impl->action == GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER)) _gtk_file_chooser_entry_set_file_part (GTK_FILE_CHOOSER_ENTRY (impl->location_entry), ""); |