[gtk+/gtk-3-18] file chooser: Avoid nonworking search+save combinations



commit 8605fcf2d93f0c2e91a5163035866d66c2ecc3d0
Author: Matthias Clasen <mclasen redhat com>
Date:   Fri Feb 12 22:05:40 2016 -0500

    file chooser: Avoid nonworking search+save combinations
    
    With the location entry up in the header bar in save mode, we can
    end up with the search model being in use when the user types in
    the location entry. In this case, we don't make the Save button
    sensitive as we should.
    
    Having two entries in the dialog is somewhat confusing anyway,
    so just stop the search when the user starts typing in the location
    entry.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=761757

 gtk/gtkfilechooserwidget.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkfilechooserwidget.c b/gtk/gtkfilechooserwidget.c
index 78343dd..d245714 100644
--- a/gtk/gtkfilechooserwidget.c
+++ b/gtk/gtkfilechooserwidget.c
@@ -2558,6 +2558,9 @@ static void
 location_entry_changed_cb (GtkEditable          *editable,
                            GtkFileChooserWidget *impl)
 {
+  if (impl->priv->operation_mode == OPERATION_MODE_SEARCH)
+    operation_mode_set (impl, OPERATION_MODE_BROWSE);
+
   if (impl->priv->action != GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER)
     reset_location_timeout (impl);
 }


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