[gtk+/places-sidebar] Implement the Search keyboard shortcut



commit 9124766d7b981aa418e51537ef58ebdb4c21e6c0
Author: Federico Mena Quintero <federico gnome org>
Date:   Mon Dec 10 17:26:46 2012 -0600

    Implement the Search keyboard shortcut
    
    We still lack a button to activate Search, like in Nautilus, but that will come later.
    
    And with this, the last REMOVE_FOR_PLACES_SIDEBAR is gone!
    
    Signed-off-by: Federico Mena Quintero <federico gnome org>

 gtk/gtkfilechooserdefault.c |   19 ++++++-------------
 1 files changed, 6 insertions(+), 13 deletions(-)
---
diff --git a/gtk/gtkfilechooserdefault.c b/gtk/gtkfilechooserdefault.c
index e677f84..4c4e54f 100644
--- a/gtk/gtkfilechooserdefault.c
+++ b/gtk/gtkfilechooserdefault.c
@@ -19,8 +19,6 @@
 
 /* TODO:
  *
- * * Fix instances of "#if REMOVE_FOR_PLACES_SIDEBAR"
- *
  * * Fix FIXME-places-sidebar
  */
 
@@ -7493,18 +7491,13 @@ desktop_folder_handler (GtkFileChooserDefault *impl)
 static void
 search_shortcut_handler (GtkFileChooserDefault *impl)
 {
-  if (impl->has_search)
-    {
-#if REMOVE_FOR_PLACES_SIDEBAR
-      switch_to_shortcut (impl, shortcuts_get_index (impl, SHORTCUTS_SEARCH));
-#endif
+  operation_mode_set (impl, OPERATION_MODE_SEARCH);
 
-      /* we want the entry widget to grab the focus the first
-       * time, not the browse_files_tree_view widget.
-       */
-      if (impl->search_entry)
-        gtk_widget_grab_focus (impl->search_entry);
-    }
+  /* we want the entry widget to grab the focus the first
+   * time, not the browse_files_tree_view widget.
+   */
+  if (impl->search_entry)
+    gtk_widget_grab_focus (impl->search_entry);
 }
 
 /* Handler for the "recent-shortcut" keybinding signal */



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