[empathy] Remove unneccesary signal disconnection in EmpathyAccountsDialog
- From: Danielle Madeley <daniellem src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [empathy] Remove unneccesary signal disconnection in EmpathyAccountsDialog
- Date: Wed, 21 Jul 2010 09:15:18 +0000 (UTC)
commit 8d37c869f388f81adccd057042cc520fdeb8f02e
Author: Danielle Madeley <danielle madeley collabora co uk>
Date: Fri Jul 16 11:55:46 2010 +1000
Remove unneccesary signal disconnection in EmpathyAccountsDialog
Generated critical warnings under GTK+ 3
src/empathy-accounts-dialog.c | 44 ++++++++--------------------------------
1 files changed, 9 insertions(+), 35 deletions(-)
---
diff --git a/src/empathy-accounts-dialog.c b/src/empathy-accounts-dialog.c
index 12ac5b2..46d6298 100644
--- a/src/empathy-accounts-dialog.c
+++ b/src/empathy-accounts-dialog.c
@@ -124,8 +124,6 @@ typedef struct {
* EmpathyAccountsDialog object. */
gboolean force_change_row;
GtkTreeRowReference *destination_row;
-
- gboolean dispose_has_run;
} EmpathyAccountsDialogPriv;
enum {
@@ -2120,38 +2118,12 @@ do_dispose (GObject *obj)
{
EmpathyAccountsDialog *dialog = EMPATHY_ACCOUNTS_DIALOG (obj);
EmpathyAccountsDialogPriv *priv = GET_PRIV (dialog);
- GtkTreeModel *model;
-
- if (priv->dispose_has_run)
- return;
-
- priv->dispose_has_run = TRUE;
-
- /* Disconnect signals */
- model = gtk_tree_view_get_model (GTK_TREE_VIEW (priv->treeview));
- g_signal_handlers_disconnect_by_func (model,
- accounts_dialog_accounts_model_row_inserted_cb, dialog);
- g_signal_handlers_disconnect_by_func (model,
- accounts_dialog_accounts_model_row_deleted_cb, dialog);
- g_signal_handlers_disconnect_by_func (priv->account_manager,
- accounts_dialog_account_validity_changed_cb,
- dialog);
- g_signal_handlers_disconnect_by_func (priv->account_manager,
- accounts_dialog_account_removed_cb,
- dialog);
- g_signal_handlers_disconnect_by_func (priv->account_manager,
- accounts_dialog_account_enabled_cb,
- dialog);
- g_signal_handlers_disconnect_by_func (priv->account_manager,
- accounts_dialog_account_disabled_cb,
- dialog);
- g_signal_handlers_disconnect_by_func (priv->account_manager,
- accounts_dialog_manager_ready_cb,
- dialog);
-
- if (priv->connecting_id)
- g_source_remove (priv->connecting_id);
+ if (priv->connecting_id != 0)
+ {
+ g_source_remove (priv->connecting_id);
+ priv->connecting_id = 0;
+ }
if (priv->account_manager != NULL)
{
@@ -2172,8 +2144,10 @@ do_dispose (GObject *obj)
}
if (priv->initial_selection != NULL)
- g_object_unref (priv->initial_selection);
- priv->initial_selection = NULL;
+ {
+ g_object_unref (priv->initial_selection);
+ priv->initial_selection = NULL;
+ }
G_OBJECT_CLASS (empathy_accounts_dialog_parent_class)->dispose (obj);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]