diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2012-09-04 20:34:10 +0800 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2012-09-05 15:13:23 +0800 |
commit | e52959e0abfcfa322bf3e0e7587e62f1d49d8699 (patch) | |
tree | 6f3631282fb4727d2b34f594a9a7a6b8ab7b6094 /src/empathy-roster-window.c | |
parent | 20a856d61a04345ceb91919dc965ae19522da10b (diff) | |
download | gsoc2013-empathy-e52959e0abfcfa322bf3e0e7587e62f1d49d8699.tar gsoc2013-empathy-e52959e0abfcfa322bf3e0e7587e62f1d49d8699.tar.gz gsoc2013-empathy-e52959e0abfcfa322bf3e0e7587e62f1d49d8699.tar.bz2 gsoc2013-empathy-e52959e0abfcfa322bf3e0e7587e62f1d49d8699.tar.lz gsoc2013-empathy-e52959e0abfcfa322bf3e0e7587e62f1d49d8699.tar.xz gsoc2013-empathy-e52959e0abfcfa322bf3e0e7587e62f1d49d8699.tar.zst gsoc2013-empathy-e52959e0abfcfa322bf3e0e7587e62f1d49d8699.zip |
roster-window: display a specific message when we are offline
https://bugzilla.gnome.org/show_bug.cgi?id=683326
Diffstat (limited to 'src/empathy-roster-window.c')
-rw-r--r-- | src/empathy-roster-window.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/empathy-roster-window.c b/src/empathy-roster-window.c index b92507b4f..ffaa6b926 100644 --- a/src/empathy-roster-window.c +++ b/src/empathy-roster-window.c @@ -1563,6 +1563,7 @@ set_notebook_page (EmpathyRosterWindow *self) { GList *accounts; guint len; + TpConnectionPresenceType presence; accounts = tp_account_manager_get_valid_accounts ( self->priv->account_manager); @@ -1588,6 +1589,17 @@ set_notebook_page (EmpathyRosterWindow *self) goto out; } + presence = tp_account_manager_get_most_available_presence ( + self->priv->account_manager, NULL, NULL); + + if (presence == TP_CONNECTION_PRESENCE_TYPE_OFFLINE) + { + display_page_message (self, + _("Change your presence to see contacts here"), + FALSE, FALSE); + goto out; + } + if (empathy_roster_view_is_empty (self->priv->view)) { if (empathy_roster_view_is_searching (self->priv->view)) |