diff options
author | Ted Gould <ted@canonical.com> | 2009-10-01 15:34:26 -0500 |
---|---|---|
committer | Ted Gould <ted@canonical.com> | 2009-10-01 15:34:26 -0500 |
commit | ade76d21e26083ebd287564c321ee3a7600d1fe4 (patch) | |
tree | 060c3657eaff266cf9fbfb0c402f2e49618630ec /libdbusmenu-gtk | |
parent | d3f418fb7331fa431fef415be10a1c71b024e1fa (diff) | |
download | libdbusmenu-ade76d21e26083ebd287564c321ee3a7600d1fe4.tar.gz libdbusmenu-ade76d21e26083ebd287564c321ee3a7600d1fe4.tar.bz2 libdbusmenu-ade76d21e26083ebd287564c321ee3a7600d1fe4.zip |
Leaving abstract the data as long as possible to avoid GTK cast warnings.
Diffstat (limited to 'libdbusmenu-gtk')
-rw-r--r-- | libdbusmenu-gtk/client.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/libdbusmenu-gtk/client.c b/libdbusmenu-gtk/client.c index 35f5e61..21da38e 100644 --- a/libdbusmenu-gtk/client.c +++ b/libdbusmenu-gtk/client.c @@ -324,14 +324,13 @@ dbusmenu_gtkclient_menuitem_get (DbusmenuGtkClient * client, DbusmenuMenuitem * g_return_val_if_fail(DBUSMENU_IS_GTKCLIENT(client), NULL); g_return_val_if_fail(DBUSMENU_IS_MENUITEM(item), NULL); - GtkMenuItem * mi = GTK_MENU_ITEM(g_object_get_data(G_OBJECT(item), data_menuitem)); - if (mi == NULL) { - // new_menuitem(DBUSMENU_CLIENT(client), item, NULL); + gpointer data = g_object_get_data(G_OBJECT(item), data_menuitem); + if (data == NULL) { g_warning("GTK not updated"); - mi = GTK_MENU_ITEM(g_object_get_data(G_OBJECT(item), data_menuitem)); + return NULL; } - return mi; + return GTK_MENU_ITEM(data); } /* The base type handler that builds a plain ol' |