diff options
author | Xavier Claessens <xclaesse@gmail.com> | 2007-10-21 06:07:28 +0800 |
---|---|---|
committer | Xavier Claessens <xclaesse@src.gnome.org> | 2007-10-21 06:07:28 +0800 |
commit | 004e78f70d1088c94bdd00e66c96260abe03cae9 (patch) | |
tree | cffed793486c9322d189fce6c7691186e10c30f2 /libempathy-gtk/empathy-accounts-dialog.c | |
parent | cdd6455b8cacfbc06363e0f3e9737f7cc6e4b640 (diff) | |
download | gsoc2013-empathy-004e78f70d1088c94bdd00e66c96260abe03cae9.tar gsoc2013-empathy-004e78f70d1088c94bdd00e66c96260abe03cae9.tar.gz gsoc2013-empathy-004e78f70d1088c94bdd00e66c96260abe03cae9.tar.bz2 gsoc2013-empathy-004e78f70d1088c94bdd00e66c96260abe03cae9.tar.lz gsoc2013-empathy-004e78f70d1088c94bdd00e66c96260abe03cae9.tar.xz gsoc2013-empathy-004e78f70d1088c94bdd00e66c96260abe03cae9.tar.zst gsoc2013-empathy-004e78f70d1088c94bdd00e66c96260abe03cae9.zip |
To know if an account is connected, use
2007-10-21 Xavier Claessens <xclaesse@gmail.com>
* libempathy-gtk/empathy-account-chooser.c:
* libempathy-gtk/empathy-contact-dialogs.c:
* libempathy-gtk/empathy-contact-widget.c:
* libempathy-gtk/empathy-contact-widget.h:
* libempathy-gtk/empathy-accounts-dialog.c: To know if an account is
connected, use mission_control_get_connection_status() instead of
mission_control_get_connection(). Update account chooser if an account's
status changes or if it get removed.
Move account chooser filter func for add-contact's window from
EmpathyContactWidget to EmpathyContactDialogs.
svn path=/trunk/; revision=384
Diffstat (limited to 'libempathy-gtk/empathy-accounts-dialog.c')
-rw-r--r-- | libempathy-gtk/empathy-accounts-dialog.c | 27 |
1 files changed, 10 insertions, 17 deletions
diff --git a/libempathy-gtk/empathy-accounts-dialog.c b/libempathy-gtk/empathy-accounts-dialog.c index e5635836e..f171664b3 100644 --- a/libempathy-gtk/empathy-accounts-dialog.c +++ b/libempathy-gtk/empathy-accounts-dialog.c @@ -755,28 +755,18 @@ accounts_dialog_status_changed_cb (MissionControl *mc, break; } } - g_object_unref (account); - /* Start to flash account if status is connecting */ - if (status == TP_CONN_STATUS_CONNECTING) { - if (!dialog->connecting_id) { - dialog->connecting_id = g_timeout_add (FLASH_TIMEOUT, - (GSourceFunc) accounts_dialog_flash_connecting_cb, - dialog); - } - - return; - } - - /* Stop to flash if no account is connecting */ + /* Check if there is still accounts in CONNECTING state */ accounts = mc_accounts_list (); for (l = accounts; l; l = l->next) { - McAccount *this_account; + McAccount *this_account; + TelepathyConnectionStatus status; this_account = l->data; - if (mission_control_get_connection_status (mc, this_account, NULL) == TP_CONN_STATUS_CONNECTING) { + status = mission_control_get_connection_status (mc, this_account, NULL); + if (status == TP_CONN_STATUS_CONNECTING) { found = TRUE; break; } @@ -789,8 +779,11 @@ accounts_dialog_status_changed_cb (MissionControl *mc, g_source_remove (dialog->connecting_id); dialog->connecting_id = 0; } - - gtk_widget_show (dialog->window); + if (found && !dialog->connecting_id) { + dialog->connecting_id = g_timeout_add (FLASH_TIMEOUT, + (GSourceFunc) accounts_dialog_flash_connecting_cb, + dialog); + } } static void |