FileChooser: Initialize search engines on demand

We postpone initialization of the search engines until
it's really needed. See bug 614971 for reference.
This commit is contained in:
Tomas Bzatek 2010-04-07 15:07:05 +02:00
parent a812fcb305
commit faf0beede0

View File

@ -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)
{