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



commit ee2ba4d8d2b05d8c05fd8c47239a655d6a48630f
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 to reduce confusion
    
    https://gitlab.gnome.org/GNOME/gnome-photos/issues/120

 src/photos-tracker-controller.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
---
diff --git a/src/photos-tracker-controller.c b/src/photos-tracker-controller.c
index b0476e7f..ba07bca3 100644
--- a/src/photos-tracker-controller.c
+++ b/src/photos-tracker-controller.c
@@ -165,10 +165,17 @@ 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;
+  else if (g_error_matches (error, G_DBUS_ERROR, G_DBUS_ERROR_UNKNOWN_INTERFACE) ||
+           g_error_matches (error, G_DBUS_ERROR, G_DBUS_ERROR_UNKNOWN_METHOD) ||
+           g_error_matches (error, G_DBUS_ERROR, G_DBUS_ERROR_UNKNOWN_OBJECT) ||
+           g_error_matches (error, G_DBUS_ERROR, G_DBUS_ERROR_SERVICE_UNKNOWN))
+    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]