[gtk+] file chooser: Don't react to entry changes in select-folder mode



commit c99935a54076ab4fcc2349530f21b6315db9f87e
Author: Matthias Clasen <mclasen redhat com>
Date:   Fri Mar 21 22:06:24 2014 -0400

    file chooser: Don't react to entry changes in select-folder mode
    
    In select-folder mode, we are putting the directory name into the
    entry ourselves. Then the entry appends a /. If we react to this
    'spontaneous' change of the entry by clearing the list selection,
    this will in turn make us clear the entry. We don't want that.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=726855

 gtk/gtkfilechooserwidget.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkfilechooserwidget.c b/gtk/gtkfilechooserwidget.c
index 1146278..173f7f8 100644
--- a/gtk/gtkfilechooserwidget.c
+++ b/gtk/gtkfilechooserwidget.c
@@ -1920,10 +1920,11 @@ reset_location_timeout (GtkFileChooserWidget *impl)
 }
 
 static void
-location_entry_changed_cb (GtkEditable *editable,
+location_entry_changed_cb (GtkEditable          *editable,
                            GtkFileChooserWidget *impl)
 {
-  reset_location_timeout (impl);
+  if (impl->priv->action != GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER)
+    reset_location_timeout (impl);
 }
 
 static void


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]