aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2009-10-14 22:34:01 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2009-10-15 00:01:28 +0800
commit85c083ccf5ecdb66d13a597e9306a08dbeed3237 (patch)
tree3498e82d3904e227236981c8c0e5987466d30590 /src
parentc8d648fff1a1f130baab6838a4aab2c6f2162d66 (diff)
downloadgsoc2013-empathy-85c083ccf5ecdb66d13a597e9306a08dbeed3237.tar
gsoc2013-empathy-85c083ccf5ecdb66d13a597e9306a08dbeed3237.tar.gz
gsoc2013-empathy-85c083ccf5ecdb66d13a597e9306a08dbeed3237.tar.bz2
gsoc2013-empathy-85c083ccf5ecdb66d13a597e9306a08dbeed3237.tar.lz
gsoc2013-empathy-85c083ccf5ecdb66d13a597e9306a08dbeed3237.tar.xz
gsoc2013-empathy-85c083ccf5ecdb66d13a597e9306a08dbeed3237.tar.zst
gsoc2013-empathy-85c083ccf5ecdb66d13a597e9306a08dbeed3237.zip
accounts_dialog_add_account: connect notify::display-name using empathy_signal_connect_weak
empathy_signal_connect_weak will disconnect the signal when the accounts dialog is disposed. (#598408)
Diffstat (limited to 'src')
-rw-r--r--src/empathy-accounts-dialog.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/src/empathy-accounts-dialog.c b/src/empathy-accounts-dialog.c
index 4e120e1d4..1aacaff68 100644
--- a/src/empathy-accounts-dialog.c
+++ b/src/empathy-accounts-dialog.c
@@ -136,11 +136,6 @@ enum {
PROP_PARENT = 1
};
-static void accounts_dialog_account_display_name_changed_cb (
- EmpathyAccount *account,
- GParamSpec *pspec,
- gpointer user_data);
-
static EmpathyAccountSettings * accounts_dialog_model_get_selected_settings (
EmpathyAccountsDialog *dialog);
@@ -762,8 +757,6 @@ accounts_dialog_delete_account_response_cb (GtkDialog *message_dialog,
if (account != NULL)
{
- g_signal_handlers_disconnect_by_func (account,
- accounts_dialog_account_display_name_changed_cb, account_dialog);
empathy_account_remove_async (account, NULL, NULL);
g_object_unref (account);
account = NULL;
@@ -1281,8 +1274,9 @@ accounts_dialog_add_account (EmpathyAccountsDialog *dialog,
TP_CONNECTION_STATUS_DISCONNECTED,
dialog);
- g_signal_connect (account, "notify::display-name",
- G_CALLBACK (accounts_dialog_account_display_name_changed_cb), dialog);
+ empathy_signal_connect_weak (account, "notify::display-name",
+ G_CALLBACK (accounts_dialog_account_display_name_changed_cb),
+ G_OBJECT (dialog));
g_object_unref (settings);
}
@@ -1337,8 +1331,6 @@ accounts_dialog_account_removed_cb (EmpathyAccountManager *manager,
if (accounts_dialog_get_account_iter (dialog, account, &iter))
{
- g_signal_handlers_disconnect_by_func (account,
- accounts_dialog_account_display_name_changed_cb, dialog);
gtk_list_store_remove (GTK_LIST_STORE (
gtk_tree_view_get_model (GTK_TREE_VIEW (priv->treeview))), &iter);
}