[empathy] get connectivity only when needed
- From: Felix Kaser <kaserf src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [empathy] get connectivity only when needed
- Date: Tue, 15 Dec 2009 13:25:57 +0000 (UTC)
commit efa5be890a30290f23e0d460932ebd41504fa973
Author: Felix Kaser <f kaser gmx net>
Date: Mon Dec 14 09:42:21 2009 +0100
get connectivity only when needed
src/empathy-accounts-dialog.c | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/src/empathy-accounts-dialog.c b/src/empathy-accounts-dialog.c
index 23e2513..187d8c7 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);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]