[gtk+] FileChooser: Initialize search engines on demand



commit faf0beede02932923290ac3d69eb5102f2ca72c2
Author: Tomas Bzatek <tbzatek redhat com>
Date:   Wed Apr 7 15:07:05 2010 +0200

    FileChooser: Initialize search engines on demand
    
    We postpone initialization of the search engines until
    it's really needed. See bug 614971 for reference.

 gtk/gtkfilechooserdefault.c |   14 +-------------
 1 files changed, 1 insertions(+), 13 deletions(-)
---
diff --git a/gtk/gtkfilechooserdefault.c b/gtk/gtkfilechooserdefault.c
index 1d60429..429e8c4 100644
--- a/gtk/gtkfilechooserdefault.c
+++ b/gtk/gtkfilechooserdefault.c
@@ -228,15 +228,6 @@ enum {
   GTK_TREE_MODEL_ROW,
 };
 
-static gboolean
-search_is_possible (GtkFileChooserDefault *impl)
-{
-  if (impl->search_engine == NULL)
-    impl->search_engine = _gtk_search_engine_new ();
-  
-  return impl->search_engine != NULL;
-}
-
 /* Interesting places in the shortcuts bar */
 typedef enum {
   SHORTCUTS_SEARCH,
@@ -2266,10 +2257,7 @@ shortcuts_model_create (GtkFileChooserDefault *impl)
 					      G_TYPE_BOOLEAN,   /* pixbuf cell visibility */
 					      G_TYPE_POINTER);  /* GCancellable */
 
-  if (search_is_possible (impl))
-    {
-      shortcuts_append_search (impl);
-    }
+  shortcuts_append_search (impl);
 
   if (impl->recent_manager)
     {



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