[empathy/gnome-2-30] account-assistant: make impl_signal_apply() behave more like impl_signal_prepare()



commit 8e97af466c5385b3fe0f8a16195fe9cdcca2af8c
Author: David Laban <david laban collabora co uk>
Date:   Wed Apr 14 15:57:54 2010 +0100

    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 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/src/empathy-account-assistant.c b/src/empathy-account-assistant.c
index f516692..9cfea5a 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;
     }
 }
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]