Commit 511b4ab3 authored by Iain Lane's avatar Iain Lane

shell-extensions: Properly disable when not running Shell

Don't try to activate org.gnome.Shell. If we're not running Shell, it's
not going to be activatable, and we're showing an in-app error to tell
the user about this.

Instead we should not try to activate it, but just disable the
extensions plugin.
parent a8fdcb44
......@@ -268,7 +268,7 @@ gs_plugin_setup (GsPlugin *plugin, GCancellable *cancellable, GError **error)
if (priv->proxy != NULL)
return TRUE;
priv->proxy = g_dbus_proxy_new_for_bus_sync (G_BUS_TYPE_SESSION,
......@@ -279,6 +279,13 @@ gs_plugin_setup (GsPlugin *plugin, GCancellable *cancellable, GError **error)
gs_utils_error_convert_gio (error);
return FALSE;
/* not running under Shell */
if (g_dbus_proxy_get_name_owner (priv->proxy) == NULL) {
g_clear_object (&priv->proxy);
return FALSE;
g_signal_connect (priv->proxy, "g-signal",
G_CALLBACK (gs_plugin_shell_extensions_changed_cb), plugin);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment