diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2012-09-06 22:25:23 +0800 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2012-09-06 22:25:38 +0800 |
commit | 8af24addff899127fc433e0e4233cd568bd2ab1c (patch) | |
tree | d21fb143855def4a6713ef875860c20af93bd33e /src | |
parent | f6a74bbbfd94d2bb6eef27e7e2b5f5cb45927371 (diff) | |
download | gsoc2013-empathy-8af24addff899127fc433e0e4233cd568bd2ab1c.tar gsoc2013-empathy-8af24addff899127fc433e0e4233cd568bd2ab1c.tar.gz gsoc2013-empathy-8af24addff899127fc433e0e4233cd568bd2ab1c.tar.bz2 gsoc2013-empathy-8af24addff899127fc433e0e4233cd568bd2ab1c.tar.lz gsoc2013-empathy-8af24addff899127fc433e0e4233cd568bd2ab1c.tar.xz gsoc2013-empathy-8af24addff899127fc433e0e4233cd568bd2ab1c.tar.zst gsoc2013-empathy-8af24addff899127fc433e0e4233cd568bd2ab1c.zip |
roster-window: display loading page when reconnecting accounts
https://bugzilla.gnome.org/show_bug.cgi?id=683501
Diffstat (limited to 'src')
-rw-r--r-- | src/empathy-roster-window.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/empathy-roster-window.c b/src/empathy-roster-window.c index cbe4300e5..e36bf769e 100644 --- a/src/empathy-roster-window.c +++ b/src/empathy-roster-window.c @@ -927,6 +927,8 @@ roster_window_remove_balance_action (EmpathyRosterWindow *self, gtk_widget_destroy (hbox); } +static void set_notebook_page (EmpathyRosterWindow *self); + static void roster_window_connection_changed_cb (TpAccount *account, guint old_status, @@ -937,6 +939,7 @@ roster_window_connection_changed_cb (TpAccount *account, EmpathyRosterWindow *self) { roster_window_update_status (self); + set_notebook_page (self); if (current == TP_CONNECTION_STATUS_DISCONNECTED && reason != TP_CONNECTION_STATUS_REASON_REQUESTED) @@ -1590,9 +1593,17 @@ set_notebook_page (EmpathyRosterWindow *self) GList *accounts; guint len; TpConnectionPresenceType presence; + gboolean connected, connecting; + connected = empathy_account_manager_get_accounts_connected (&connecting); + + /* Display the loading page if either: + * - We are fetching contacts from Folks (startup) + * - There is no account connected but at least one is connecting + */ if (!empathy_individual_manager_get_contacts_loaded ( - self->priv->individual_manager)) + self->priv->individual_manager) || + (!connected && connecting)) { display_page_message (self, NULL, PAGE_MESSAGE_FLAG_SPINNER); gtk_spinner_start (GTK_SPINNER (self->priv->spinner_loading)); |