From a82dcc2fc27ff9e069c7046c3eaba8768aa6b06c Mon Sep 17 00:00:00 2001 From: David Laban Date: Wed, 14 Apr 2010 15:57:54 +0100 Subject: account-assistant: make impl_signal_apply() behave more like impl_signal_prepare() Fixes b.g.o#615734 current_page only seems to be == PAGE_ENTER_CREATE the first time you visit the page. After that, it has been seen to be 4 or larger. impl_signal_prepare() currently checks for >=, so I'm copying that, and also dealing with refs in the same way. This patch probably probably actually hides a bug in how current_page is set, because I can't see how it should be set >= 4 because the enum only goes up to 3. I'll look into that now, but the patch is tested and works. --- src/empathy-account-assistant.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/empathy-account-assistant.c b/src/empathy-account-assistant.c index f516692b9..9cfea5ab5 100644 --- a/src/empathy-account-assistant.c +++ b/src/empathy-account-assistant.c @@ -901,11 +901,13 @@ impl_signal_apply (GtkAssistant *assistant) FALSE); return; } - else if (current_page == PAGE_ENTER_CREATE && + else if (current_page >= PAGE_ENTER_CREATE && priv->settings != NULL && empathy_account_settings_is_valid (priv->settings)) { account_assistant_apply_account_and_finish (self, priv->settings, TRUE); + g_object_unref (priv->settings); + priv->settings = NULL; } } -- cgit v1.2.3