aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Gould <ted@canonical.com>2009-05-24 21:28:21 +0200
committerTed Gould <ted@canonical.com>2009-05-24 21:28:21 +0200
commita3e5b5d4e8b5f0919039a94d9e05b484dc8b0c67 (patch)
tree0a6e39dcdbcad7e14d2044c4f871e045c8c84183
parent6c7818f652ef2f56b48e87da059593e340063047 (diff)
downloadlibdbusmenu-a3e5b5d4e8b5f0919039a94d9e05b484dc8b0c67.tar.gz
libdbusmenu-a3e5b5d4e8b5f0919039a94d9e05b484dc8b0c67.tar.bz2
libdbusmenu-a3e5b5d4e8b5f0919039a94d9e05b484dc8b0c67.zip
Switching to a unref and no ref for the tracking of GTK Menu Item. Also add better warnings.
-rw-r--r--libdbusmenu-gtk/Makefile.am2
-rw-r--r--libdbusmenu-gtk/menu.c5
2 files changed, 3 insertions, 4 deletions
diff --git a/libdbusmenu-gtk/Makefile.am b/libdbusmenu-gtk/Makefile.am
index e73c8c1..80e6058 100644
--- a/libdbusmenu-gtk/Makefile.am
+++ b/libdbusmenu-gtk/Makefile.am
@@ -19,7 +19,7 @@ libdbusmenu_gtk_la_LDFLAGS = \
-export-symbols-regex "^[^_].*"
libdbusmenu_gtk_la_CFLAGS = \
- $(DBUSMENUGTK_CFLAGS)
+ $(DBUSMENUGTK_CFLAGS) -Wall -Werror
libdbusmenu_gtk_la_LIBADD = \
../libdbusmenu-glib/libdbusmenu-glib.la \
diff --git a/libdbusmenu-gtk/menu.c b/libdbusmenu-gtk/menu.c
index 9bb23a8..26543be 100644
--- a/libdbusmenu-gtk/menu.c
+++ b/libdbusmenu-gtk/menu.c
@@ -179,14 +179,13 @@ menu_prop_change_cb (DbusmenuMenuitem * mi, gchar * prop, gchar * value, GtkMenu
static void
destoryed_dbusmenuitem_cb (gpointer udata, GObject * dbusmenuitem)
{
- g_object_destory(G_OBJECT(udata));
+ g_object_unref(G_OBJECT(udata));
return;
}
static void
connect_menuitem (DbusmenuMenuitem * mi, GtkMenuItem * gmi)
{
- g_object_ref(gmi);
g_object_set_data_full(G_OBJECT(mi), data_menuitem, gmi, g_object_unref);
g_signal_connect(G_OBJECT(mi), DBUSMENU_MENUITEM_SIGNAL_PROPERTY_CHANGED, G_CALLBACK(menu_prop_change_cb), gmi);
@@ -223,7 +222,7 @@ process_dbusmenu_menuitem (DbusmenuMenuitem * mi, GtkMenu * parentmenu)
g_object_ref(gtkmenu);
g_object_set_data_full(G_OBJECT(mi), data_menu, gtkmenu, g_object_unref);
unknown_menu = gtkmenu;
- gtk_menuitem_set_submenu(GTK_MENU_ITEM(unknown_menuitem), gtkmenu);
+ gtk_menu_item_set_submenu(GTK_MENU_ITEM(unknown_menuitem), gtkmenu);
gtk_widget_show(gtkmenu);
}