[empathy] Fix account creation regression
- From: Guillaume Desmottes <gdesmott src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [empathy] Fix account creation regression
- Date: Mon, 25 Jan 2010 14:15:23 +0000 (UTC)
commit 001c1043c2670229dc379edf90d6f9041371d0d7
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date: Fri Jan 22 14:15:48 2010 +0000
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 files changed, 9 insertions(+), 4 deletions(-)
---
diff --git a/src/empathy-account-assistant.c b/src/empathy-account-assistant.c
index 964b691..042e433 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)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]