diff options
author | Ted Gould <ted@gould.cx> | 2011-01-19 16:50:34 -0600 |
---|---|---|
committer | Ted Gould <ted@gould.cx> | 2011-01-19 16:50:34 -0600 |
commit | c0990d9fa4889042ae255ed1358c0686d5dec241 (patch) | |
tree | b3db48b217433e6e795f525ce1a55621a05c72a8 | |
parent | e58df7a09fb28a4ae38888f54edf09d937bf70b2 (diff) | |
download | libdbusmenu-c0990d9fa4889042ae255ed1358c0686d5dec241.tar.gz libdbusmenu-c0990d9fa4889042ae255ed1358c0686d5dec241.tar.bz2 libdbusmenu-c0990d9fa4889042ae255ed1358c0686d5dec241.zip |
Filling out the type handler
-rw-r--r-- | libdbusmenu-gtk/serializablemenuitem.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libdbusmenu-gtk/serializablemenuitem.c b/libdbusmenu-gtk/serializablemenuitem.c index e8ad22b..de7bb04 100644 --- a/libdbusmenu-gtk/serializablemenuitem.c +++ b/libdbusmenu-gtk/serializablemenuitem.c @@ -30,6 +30,7 @@ License version 3 and version 2.1 along with this program. If not, see #include "config.h" #endif +#include "client.h" #include "serializablemenuitem.h" struct _DbusmenuGtkSerializableMenuItemPrivate { @@ -111,6 +112,13 @@ struct _type_handler_t { static gboolean type_handler (DbusmenuMenuitem * newitem, DbusmenuMenuitem * parent, DbusmenuClient * client, gpointer user_data) { + type_handler_t * th = (type_handler_t *)user_data; + + DbusmenuGtkSerializableMenuItem * smi = DBUSMENU_GTK_SERIALIZABLE_MENU_ITEM(g_object_new(th->type, NULL)); + g_return_val_if_fail(smi != NULL, FALSE); + + dbusmenu_gtk_serializable_menu_item_set_dbusmenu_menuitem(smi, newitem); + dbusmenu_gtkclient_newitem_base(DBUSMENU_GTKCLIENT(client), newitem, GTK_MENU_ITEM(smi), parent); return TRUE; } |