grim/pidgin

Parents 536b09356b6b
Children 00c77e22fb64
Add back support for menu separators in the menus for plugin actions

Testing Done:
Ran locally and verified the separator works from the `Notitication Sound` plugin under both Arc Darc and Adwaita themes.

Reviewed at https://reviews.imfreedom.org/r/659/
--- a/pidgin/pidginpluginsmenu.c Mon May 24 23:43:51 2021 -0500
+++ b/pidgin/pidginpluginsmenu.c Tue May 25 00:06:32 2021 -0500
@@ -81,13 +81,28 @@
submenu = gtk_menu_new();
for(i = 0; actions != NULL; i++) {
- PurplePluginAction *action = (PurplePluginAction *)actions->data;
+ PurplePluginAction *action = NULL;
GSimpleAction *gaction = NULL;
GtkWidget *action_item = NULL;
gchar *action_base_name = NULL;
gchar *action_full_name = NULL;
+ action = (PurplePluginAction *)actions->data;
+ if(action == NULL) {
+ action_item = gtk_separator_menu_item_new();
+ gtk_widget_show(action_item);
+ gtk_menu_shell_append(GTK_MENU_SHELL(submenu), action_item);
+
+ actions = g_list_delete_link(actions, actions);
+
+ continue;
+ }
+
if(action->label == NULL) {
+ actions = g_list_delete_link(actions, actions);
+
+ g_warn_if_reached();
+
continue;
}