Skip to content
This repository has been archived by the owner on Nov 17, 2020. It is now read-only.

Commit

Permalink
Only unset the entry's contents if the entry exists
Browse files Browse the repository at this point in the history
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
  • Loading branch information
federicomenaquintero committed Jul 27, 2011
1 parent 6c31de6 commit 9ed65c5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion gtk/gtkfilechooserdefault.c
Expand Up @@ -9825,7 +9825,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), "");
Expand Down

0 comments on commit 9ed65c5

Please sign in to comment.