search: Better debug output when ignoring search providers

So that running with debug is enough to know why a search provider was
ignored.
This commit is contained in:
Bastien Nocera 2016-11-24 16:56:20 +01:00
parent 408bd638de
commit 8a4cf8345a

View file

@ -519,7 +519,10 @@ search_panel_add_one_provider (CcSearchPanel *self,
}
if (!g_key_file_has_group (keyfile, SHELL_PROVIDER_GROUP))
{
g_debug ("Shell search provider group missing from '%s', ignoring", path);
goto out;
}
desktop_id = g_key_file_get_string (keyfile, SHELL_PROVIDER_GROUP,
"DesktopId", &error);
@ -532,11 +535,16 @@ search_panel_add_one_provider (CcSearchPanel *self,
}
app_info = G_APP_INFO (g_desktop_app_info_new (desktop_id));
g_free (desktop_id);
if (app_info == NULL)
{
g_debug ("Could not find application with desktop ID '%s' referenced in '%s', ignoring",
desktop_id, path);
g_free (desktop_id);
goto out;
}
g_free (desktop_id);
default_disabled = g_key_file_get_boolean (keyfile, SHELL_PROVIDER_GROUP,
"DefaultDisabled", NULL);
search_panel_add_one_app_info (self, app_info, !default_disabled);