gtk+ r20274 - branches/gtk-2-12/gtk



Author: matthiasc
Date: Mon Jun  2 21:18:12 2008
New Revision: 20274
URL: http://svn.gnome.org/viewvc/gtk+?rev=20274&view=rev

Log:
        * gtk/gtkfilechooserdefault.c: (location_toggle_popup_handler): Don't
        try to toggle the visibility of the location entry field in search and
        recent mode (#526422).



Modified:
   branches/gtk-2-12/gtk/gtkfilechooserdefault.c

Modified: branches/gtk-2-12/gtk/gtkfilechooserdefault.c
==============================================================================
--- branches/gtk-2-12/gtk/gtkfilechooserdefault.c	(original)
+++ branches/gtk-2-12/gtk/gtkfilechooserdefault.c	Mon Jun  2 21:18:12 2008
@@ -5148,6 +5148,14 @@
 static void
 location_toggle_popup_handler (GtkFileChooserDefault *impl)
 {
+  /* when in search or recent files mode, we are not showing the
+   * location_entry_box container, so there's no point in switching
+   * to it.
+   */
+  if (impl->operation_mode == OPERATION_MODE_SEARCH ||
+      impl->operation_mode == OPERATION_MODE_RECENT)
+    return;
+
   /* If the file entry is not visible, show it.
    * If it is visible, turn it off only if it is focused.  Otherwise, switch to the entry.
    */
@@ -10382,7 +10390,7 @@
 
   data->impl->shortcuts_activate_iter_handle = NULL;
 
-  if (cancelled)
+  if (cancelled || g_error_matches (error, G_FILE_ERROR, G_FILE_ERROR_INTR))
     goto out;
 
   if (!error && gtk_file_info_get_is_folder (info))



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