From 001c1043c2670229dc379edf90d6f9041371d0d7 Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Fri, 22 Jan 2010 14:15:48 +0000 Subject: Fix account creation regression Each time we add a new account, a new page is added to the assistant. So checking if id equal PAGE_ENTER_CREATE is not enough as the next pages will have an id greater than that. --- src/empathy-account-assistant.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/empathy-account-assistant.c b/src/empathy-account-assistant.c index 964b69154..042e433f5 100644 --- a/src/empathy-account-assistant.c +++ b/src/empathy-account-assistant.c @@ -849,12 +849,17 @@ impl_signal_apply (GtkAssistant *assistant) current_page = gtk_assistant_get_current_page (assistant); - if (current_page == PAGE_ENTER_CREATE) + if (current_page == PAGE_SALUT) + { + if (priv->create_salut_account) + account_assistant_apply_account_and_finish (self, priv->salut_settings); + return; + } + + if (current_page >= PAGE_ENTER_CREATE) account_assistant_apply_account_and_finish (self, priv->settings); else if (current_page == PAGE_IMPORT) empathy_import_widget_add_selected_accounts (priv->iw); - else if (current_page == PAGE_SALUT && priv->create_salut_account) - account_assistant_apply_account_and_finish (self, priv->salut_settings); } static void @@ -873,7 +878,7 @@ impl_signal_prepare (GtkAssistant *assistant, current_idx = gtk_assistant_get_current_page (assistant); - if (current_idx == PAGE_ENTER_CREATE) + if (current_idx >= PAGE_ENTER_CREATE && current_idx != PAGE_SALUT) { if (!priv->enter_create_forward) { -- cgit v1.2.3