[gnome-software/wip/hughsie/no-more-shell-extensions] Remove support for Shell extensions
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software/wip/hughsie/no-more-shell-extensions] Remove support for Shell extensions
- Date: Thu, 30 Jan 2020 15:54:57 +0000 (UTC)
commit 64951f5d8412e9ffb2eb079420c4d43dd624ad7e
Author: Richard Hughes <richard hughsie com>
Date: Thu Jan 30 14:45:31 2020 +0000
Remove support for Shell extensions
These are now handled in GNOME Shell itself
https://gitlab.gnome.org/GNOME/gnome-shell/issues/1968
contrib/gnome-software.spec.in | 1 -
meson_options.txt | 1 -
plugins/core/gs-appstream.c | 14 +-
plugins/core/gs-desktop-common.c | 3 -
plugins/meson.build | 3 -
plugins/packagekit/gs-plugin-packagekit.c | 3 -
plugins/shell-extensions/gs-appstream.c | 1 -
plugins/shell-extensions/gs-appstream.h | 1 -
.../shell-extensions/gs-plugin-shell-extensions.c | 1159 --------------------
plugins/shell-extensions/gs-self-test.c | 156 ---
plugins/shell-extensions/meson.build | 47 -
src/gs-category-page.c | 25 -
src/gs-category-page.ui | 45 -
src/gs-details-page.c | 14 +-
src/gs-repo-row.c | 3 +-
src/gs-repos-dialog.c | 3 +-
src/gs-summary-tile.c | 15 +-
17 files changed, 16 insertions(+), 1478 deletions(-)
---
diff --git a/contrib/gnome-software.spec.in b/contrib/gnome-software.spec.in
index 7f415f51..587a72e6 100644
--- a/contrib/gnome-software.spec.in
+++ b/contrib/gnome-software.spec.in
@@ -183,7 +183,6 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop
%{_libdir}/gs-plugins-%{gs_plugin_version}/libgs_plugin_provenance.so
%{_libdir}/gs-plugins-%{gs_plugin_version}/libgs_plugin_repos.so
%{_libdir}/gs-plugins-%{gs_plugin_version}/libgs_plugin_rewrite-resource.so
-%{_libdir}/gs-plugins-%{gs_plugin_version}/libgs_plugin_shell-extensions.so
%{_libdir}/gs-plugins-%{gs_plugin_version}/libgs_plugin_systemd-updates.so
%{_sysconfdir}/xdg/autostart/gnome-software-service.desktop
%{_datadir}/app-info/xmls/org.gnome.Software.Featured.xml
diff --git a/meson_options.txt b/meson_options.txt
index eba69ea2..f6068ba5 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -10,7 +10,6 @@ option('fwupd', type : 'boolean', value : true, description : 'enable fwupd supp
option('flatpak', type : 'boolean', value : true, description : 'enable Flatpak support')
option('malcontent', type : 'boolean', value : true, description : 'enable parental controls support using
libmalcontent')
option('rpm_ostree', type : 'boolean', value : false, description : 'enable rpm-ostree support')
-option('shell_extensions', type : 'boolean', value : true, description : 'enable shell extensions support')
option('odrs', type : 'boolean', value : true, description : 'enable ODRS support')
option('gudev', type : 'boolean', value : true, description : 'enable GUdev support')
option('snap', type : 'boolean', value : false, description : 'enable Snap support')
diff --git a/plugins/core/gs-appstream.c b/plugins/core/gs-appstream.c
index 7b33a19f..a98696b6 100644
--- a/plugins/core/gs-appstream.c
+++ b/plugins/core/gs-appstream.c
@@ -30,6 +30,15 @@ gs_appstream_create_app (GsPlugin *plugin, XbSilo *silo, XbNode *component, GErr
if (gs_app_has_quirk (app_new, GS_APP_QUIRK_IS_WILDCARD))
return g_steal_pointer (&app_new);
+ /* no longer supported */
+ if (gs_app_get_kind (app_new) == AS_APP_KIND_SHELL_EXTENSION) {
+ g_set_error (error,
+ GS_PLUGIN_ERROR,
+ GS_PLUGIN_ERROR_NOT_SUPPORTED,
+ "shell extensions no longer supported");
+ return NULL;
+ }
+
/* look for existing object */
app = gs_plugin_cache_lookup (plugin, gs_app_get_unique_id (app_new));
if (app != NULL)
@@ -1536,11 +1545,6 @@ gs_appstream_component_add_extra_info (GsPlugin *plugin, XbBuilderNode *componen
gs_appstream_component_add_category (component, "Addon");
gs_appstream_component_add_category (component, "Font");
break;
- case AS_APP_KIND_SHELL_EXTENSION:
- gs_appstream_component_add_category (component, "Addon");
- gs_appstream_component_add_category (component, "ShellExtension");
- gs_appstream_component_add_icon (component, "application-x-addon-symbolic");
- break;
case AS_APP_KIND_DRIVER:
gs_appstream_component_add_category (component, "Addon");
gs_appstream_component_add_category (component, "Driver");
diff --git a/plugins/core/gs-desktop-common.c b/plugins/core/gs-desktop-common.c
index 17ed029d..33ae3fa2 100644
--- a/plugins/core/gs-desktop-common.c
+++ b/plugins/core/gs-desktop-common.c
@@ -203,9 +203,6 @@ static const GsDesktopMap map_addons[] = {
{ "language-packs", NC_("Menu of Add-ons", "Language Packs"),
{ "Addon::LanguagePack",
NULL} },
- { "shell-extensions", NC_("Menu of Add-ons", "Shell Extensions"),
- { "Addon::ShellExtension",
- NULL} },
{ "localization", NC_("Menu of Add-ons", "Localization"),
{ "Addon::Localization",
NULL} },
diff --git a/plugins/meson.build b/plugins/meson.build
index d30f14d4..d749b3df 100644
--- a/plugins/meson.build
+++ b/plugins/meson.build
@@ -39,9 +39,6 @@ subdir('repos')
if get_option('rpm_ostree')
subdir('rpm-ostree')
endif
-if get_option('shell_extensions')
- subdir('shell-extensions')
-endif
if get_option('snap')
subdir('snap')
endif
diff --git a/plugins/packagekit/gs-plugin-packagekit.c b/plugins/packagekit/gs-plugin-packagekit.c
index 2c4e1644..d0bdabae 100644
--- a/plugins/packagekit/gs-plugin-packagekit.c
+++ b/plugins/packagekit/gs-plugin-packagekit.c
@@ -688,8 +688,5 @@ gs_plugin_launch (GsPlugin *plugin,
if (g_strcmp0 (gs_app_get_management_plugin (app),
gs_plugin_get_name (plugin)) != 0)
return TRUE;
- /* these are handled by the shell extensions plugin */
- if (gs_app_get_kind (app) == AS_APP_KIND_SHELL_EXTENSION)
- return TRUE;
return gs_plugin_app_launch (plugin, app, error);
}
diff --git a/src/gs-category-page.c b/src/gs-category-page.c
index a786d48d..10467436 100644
--- a/src/gs-category-page.c
+++ b/src/gs-category-page.c
@@ -38,8 +38,6 @@ struct _GsCategoryPage
guint sort_name_handler_id;
SubcategorySortType sort_type;
- GtkWidget *infobar_category_shell_extensions;
- GtkWidget *button_category_shell_extensions;
GtkWidget *category_detail_box;
GtkWidget *scrolledwindow_category;
GtkWidget *subcats_filter_label;
@@ -323,12 +321,6 @@ gs_category_page_reload (GsPage *page)
gtk_widget_set_visible (self->subcats_sort_button, TRUE);
}
- /* show the shell extensions header */
- if (g_strcmp0 (gs_category_get_id (self->subcategory), "shell-extensions") == 0)
- gtk_widget_set_visible (self->infobar_category_shell_extensions, TRUE);
- else
- gtk_widget_set_visible (self->infobar_category_shell_extensions, FALSE);
-
if (self->sort_rating_handler_id > 0) {
g_signal_handler_disconnect (self->sort_rating_button,
self->sort_rating_handler_id);
@@ -532,18 +524,6 @@ gs_category_page_dispose (GObject *object)
G_OBJECT_CLASS (gs_category_page_parent_class)->dispose (object);
}
-static void
-button_shell_extensions_cb (GtkButton *button, GsCategoryPage *self)
-{
- gboolean ret;
- g_autoptr(GError) error = NULL;
- const gchar *argv[] = { "gnome-shell-extension-prefs", NULL };
- ret = g_spawn_async (NULL, (gchar **) argv, NULL, G_SPAWN_SEARCH_PATH,
- NULL, NULL, NULL, &error);
- if (!ret)
- g_warning ("failed to exec %s: %s", argv[0], error->message);
-}
-
static gboolean
gs_category_page_setup (GsPage *page,
GsShell *shell,
@@ -565,9 +545,6 @@ gs_category_page_setup (GsPage *page,
adj = gtk_scrolled_window_get_vadjustment (GTK_SCROLLED_WINDOW (self->scrolledwindow_category));
gtk_container_set_focus_vadjustment (GTK_CONTAINER (self->category_detail_box), adj);
-
- g_signal_connect (self->button_category_shell_extensions, "clicked",
- G_CALLBACK (button_shell_extensions_cb), self);
return TRUE;
}
@@ -586,8 +563,6 @@ gs_category_page_class_init (GsCategoryPageClass *klass)
gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/Software/gs-category-page.ui");
gtk_widget_class_bind_template_child (widget_class, GsCategoryPage, category_detail_box);
- gtk_widget_class_bind_template_child (widget_class, GsCategoryPage,
infobar_category_shell_extensions);
- gtk_widget_class_bind_template_child (widget_class, GsCategoryPage, button_category_shell_extensions);
gtk_widget_class_bind_template_child (widget_class, GsCategoryPage, scrolledwindow_category);
gtk_widget_class_bind_template_child (widget_class, GsCategoryPage, subcats_filter_label);
gtk_widget_class_bind_template_child (widget_class, GsCategoryPage, subcats_filter_button_label);
diff --git a/src/gs-category-page.ui b/src/gs-category-page.ui
index 2a3c789f..cbb82840 100644
--- a/src/gs-category-page.ui
+++ b/src/gs-category-page.ui
@@ -97,51 +97,6 @@
<property name="margin_end">24</property>
</object>
</child>
- <child>
- <object class="GtkInfoBar" id="infobar_category_shell_extensions">
- <property name="visible">False</property>
- <property name="app_paintable">True</property>
- <property name="hexpand">True</property>
- <property name="message_type">other</property>
- <property name="margin_start">24</property>
- <property name="margin_top">24</property>
- <property name="margin_end">24</property>
- <style>
- <class name="application-details-infobar"/>
- </style>
- <child internal-child="action_area">
- <object class="GtkButtonBox">
- <property name="spacing">6</property>
- <property name="layout_style">end</property>
- <child>
- <object class="GtkButton" id="button_category_shell_extensions">
- <property name="label" translatable="yes">Extension
Settings</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="hexpand">True</property>
- </object>
- </child>
- </object>
- </child>
- <child internal-child="content_area">
- <object class="GtkBox">
- <property name="halign">start</property>
- <property name="hexpand">True</property>
- <property name="spacing">16</property>
- <child>
- <object class="GtkLabel">
- <property name="visible">True</property>
- <property name="wrap">True</property>
- <property name="label" translatable="yes">Extensions are used at
your own risk. If you have any system problems, it is recommended to disable them.</property>
- <property name="hexpand">True</property>
- </object>
- </child>
- </object>
- </child>
- </object>
- </child>
-
<child>
<object class="GtkBox">
<property name="visible">True</property>
diff --git a/src/gs-details-page.c b/src/gs-details-page.c
index a47eb93f..4dd88a1e 100644
--- a/src/gs-details-page.c
+++ b/src/gs-details-page.c
@@ -923,17 +923,9 @@ gs_details_page_refresh_buttons (GsDetailsPage *self)
break;
}
- if (gs_app_get_kind (self->app) == AS_APP_KIND_SHELL_EXTENSION) {
- gtk_button_set_label (GTK_BUTTON (self->button_details_launch),
- /* TRANSLATORS: A label for a button to show the settings for
- the selected shell extension. */
- _("Extension Settings"));
- } else {
- gtk_button_set_label (GTK_BUTTON (self->button_details_launch),
- /* TRANSLATORS: A label for a button to execute the selected
- application. */
- _("_Launch"));
- }
+ gtk_button_set_label (GTK_BUTTON (self->button_details_launch),
+ /* TRANSLATORS: A label for a button to execute the selected application. */
+ _("_Launch"));
/* don't show the launch and shortcut buttons if the app doesn't have a desktop ID */
if (gs_app_get_id (self->app) == NULL) {
diff --git a/src/gs-repo-row.c b/src/gs-repo-row.c
index 7ce7e618..35b35045 100644
--- a/src/gs-repo-row.c
+++ b/src/gs-repo-row.c
@@ -68,8 +68,7 @@ repo_supports_removal (GsApp *repo)
/* can't remove a repo, only enable/disable existing ones */
if (g_strcmp0 (management_plugin, "fwupd") == 0 ||
g_strcmp0 (management_plugin, "packagekit") == 0 ||
- g_strcmp0 (management_plugin, "rpm-ostree") == 0 ||
- g_strcmp0 (management_plugin, "shell-extensions") == 0)
+ g_strcmp0 (management_plugin, "rpm-ostree") == 0)
return FALSE;
return TRUE;
diff --git a/src/gs-repos-dialog.c b/src/gs-repos-dialog.c
index 979548b8..748850c6 100644
--- a/src/gs-repos-dialog.c
+++ b/src/gs-repos-dialog.c
@@ -136,8 +136,7 @@ repo_supports_removal (GsApp *repo)
/* can't remove a repo, only enable/disable existing ones */
if (g_strcmp0 (management_plugin, "fwupd") == 0 ||
g_strcmp0 (management_plugin, "packagekit") == 0 ||
- g_strcmp0 (management_plugin, "rpm-ostree") == 0 ||
- g_strcmp0 (management_plugin, "shell-extensions") == 0)
+ g_strcmp0 (management_plugin, "rpm-ostree") == 0)
return FALSE;
return TRUE;
diff --git a/src/gs-summary-tile.c b/src/gs-summary-tile.c
index 90e810c9..446200de 100644
--- a/src/gs-summary-tile.c
+++ b/src/gs-summary-tile.c
@@ -41,7 +41,7 @@ gs_summary_tile_refresh (GsAppTile *self)
const GdkPixbuf *pixbuf;
gboolean installed;
g_autofree gchar *name = NULL;
- g_autofree gchar *summary = NULL;
+ const gchar *summary;
const gchar *css;
if (app == NULL)
@@ -53,18 +53,7 @@ gs_summary_tile_refresh (GsAppTile *self)
/* set name */
gtk_label_set_label (GTK_LABEL (tile->name), gs_app_get_name (app));
- /* some kinds have boring summaries */
- switch (gs_app_get_kind (app)) {
- case AS_APP_KIND_SHELL_EXTENSION:
- summary = g_strdup (gs_app_get_description (app));
- if (summary != NULL)
- g_strdelimit (summary, "\n\t", ' ');
- break;
- default:
- summary = g_strdup (gs_app_get_summary (app));
- break;
- }
-
+ summary = gs_app_get_summary (app);
gtk_label_set_label (GTK_LABEL (tile->summary), summary);
gtk_widget_set_visible (tile->summary, summary && summary[0]);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]