[gnome-control-center] search: Better debug output when ignoring search providers



commit 8a4cf8345a7eaed9da9fa3634d557549f6cffdf0
Author: Bastien Nocera <hadess hadess net>
Date:   Thu Nov 24 16:56:20 2016 +0100

    search: Better debug output when ignoring search providers
    
    So that running with debug is enough to know why a search provider was
    ignored.

 panels/search/cc-search-panel.c |   14 +++++++++++---
 1 files changed, 11 insertions(+), 3 deletions(-)
---
diff --git a/panels/search/cc-search-panel.c b/panels/search/cc-search-panel.c
index d8ebeb2..e619a08 100644
--- a/panels/search/cc-search-panel.c
+++ b/panels/search/cc-search-panel.c
@@ -519,7 +519,10 @@ search_panel_add_one_provider (CcSearchPanel *self,
     }
 
   if (!g_key_file_has_group (keyfile, SHELL_PROVIDER_GROUP))
-    goto out;
+    {
+      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)
-    goto out;
+    {
+      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);


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