[gimp] app: don't show an uninstall button for system extensions.
- From: Jehan <jehanp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: don't show an uninstall button for system extensions.
- Date: Fri, 9 Oct 2020 13:32:40 +0000 (UTC)
commit 915657153fabb0ea1a9a35b4f8639ecf97e88089
Author: Jehan <jehan girinstud io>
Date: Thu Oct 8 17:14:04 2020 +0200
app: don't show an uninstall button for system extensions.
Unlike user extensions, system ones can only be deactivated, not
uninstalled.
app/widgets/gimpextensionlist.c | 40 ++++++++++++++++++++++------------------
1 file changed, 22 insertions(+), 18 deletions(-)
---
diff --git a/app/widgets/gimpextensionlist.c b/app/widgets/gimpextensionlist.c
index c67f7d9d8f..5df96fbf42 100644
--- a/app/widgets/gimpextensionlist.c
+++ b/app/widgets/gimpextensionlist.c
@@ -212,7 +212,6 @@ gimp_extension_list_ext_installed (GimpExtensionManager *manager,
GtkWidget *outframe;
GtkWidget *grid;
GtkWidget *onoff;
- GtkWidget *delbutton;
GtkWidget *image;
if (list->p->contents == GIMP_EXT_LIST_SEARCH ||
@@ -295,23 +294,28 @@ gimp_extension_list_ext_installed (GimpExtensionManager *manager,
}
/* Delete button. */
- delbutton = gtk_button_new ();
- g_object_set_data (G_OBJECT (delbutton), "extension", extension);
- g_signal_connect (delbutton, "clicked",
- G_CALLBACK (gimp_extension_list_delete_clicked),
- list);
- gtk_button_set_relief (GTK_BUTTON (delbutton), GTK_RELIEF_NONE);
- image = gtk_image_new_from_icon_name (GIMP_ICON_EDIT_DELETE,
- GTK_ICON_SIZE_MENU);
- gtk_image_set_pixel_size (GTK_IMAGE (image), 12);
- gtk_widget_set_vexpand (delbutton, FALSE);
- gtk_widget_set_hexpand (delbutton, FALSE);
- gtk_widget_set_halign (delbutton, GTK_ALIGN_END);
- gtk_widget_set_valign (delbutton, GTK_ALIGN_START);
- gtk_container_add (GTK_CONTAINER (delbutton), image);
- gtk_widget_show (image);
- gtk_grid_attach (GTK_GRID (grid), delbutton, 2, 0, 1, 1);
- gtk_widget_show (delbutton);
+ if (! is_system_ext)
+ {
+ GtkWidget *delbutton;
+
+ delbutton = gtk_button_new ();
+ g_object_set_data (G_OBJECT (delbutton), "extension", extension);
+ g_signal_connect (delbutton, "clicked",
+ G_CALLBACK (gimp_extension_list_delete_clicked),
+ list);
+ gtk_button_set_relief (GTK_BUTTON (delbutton), GTK_RELIEF_NONE);
+ image = gtk_image_new_from_icon_name (GIMP_ICON_EDIT_DELETE,
+ GTK_ICON_SIZE_MENU);
+ gtk_image_set_pixel_size (GTK_IMAGE (image), 12);
+ gtk_widget_set_vexpand (delbutton, FALSE);
+ gtk_widget_set_hexpand (delbutton, FALSE);
+ gtk_widget_set_halign (delbutton, GTK_ALIGN_END);
+ gtk_widget_set_valign (delbutton, GTK_ALIGN_START);
+ gtk_container_add (GTK_CONTAINER (delbutton), image);
+ gtk_widget_show (image);
+ gtk_grid_attach (GTK_GRID (grid), delbutton, 2, 0, 1, 1);
+ gtk_widget_show (delbutton);
+ }
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]