From 0d7a9f187d4b4e47b7ce95625a2c1e0ad6a631e2 Mon Sep 17 00:00:00 2001 From: Jason Conti Date: Mon, 16 May 2011 14:38:36 -0400 Subject: Building the menuitem, now works the same as before. Next comes markup. Should I markup the text server side or add a property to the dbusmenu item for each field, and build the menuitem client side from the properties? --- src/indicator-notifications.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src') diff --git a/src/indicator-notifications.c b/src/indicator-notifications.c index a143883..045656e 100644 --- a/src/indicator-notifications.c +++ b/src/indicator-notifications.c @@ -287,6 +287,19 @@ new_notification_menuitem(DbusmenuMenuitem *new_item, DbusmenuMenuitem *parent, DbusmenuClient *client, gpointer user_data) { g_debug("New notification item"); + g_return_val_if_fail(DBUSMENU_IS_MENUITEM(new_item), FALSE); + g_return_val_if_fail(DBUSMENU_IS_GTKCLIENT(client), FALSE); + g_return_val_if_fail(IS_INDICATOR_NOTIFICATIONS(user_data), FALSE); + + GtkWidget *item = gtk_menu_item_new(); + gtk_menu_item_set_label(GTK_MENU_ITEM(item), dbusmenu_menuitem_property_get(new_item, + DBUSMENU_MENUITEM_PROP_LABEL)); + gtk_widget_show(item); + + dbusmenu_gtkclient_newitem_base(DBUSMENU_GTKCLIENT(client), new_item, GTK_MENU_ITEM(item), parent); + + g_object_unref(item); + return TRUE; } -- cgit v1.2.3