diff options
author | Jason Conti <jason.conti@gmail.com> | 2011-05-16 14:38:36 -0400 |
---|---|---|
committer | Jason Conti <jason.conti@gmail.com> | 2011-05-16 14:38:36 -0400 |
commit | 78a9257d380087694ae60898debec2dfb27d41ed (patch) | |
tree | 8d80c183458c222646fca6e215a63c4286c1886c /src | |
parent | aeba41553d6b494e5b5031d88e488e934a9692a5 (diff) | |
download | ayatana-indicator-notifications-78a9257d380087694ae60898debec2dfb27d41ed.tar.gz ayatana-indicator-notifications-78a9257d380087694ae60898debec2dfb27d41ed.tar.bz2 ayatana-indicator-notifications-78a9257d380087694ae60898debec2dfb27d41ed.zip |
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?
Diffstat (limited to 'src')
-rw-r--r-- | src/indicator-notifications.c | 13 |
1 files changed, 13 insertions, 0 deletions
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; } |