From efa5be890a30290f23e0d460932ebd41504fa973 Mon Sep 17 00:00:00 2001 From: Felix Kaser Date: Mon, 14 Dec 2009 09:42:21 +0100 Subject: get connectivity only when needed --- src/empathy-accounts-dialog.c | 6 ++---- 1 file 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); } -- cgit v1.2.3