[Xfce4-commits] <xfce4-indicator-plugin:master> set up indicators with only one function (some set here where missing a few signal handlers)

Mark Trompell noreply at xfce.org
Thu Feb 24 22:16:01 CET 2011


Updating branch refs/heads/master
         to 7307f54ea39f376d6938f81ea1712e8ce49f7af9 (commit)
       from 93a1c284a3a257c943a084783d365343e2ad4752 (commit)

commit 7307f54ea39f376d6938f81ea1712e8ce49f7af9
Author: Lionel Le Folgoc <lionel at lefolgoc.net>
Date:   Thu Feb 24 22:03:29 2011 +0100

    set up indicators with only one function (some set here where missing a few signal handlers)

 panel-plugin/indicator.c |   19 +------------------
 1 files changed, 1 insertions(+), 18 deletions(-)

diff --git a/panel-plugin/indicator.c b/panel-plugin/indicator.c
index 1c66999..52b8ece 100644
--- a/panel-plugin/indicator.c
+++ b/panel-plugin/indicator.c
@@ -377,24 +377,7 @@ load_module (const gchar * name, GtkWidget * menu)
 
 	for (entry = entries; entry != NULL; entry = g_list_next(entry)) {
 		IndicatorObjectEntry * entrydata = (IndicatorObjectEntry *)entry->data;
-
-		GtkWidget * menuitem = gtk_menu_item_new();
-		GtkWidget * hbox = gtk_hbox_new(FALSE, 3);
-		if (entrydata->image != NULL) {
-			gtk_box_pack_start(GTK_BOX(hbox), GTK_WIDGET(entrydata->image), FALSE, FALSE, 0);
-		}
-		if (entrydata->label != NULL) {
-			gtk_box_pack_start(GTK_BOX(hbox), GTK_WIDGET(entrydata->label), FALSE, FALSE, 0);
-		}
-		gtk_container_add(GTK_CONTAINER(menuitem), hbox);
-		gtk_widget_show(hbox);
-
-		if (entrydata->menu != NULL) {
-			gtk_menu_item_set_submenu(GTK_MENU_ITEM(menuitem), GTK_WIDGET(entrydata->menu));
-		}
-
-		gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem);
-		gtk_widget_show(menuitem);
+		entry_added(io, entrydata, menu);
 	}
 
 	g_list_free(entries);



More information about the Xfce4-commits mailing list