[gtk+/gtk-2-24: 7/15] Only unset the entry's contents if the entry exists
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-2-24: 7/15] Only unset the entry's contents if the entry exists
- Date: Thu, 1 Sep 2011 16:27:39 +0000 (UTC)
commit dfe7018284d76a59b7f3f7515cf7d1e3de9927c4
Author: Federico Mena Quintero <federico gnome org>
Date: Wed Jul 27 17:30:05 2011 -0500
Only unset the entry's contents if the entry exists
Signed-off-by: Federico Mena Quintero <federico gnome org>
gtk/gtkfilechooserdefault.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkfilechooserdefault.c b/gtk/gtkfilechooserdefault.c
index 6adff3d..aa3ecb6 100644
--- a/gtk/gtkfilechooserdefault.c
+++ b/gtk/gtkfilechooserdefault.c
@@ -9793,7 +9793,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), "");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]