diff options
author | Ted Gould <ted@canonical.com> | 2009-08-03 18:12:34 +0100 |
---|---|---|
committer | Ted Gould <ted@canonical.com> | 2009-08-03 18:12:34 +0100 |
commit | 573c458ef73f399868624e0446f69dc03ced69cb (patch) | |
tree | eae2c2405eb1795b251b51bbb9e0b1670e88e1de | |
parent | f344374861267a39d874e67f1fb4967b3f844e82 (diff) | |
parent | 7f379d5d7fb9ddf834be4864324637b12af98750 (diff) | |
download | libayatana-indicator-573c458ef73f399868624e0446f69dc03ced69cb.tar.gz libayatana-indicator-573c458ef73f399868624e0446f69dc03ced69cb.tar.bz2 libayatana-indicator-573c458ef73f399868624e0446f69dc03ced69cb.zip |
Merging in changes to the destroy and removing a warning.
-rw-r--r-- | libindicate/listener.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/libindicate/listener.c b/libindicate/listener.c index bd3639d..501d367 100644 --- a/libindicate/listener.c +++ b/libindicate/listener.c @@ -277,8 +277,19 @@ indicate_listener_init (IndicateListener * listener) static void indicate_listener_finalize (GObject * obj) { - /* IndicateListener * listener = INDICATE_LISTENER(obj); */ - + IndicateListener * listener = INDICATE_LISTENER(obj); + IndicateListenerPrivate * priv = INDICATE_LISTENER_GET_PRIVATE(listener); + + if (priv->todo_idle != 0) { + g_idle_remove_by_data(obj); + } + /* Hack: proxy_struct_destroy() lacks a user_data parameter, but since the + * caller is responsible for handling params on the stack, it works + */ + g_list_foreach(priv->proxies_possible, (GFunc)proxy_struct_destroy, NULL); + g_list_free(priv->proxies_possible); + g_list_foreach(priv->proxies_working, (GFunc)proxy_struct_destroy, NULL); + g_list_free(priv->proxies_working); G_OBJECT_CLASS (indicate_listener_parent_class)->finalize (obj); return; } @@ -286,8 +297,6 @@ indicate_listener_finalize (GObject * obj) IndicateListener * indicate_listener_new (void) { - g_warning("Creating a new listener is generally discouraged, please use indicate_listener_ref_default"); - IndicateListener * listener; listener = g_object_new(INDICATE_TYPE_LISTENER, NULL); return listener; |