Commit faf0beed authored by Tomas Bzatek's avatar Tomas Bzatek
Browse files

FileChooser: Initialize search engines on demand

We postpone initialization of the search engines until
it's really needed. See bug 614971 for reference.
parent a812fcb3
......@@ -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)
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment