ayatana-commits team mailing list archive
-
ayatana-commits team
-
Mailing list archive
-
Message #03196
[Branch ~dbusmenu-team/dbusmenu/trunk] Rev 231: Unregister the theme signal handler on destruction instead of doing it through an odd reference.
Merge authors:
Chris Coulson (chrisccoulson)
Ted Gould (ted)
------------------------------------------------------------
revno: 231 [merge]
committer: Ted Gould <ted@xxxxxxxx>
branch nick: trunk
timestamp: Thu 2011-02-24 10:23:50 -0600
message:
Unregister the theme signal handler on destruction instead of doing it through an odd reference.
modified:
libdbusmenu-gtk/parser.c
--
lp:dbusmenu
https://code.launchpad.net/~dbusmenu-team/dbusmenu/trunk
Your team ayatana-commits is subscribed to branch lp:dbusmenu.
To unsubscribe from this branch go to https://code.launchpad.net/~dbusmenu-team/dbusmenu/trunk/+edit-subscription
=== modified file 'libdbusmenu-gtk/parser.c'
--- libdbusmenu-gtk/parser.c 2011-02-23 14:34:36 +0000
+++ libdbusmenu-gtk/parser.c 2011-02-24 16:22:46 +0000
@@ -161,17 +161,10 @@
}
}
-/* Called if we replace the cache on the object with a new
- dbusmenu menuitem */
static void
-object_cache_freed (gpointer data)
+widget_freed (gpointer data, GObject * obj)
{
- // TODO: make this have access to both data and obj so we can call these
- //if (!G_IS_OBJECT(obj)) return;
- //g_object_weak_unref(G_OBJECT(obj), dbusmenu_cache_freed, data);
- //dbusmenu_cache_freed(data, obj);
-
- g_signal_handlers_disconnect_by_func(gtk_icon_theme_get_default(), G_CALLBACK(theme_changed_cb), data);
+ g_signal_handlers_disconnect_by_func(gtk_icon_theme_get_default(), G_CALLBACK(theme_changed_cb), obj);
return;
}
@@ -213,8 +206,8 @@
ParserData *pdata = g_new0 (ParserData, 1);
g_object_set_data_full(G_OBJECT(item), PARSER_DATA, pdata, parse_data_free);
- g_object_set_data_full(G_OBJECT(widget), CACHED_MENUITEM, item, object_cache_freed);
g_object_weak_ref(G_OBJECT(item), dbusmenu_item_freed, NULL);
+ g_object_weak_ref(G_OBJECT(widget), widget_freed, NULL);
pdata->widget = widget;
g_object_add_weak_pointer(G_OBJECT (widget), (gpointer*)&pdata->widget);