Show protocol and loader plugins in the plugins list release-2.x.y

Wed, 04 Jun 2025 23:03:56 -0500

author
Gary Kramlich <grim@reaperworld.com>
date
Wed, 04 Jun 2025 23:03:56 -0500
branch
release-2.x.y
changeset 43262
ac6457253335
parent 43261
ae888a2c2f89
child 43263
b9cf92c8b16b

Show protocol and loader plugins in the plugins list

This displays the plugins but disables the ability to unload them. This should
make supporting users much easier and they should be able to help themselves a
bit now too.

Testing Done:
Loaded it up and verified that that enabled toggle buttons were in active and that I couldn't toggle them for protocols and loaders but that they did work for normal plugins.

Bugs closed: PIDGIN-18097

Reviewed at https://reviews.imfreedom.org/r/4018/

pidgin/gtkplugin.c file | annotate | diff | comparison | revisions
--- a/pidgin/gtkplugin.c	Wed Jun 04 23:00:11 2025 -0500
+++ b/pidgin/gtkplugin.c	Wed Jun 04 23:03:56 2025 -0500
@@ -121,16 +121,17 @@
 		char *summary;
 		char *desc;
 		plug = probes->data;
+		gboolean can_be_disabled = TRUE;
 
 		if (plug->info->type == PURPLE_PLUGIN_LOADER) {
 			GList *cur;
 			for (cur = PURPLE_PLUGIN_LOADER_INFO(plug)->exts; cur != NULL;
 					 cur = cur->next)
 				purple_plugins_probe(cur->data);
-			continue;
+			can_be_disabled = FALSE;
 		} else if (plug->info->type != PURPLE_PLUGIN_STANDARD ||
 			(plug->info->flags & PURPLE_PLUGIN_FLAG_INVISIBLE)) {
-			continue;
+			can_be_disabled = FALSE;
 		}
 
 		gtk_list_store_append (ls, &iter);
@@ -157,6 +158,7 @@
 				   1, desc,
 				   2, plug,
 				   3, purple_plugin_is_unloadable(plug),
+				   4, can_be_disabled,
 				   -1);
 		g_free(desc);
 	}
@@ -730,7 +732,7 @@
 	gtk_widget_set_sensitive(pref_button, FALSE);
 	gtk_window_set_role(GTK_WINDOW(plugin_dialog), "plugins");
 
-	ls = gtk_list_store_new(4, G_TYPE_BOOLEAN, G_TYPE_STRING, G_TYPE_POINTER, G_TYPE_BOOLEAN);
+	ls = gtk_list_store_new(5, G_TYPE_BOOLEAN, G_TYPE_STRING, G_TYPE_POINTER, G_TYPE_BOOLEAN, G_TYPE_BOOLEAN);
 	gtk_tree_sortable_set_sort_column_id(GTK_TREE_SORTABLE(ls),
 					     1, GTK_SORT_ASCENDING);
 
@@ -754,6 +756,8 @@
 	col = gtk_tree_view_column_new_with_attributes (_("Enabled"),
 							rend,
 							"active", 0,
+							"sensitive", 4,
+							"activatable", 4,
 							NULL);
 	gtk_tree_view_append_column (GTK_TREE_VIEW(event_view), col);
 	gtk_tree_view_column_set_sort_column_id(col, 0);

mercurial