aboutsummaryrefslogtreecommitdiffstats
path: root/src/empathy-accounts-dialog.c
diff options
context:
space:
mode:
authorFelix Kaser <f.kaser@gmx.net>2009-12-14 16:42:21 +0800
committerFelix Kaser <f.kaser@gmx.net>2009-12-15 20:52:46 +0800
commitefa5be890a30290f23e0d460932ebd41504fa973 (patch)
treedb12b98f12f5304fbdf8d9857e1a6e487c35bba8 /src/empathy-accounts-dialog.c
parent53aeb4caa6e0927a1c4be687675701d4bebb360f (diff)
downloadgsoc2013-empathy-efa5be890a30290f23e0d460932ebd41504fa973.tar
gsoc2013-empathy-efa5be890a30290f23e0d460932ebd41504fa973.tar.gz
gsoc2013-empathy-efa5be890a30290f23e0d460932ebd41504fa973.tar.bz2
gsoc2013-empathy-efa5be890a30290f23e0d460932ebd41504fa973.tar.lz
gsoc2013-empathy-efa5be890a30290f23e0d460932ebd41504fa973.tar.xz
gsoc2013-empathy-efa5be890a30290f23e0d460932ebd41504fa973.tar.zst
gsoc2013-empathy-efa5be890a30290f23e0d460932ebd41504fa973.zip
get connectivity only when needed
Diffstat (limited to 'src/empathy-accounts-dialog.c')
-rw-r--r--src/empathy-accounts-dialog.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/empathy-accounts-dialog.c b/src/empathy-accounts-dialog.c
index 23e251364..187d8c71c 100644
--- a/src/empathy-accounts-dialog.c
+++ b/src/empathy-accounts-dialog.c
@@ -222,8 +222,6 @@ accounts_dialog_update_status_infobar (EmpathyAccountsDialog *dialog,
creating_account = TRUE;
}
- connectivity = empathy_connectivity_dup_singleton ();
-
gtk_image_set_from_icon_name (GTK_IMAGE (priv->image_status),
empathy_icon_name_for_presence (presence), GTK_ICON_SIZE_SMALL_TOOLBAR);
@@ -275,9 +273,11 @@ accounts_dialog_update_status_infobar (EmpathyAccountsDialog *dialog,
GTK_MESSAGE_ERROR);
}
+ connectivity = empathy_connectivity_dup_singleton ();
if (!empathy_connectivity_is_online (connectivity))
message = _("Offline - No Network Connection");
+ g_object_unref (connectivity);
ephy_spinner_stop (EPHY_SPINNER (priv->throbber));
gtk_widget_show (priv->image_status);
gtk_widget_hide (priv->throbber);
@@ -314,8 +314,6 @@ accounts_dialog_update_status_infobar (EmpathyAccountsDialog *dialog,
gtk_widget_show (priv->label_status);
gtk_widget_show (priv->infobar);
- g_object_unref (connectivity);
-
if (!creating_account)
g_free (status_message);
}