diff options
author | Ted Gould <ted@canonical.com> | 2009-10-01 15:51:03 -0500 |
---|---|---|
committer | Ted Gould <ted@canonical.com> | 2009-10-01 15:51:03 -0500 |
commit | 05fd37315eddb4f9e986ac75fd018549a6c4ea88 (patch) | |
tree | ac186183d49a1c5d849be59412420b30a53f1cc9 | |
parent | e4892eaa338107114cf9e7ba7d2fd29a15b821e4 (diff) | |
parent | d0e28d7c6e98d91fc14398ea863bb378eb9cc9c7 (diff) | |
download | libdbusmenu-05fd37315eddb4f9e986ac75fd018549a6c4ea88.tar.gz libdbusmenu-05fd37315eddb4f9e986ac75fd018549a6c4ea88.tar.bz2 libdbusmenu-05fd37315eddb4f9e986ac75fd018549a6c4ea88.zip |
Killing some bad looking warnings that are stupid
-rw-r--r-- | debian/changelog | 6 | ||||
-rw-r--r-- | libdbusmenu-gtk/client.c | 9 | ||||
-rw-r--r-- | libdbusmenu-gtk/menu.c | 5 |
3 files changed, 13 insertions, 7 deletions
diff --git a/debian/changelog b/debian/changelog index 648d68f..e82bab1 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +libdbusmenu (0.1.5-0ubuntu1~ppa2~bugfix11) UNRELEASED; urgency=low + + * Killing some bad looking warnings that are stupid + + -- Ted Gould <ted@ubuntu.com> Thu, 01 Oct 2009 15:50:41 -0500 + libdbusmenu (0.1.5-0ubuntu1~ppa2~bugfix10) karmic; urgency=low * Removing from the container 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' diff --git a/libdbusmenu-gtk/menu.c b/libdbusmenu-gtk/menu.c index ff473dc..8f97294 100644 --- a/libdbusmenu-gtk/menu.c +++ b/libdbusmenu-gtk/menu.c @@ -196,8 +196,9 @@ root_child_added (DbusmenuMenuitem * root, DbusmenuMenuitem * child, guint posit g_signal_connect(G_OBJECT(child), DBUSMENU_MENUITEM_SIGNAL_REALIZED, G_CALLBACK(child_realized), menu); - GtkWidget * item = GTK_WIDGET(dbusmenu_gtkclient_menuitem_get(priv->client, child)); - if (item != NULL) { + GtkMenuItem * mi = dbusmenu_gtkclient_menuitem_get(priv->client, child); + if (mi != NULL) { + GtkWidget * item = GTK_WIDGET(mi); gtk_menu_append(GTK_MENU(menu), item); gtk_menu_reorder_child(GTK_MENU(menu), item, dbusmenu_menuitem_get_position(root, child)); } |