aboutsummaryrefslogtreecommitdiff
path: root/src/indicator-notifications.c
diff options
context:
space:
mode:
authorJason Conti <jason.conti@gmail.com>2011-05-16 14:38:36 -0400
committerJason Conti <jason.conti@gmail.com>2011-05-16 14:38:36 -0400
commit0d7a9f187d4b4e47b7ce95625a2c1e0ad6a631e2 (patch)
tree8d80c183458c222646fca6e215a63c4286c1886c /src/indicator-notifications.c
parent232a24336d96ec361b2e8c0b1d0cc4486e6447e1 (diff)
downloadayatana-indicator-notifications-0d7a9f187d4b4e47b7ce95625a2c1e0ad6a631e2.tar.gz
ayatana-indicator-notifications-0d7a9f187d4b4e47b7ce95625a2c1e0ad6a631e2.tar.bz2
ayatana-indicator-notifications-0d7a9f187d4b4e47b7ce95625a2c1e0ad6a631e2.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/indicator-notifications.c')
-rw-r--r--src/indicator-notifications.c13
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;
}