diff options
author | Xavier Claessens <xclaesse@src.gnome.org> | 2008-04-13 20:39:13 +0800 |
---|---|---|
committer | Xavier Claessens <xclaesse@src.gnome.org> | 2008-04-13 20:39:13 +0800 |
commit | 213318adaf231512a98183394bf968ebd6c1a857 (patch) | |
tree | c0d14096dbffb7f5e22b143282780b38b5d0a30d /libempathy-gtk | |
parent | 97ae7e9c570dd2165190d2549a42081963d79be3 (diff) | |
download | gsoc2013-empathy-213318adaf231512a98183394bf968ebd6c1a857.tar gsoc2013-empathy-213318adaf231512a98183394bf968ebd6c1a857.tar.gz gsoc2013-empathy-213318adaf231512a98183394bf968ebd6c1a857.tar.bz2 gsoc2013-empathy-213318adaf231512a98183394bf968ebd6c1a857.tar.lz gsoc2013-empathy-213318adaf231512a98183394bf968ebd6c1a857.tar.xz gsoc2013-empathy-213318adaf231512a98183394bf968ebd6c1a857.tar.zst gsoc2013-empathy-213318adaf231512a98183394bf968ebd6c1a857.zip |
Fix disconnection of AccountStatusChanged signal.
svn path=/trunk/; revision=932
Diffstat (limited to 'libempathy-gtk')
-rw-r--r-- | libempathy-gtk/empathy-account-chooser.c | 8 | ||||
-rw-r--r-- | libempathy-gtk/empathy-accounts-dialog.c | 8 | ||||
-rw-r--r-- | libempathy-gtk/empathy-chat.c | 7 |
3 files changed, 9 insertions, 14 deletions
diff --git a/libempathy-gtk/empathy-account-chooser.c b/libempathy-gtk/empathy-account-chooser.c index 6b731ff73..f46f4cec6 100644 --- a/libempathy-gtk/empathy-account-chooser.c +++ b/libempathy-gtk/empathy-account-chooser.c @@ -47,6 +47,7 @@ typedef struct { gboolean has_all_option; EmpathyAccountChooserFilterFunc filter; gpointer filter_data; + gpointer token; } EmpathyAccountChooserPriv; typedef struct { @@ -151,10 +152,7 @@ account_chooser_finalize (GObject *object) g_signal_handlers_disconnect_by_func (priv->monitor, account_chooser_account_deleted_cb, chooser); - dbus_g_proxy_disconnect_signal (DBUS_G_PROXY (priv->mc), - "AccountStatusChanged", - G_CALLBACK (account_chooser_status_changed_cb), - chooser); + empathy_disconnect_account_status_changed (priv->token); g_object_unref (priv->mc); g_object_unref (priv->monitor); @@ -223,7 +221,7 @@ empathy_account_chooser_new (void) g_signal_connect (priv->monitor, "account-deleted", G_CALLBACK (account_chooser_account_deleted_cb), chooser); - empathy_connect_to_account_status_changed (priv->mc, + priv->token = empathy_connect_to_account_status_changed (priv->mc, G_CALLBACK (account_chooser_status_changed_cb), chooser, NULL); diff --git a/libempathy-gtk/empathy-accounts-dialog.c b/libempathy-gtk/empathy-accounts-dialog.c index 6f4421b88..0ea4416a3 100644 --- a/libempathy-gtk/empathy-accounts-dialog.c +++ b/libempathy-gtk/empathy-accounts-dialog.c @@ -84,6 +84,7 @@ typedef struct { MissionControl *mc; McAccountMonitor *monitor; + gpointer token; } EmpathyAccountsDialog; enum { @@ -962,10 +963,7 @@ accounts_dialog_destroy_cb (GtkWidget *widget, g_signal_handlers_disconnect_by_func (dialog->monitor, accounts_dialog_account_enabled_cb, dialog); - dbus_g_proxy_disconnect_signal (DBUS_G_PROXY (dialog->mc), - "AccountStatusChanged", - G_CALLBACK (accounts_dialog_status_changed_cb), - dialog); + empathy_disconnect_account_status_changed (dialog->token); /* Delete incomplete accounts */ accounts = mc_accounts_list (); @@ -1074,7 +1072,7 @@ empathy_accounts_dialog_show (GtkWindow *parent) g_signal_connect (dialog->monitor, "account-disabled", G_CALLBACK (accounts_dialog_account_enabled_cb), dialog); - empathy_connect_to_account_status_changed (dialog->mc, + dialog->token = empathy_connect_to_account_status_changed (dialog->mc, G_CALLBACK (accounts_dialog_status_changed_cb), dialog, NULL); diff --git a/libempathy-gtk/empathy-chat.c b/libempathy-gtk/empathy-chat.c index 0328c4ee9..fce7856c4 100644 --- a/libempathy-gtk/empathy-chat.c +++ b/libempathy-gtk/empathy-chat.c @@ -77,6 +77,7 @@ struct _EmpathyChatPriv { guint composing_stop_timeout_id; guint block_events_timeout_id; TpHandleType handle_type; + gpointer token; GtkWidget *widget; GtkWidget *hpaned; @@ -1405,9 +1406,7 @@ chat_finalize (GObject *object) chat_composing_remove_timeout (chat); - dbus_g_proxy_disconnect_signal (DBUS_G_PROXY (priv->mc), "AccountStatusChanged", - G_CALLBACK (chat_status_changed_cb), - chat); + empathy_disconnect_account_status_changed (priv->token); g_object_unref (priv->mc); g_object_unref (priv->log_manager); g_object_unref (priv->store); @@ -1537,7 +1536,7 @@ empathy_chat_init (EmpathyChat *chat) priv->sent_messages_index = -1; priv->mc = empathy_mission_control_new (); - empathy_connect_to_account_status_changed (priv->mc, + priv->token = empathy_connect_to_account_status_changed (priv->mc, G_CALLBACK (chat_status_changed_cb), chat, NULL); |