[gnome-photos/uajain/tracker-not-found-error: 7/7] tracker-controller: Be direct when Tracker can't be found



commit a0f7cb422eb5313b2a5e82bd0d05c6b94ca35dc0
Author: Umang Jain <umang endlessm com>
Date:   Thu Dec 6 00:43:54 2018 +0530

    tracker-controller: Be direct when Tracker can't be found
    
    ... so that the problem is more obvious to non-technical end-users.
    
    https://gitlab.gnome.org/GNOME/gnome-photos/issues/120

 src/photos-tracker-controller.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
---
diff --git a/src/photos-tracker-controller.c b/src/photos-tracker-controller.c
index b0476e7f..adf89e42 100644
--- a/src/photos-tracker-controller.c
+++ b/src/photos-tracker-controller.c
@@ -165,11 +165,16 @@ photos_tracker_controller_item_added_removed (PhotosTrackerController *self)
 static void
 photos_tracker_controller_query_error (PhotosTrackerController *self, GError *error)
 {
-  const gchar *primary = _("Unable to fetch the list of photos");
+  const gchar *primary;
 
   if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED))
     return;
 
+  if (g_error_matches (error, TRACKER_SPARQL_ERROR, TRACKER_SPARQL_ERROR_INTERNAL))
+    primary = _("Unable to find Tracker on your operating system");
+  else
+    primary = _("Unable to fetch the list of photos");
+
   g_signal_emit (self, signals[QUERY_ERROR], 0, primary, error->message);
 }
 


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