[gnome-software/gnome-3-26] shell-extensions: Return an error from _setup() when GNOME Shell is not running



commit 622a7776b42a7f0d468027ceba900c7f6b58c235
Author: Richard Hughes <richard hughsie com>
Date:   Wed Dec 6 09:46:33 2017 +0000

    shell-extensions: Return an error from _setup() when GNOME Shell is not running

 .../shell-extensions/gs-plugin-shell-extensions.c  |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/plugins/shell-extensions/gs-plugin-shell-extensions.c 
b/plugins/shell-extensions/gs-plugin-shell-extensions.c
index 7c20235..0ed2324 100644
--- a/plugins/shell-extensions/gs-plugin-shell-extensions.c
+++ b/plugins/shell-extensions/gs-plugin-shell-extensions.c
@@ -284,7 +284,10 @@ gs_plugin_setup (GsPlugin *plugin, GCancellable *cancellable, GError **error)
        /* not running under Shell */
        name_owner = g_dbus_proxy_get_name_owner (priv->proxy);
        if (name_owner == NULL) {
-               g_clear_object (&priv->proxy);
+               g_set_error_literal (error,
+                                    GS_PLUGIN_ERROR,
+                                    GS_PLUGIN_ERROR_NOT_SUPPORTED,
+                                    "gnome-shell is not running");
                return FALSE;
        }
 


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