diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2010-08-26 20:33:03 +0800 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2010-08-26 20:42:55 +0800 |
commit | 77a7caeaf8ce5d3c83b8f61d9eea6efe15c5886f (patch) | |
tree | 0c0bbc86d8ce5e625e9cad03496f7b1c766425c6 /src | |
parent | 2de3bc4c03f97f1ceea44f43a1b86dedcb7e6893 (diff) | |
download | gsoc2013-empathy-77a7caeaf8ce5d3c83b8f61d9eea6efe15c5886f.tar gsoc2013-empathy-77a7caeaf8ce5d3c83b8f61d9eea6efe15c5886f.tar.gz gsoc2013-empathy-77a7caeaf8ce5d3c83b8f61d9eea6efe15c5886f.tar.bz2 gsoc2013-empathy-77a7caeaf8ce5d3c83b8f61d9eea6efe15c5886f.tar.lz gsoc2013-empathy-77a7caeaf8ce5d3c83b8f61d9eea6efe15c5886f.tar.xz gsoc2013-empathy-77a7caeaf8ce5d3c83b8f61d9eea6efe15c5886f.tar.zst gsoc2013-empathy-77a7caeaf8ce5d3c83b8f61d9eea6efe15c5886f.zip |
accounts-dialog: insensitive 'add' and 'import' buttons while loading (#624353)
Diffstat (limited to 'src')
-rw-r--r-- | src/empathy-accounts-dialog.c | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/src/empathy-accounts-dialog.c b/src/empathy-accounts-dialog.c index c753a9f20..d97cf6507 100644 --- a/src/empathy-accounts-dialog.c +++ b/src/empathy-accounts-dialog.c @@ -1860,6 +1860,15 @@ accounts_dialog_set_selected_account (EmpathyAccountsDialog *dialog, } static void +finished_loading (EmpathyAccountsDialog *self) +{ + EmpathyAccountsDialogPriv *priv = GET_PRIV (self); + + gtk_widget_set_sensitive (priv->button_add, TRUE); + gtk_widget_set_sensitive (priv->button_import, TRUE); +} + +static void accounts_dialog_cms_prepare_cb (GObject *source, GAsyncResult *result, gpointer user_data) @@ -1869,7 +1878,7 @@ accounts_dialog_cms_prepare_cb (GObject *source, EmpathyAccountsDialogPriv *priv = GET_PRIV (dialog); if (!empathy_connection_managers_prepare_finish (cms, result, NULL)) - return; + goto out; accounts_dialog_update_settings (dialog, NULL); @@ -1879,6 +1888,9 @@ accounts_dialog_cms_prepare_cb (GObject *source, g_object_unref (priv->initial_selection); priv->initial_selection = NULL; } + +out: + finished_loading (dialog); } static void @@ -2023,9 +2035,13 @@ accounts_dialog_build_ui (EmpathyAccountsDialog *dialog) gtk_widget_hide (priv->button_remove); #endif /* HAVE_MEEGO */ - /* Remove button is unsensitive until we have a selected account */ + /* Remove button is insensitive until we have a selected account */ gtk_widget_set_sensitive (priv->button_remove, FALSE); + /* Add and Import buttons are insensitive while the dialog is loading */ + gtk_widget_set_sensitive (priv->button_add, FALSE); + gtk_widget_set_sensitive (priv->button_import, FALSE); + priv->combobox_protocol = empathy_protocol_chooser_new (); gtk_box_pack_start (GTK_BOX (priv->hbox_protocol), priv->combobox_protocol, TRUE, TRUE, 0); |