aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelix Kaser <f.kaser@gmx.net>2009-12-09 03:01:03 +0800
committerFelix Kaser <f.kaser@gmx.net>2009-12-15 20:52:45 +0800
commitfbce68e65c37e7f004bdfd6cfeb59e7ea2a67b07 (patch)
tree0822f66adfde77fb878bbeaad526993b75120227
parent0a39af61f6bab052ead17918ab372e0cbb8eab3c (diff)
downloadgsoc2013-empathy-fbce68e65c37e7f004bdfd6cfeb59e7ea2a67b07.tar
gsoc2013-empathy-fbce68e65c37e7f004bdfd6cfeb59e7ea2a67b07.tar.gz
gsoc2013-empathy-fbce68e65c37e7f004bdfd6cfeb59e7ea2a67b07.tar.bz2
gsoc2013-empathy-fbce68e65c37e7f004bdfd6cfeb59e7ea2a67b07.tar.lz
gsoc2013-empathy-fbce68e65c37e7f004bdfd6cfeb59e7ea2a67b07.tar.xz
gsoc2013-empathy-fbce68e65c37e7f004bdfd6cfeb59e7ea2a67b07.tar.zst
gsoc2013-empathy-fbce68e65c37e7f004bdfd6cfeb59e7ea2a67b07.zip
set infobar message to no network connection
if the account is disconnected and there is no internet connection at all.
-rw-r--r--src/empathy-accounts-dialog.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/empathy-accounts-dialog.c b/src/empathy-accounts-dialog.c
index 49c65f071..dbdbd92d1 100644
--- a/src/empathy-accounts-dialog.c
+++ b/src/empathy-accounts-dialog.c
@@ -37,6 +37,7 @@
#include <libempathy/empathy-utils.h>
#include <libempathy/empathy-connection-managers.h>
+#include <libempathy/empathy-connectivity.h>
#include <libempathy-gtk/empathy-ui-utils.h>
#include <libempathy-gtk/empathy-protocol-chooser.h>
@@ -181,10 +182,13 @@ accounts_dialog_update_status_infobar (EmpathyAccountsDialog *dialog,
guint status;
guint reason;
guint presence;
+ EmpathyConnectivity *connectivity;
status = tp_account_get_connection_status (account, &reason);
presence = tp_account_get_current_presence (account, NULL, NULL);
+ 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);
@@ -226,6 +230,9 @@ accounts_dialog_update_status_infobar (EmpathyAccountsDialog *dialog,
GTK_MESSAGE_ERROR);
}
+ if (!empathy_connectivity_is_online (connectivity))
+ message = _("Offline - No Network Connection");
+
ephy_spinner_stop (EPHY_SPINNER (priv->throbber));
gtk_widget_show (priv->image_status);
gtk_widget_hide (priv->throbber);
@@ -253,6 +260,8 @@ accounts_dialog_update_status_infobar (EmpathyAccountsDialog *dialog,
gtk_label_set_text (GTK_LABEL (priv->label_status), message);
gtk_widget_show (priv->label_status);
gtk_widget_show (priv->infobar);
+
+ g_object_unref (connectivity);
}
static void