forked from AuroraMiddleware/gtk
filechooserwidget: Remove always-false error case
_gtk_search_engine_new never returns NULL, it always returns a valid GObject with at least the simple search engine initialized.
This commit is contained in:
parent
03bfdce406
commit
a50dc94381
@ -7175,19 +7175,6 @@ search_engine_finished_cb (GtkSearchEngine *engine,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Displays a generic error when we cannot create a GtkSearchEngine.
|
|
||||||
* It would be better if _gtk_search_engine_new() gave us a GError
|
|
||||||
* with a better message, but it doesn’t do that right now.
|
|
||||||
*/
|
|
||||||
static void
|
|
||||||
search_error_could_not_create_client (GtkFileChooserWidget *impl)
|
|
||||||
{
|
|
||||||
error_message (impl,
|
|
||||||
_("Could not start the search process"),
|
|
||||||
_("The program was not able to create a connection to the indexer "
|
|
||||||
"daemon. Please make sure it is running."));
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
search_engine_error_cb (GtkSearchEngine *engine,
|
search_engine_error_cb (GtkSearchEngine *engine,
|
||||||
const gchar *message,
|
const gchar *message,
|
||||||
@ -7314,14 +7301,6 @@ search_start_query (GtkFileChooserWidget *impl,
|
|||||||
if (priv->search_engine == NULL)
|
if (priv->search_engine == NULL)
|
||||||
priv->search_engine = _gtk_search_engine_new ();
|
priv->search_engine = _gtk_search_engine_new ();
|
||||||
|
|
||||||
if (!priv->search_engine)
|
|
||||||
{
|
|
||||||
set_busy_cursor (impl, FALSE);
|
|
||||||
gtk_widget_hide (priv->search_spinner);
|
|
||||||
search_error_could_not_create_client (impl); /* lame; we don't get an error code or anything */
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!priv->search_query)
|
if (!priv->search_query)
|
||||||
{
|
{
|
||||||
priv->search_query = gtk_query_new ();
|
priv->search_query = gtk_query_new ();
|
||||||
|
Loading…
Reference in New Issue
Block a user