]> git.0d.be Git - empathy.git/blobdiff - libempathy/empathy-account-settings.c
debug-window: fix typo
[empathy.git] / libempathy / empathy-account-settings.c
index ee0cb34604df687ee15bccaaa82d412cde6376de..12b28b8ba245dd9eee6d549b50467aa8040198ea 100644 (file)
 
 #include "config.h"
 
-#include <stdio.h>
-#include <stdlib.h>
-
-#include <telepathy-glib/account-manager.h>
-#include <telepathy-glib/util.h>
-#include <telepathy-glib/interfaces.h>
-#include <telepathy-glib/gtypes.h>
-
 #include "empathy-account-settings.h"
 #include "empathy-connection-managers.h"
 #include "empathy-keyring.h"
@@ -81,7 +73,6 @@ struct _EmpathyAccountSettingsPriv
   gboolean ready;
 
   gboolean supports_sasl;
-  gboolean password_changed;
   gboolean remember_password;
 
   gchar *password;
@@ -833,7 +824,6 @@ empathy_account_settings_unset (EmpathyAccountSettings *settings,
     {
       g_free (priv->password);
       priv->password = NULL;
-      priv->password_changed = TRUE;
       return;
     }
 
@@ -851,7 +841,6 @@ empathy_account_settings_discard_changes (EmpathyAccountSettings *settings)
   g_hash_table_remove_all (priv->parameters);
   empathy_account_settings_free_unset_parameters (settings);
 
-  priv->password_changed = FALSE;
   g_free (priv->password);
   priv->password = g_strdup (priv->password_original);
 
@@ -1073,7 +1062,6 @@ empathy_account_settings_set (EmpathyAccountSettings *settings,
     {
       g_free (priv->password);
       priv->password = g_variant_dup_string (v, NULL);
-      priv->password_changed = TRUE;
     }
   else
     {
@@ -1336,9 +1324,14 @@ empathy_account_settings_account_updated (GObject *source,
       goto out;
     }
 
-  /* Only set the password in the keyring if the CM supports SASL and
-   * it's changed. */
-  if (priv->supports_sasl && priv->password_changed)
+  update_account_uri_schemes (settings);
+  update_account_service (settings);
+
+  g_simple_async_result_set_op_res_gboolean (priv->apply_result,
+      g_strv_length (reconnect_required) > 0);
+
+  /* Only set the password in the keyring if the CM supports SASL. */
+  if (priv->supports_sasl)
     {
       if (priv->password != NULL)
         {
@@ -1358,12 +1351,6 @@ empathy_account_settings_account_updated (GObject *source,
       return;
     }
 
-  update_account_uri_schemes (settings);
-  update_account_service (settings);
-
-  g_simple_async_result_set_op_res_gboolean (priv->apply_result,
-      g_strv_length (reconnect_required) > 0);
-
 out:
   empathy_account_settings_discard_changes (settings);