Fixed some compilation errors
[modest] / src / modest-tny-account-store.c
index b971bf4..f3384e0 100644 (file)
@@ -251,8 +251,6 @@ get_password (TnyAccount *account, const gchar *prompt, gboolean *cancel)
        
        self = MODEST_TNY_ACCOUNT_STORE (account_store);
         priv = MODEST_TNY_ACCOUNT_STORE_GET_PRIVATE(self);
-
-       g_warning ("prompt: %s", prompt);
        
        /* is it in the hash? if it's already there, it must be wrong... */
        pwd_ptr = (gpointer)&pwd; /* pwd_ptr so the compiler does not complained about
@@ -265,8 +263,7 @@ get_password (TnyAccount *account, const gchar *prompt, gboolean *cancel)
        /* if the password is not already there, try ModestConf */
        if (!already_asked) {
                pwd  = modest_account_mgr_get_string (priv->account_mgr,
-                                                     key, MODEST_ACCOUNT_PASSWORD,
-                                                     TRUE, NULL);
+                                                     key, MODEST_ACCOUNT_PASSWORD,TRUE);
                g_hash_table_insert (priv->password_hash, g_strdup (key), g_strdup (pwd));
        }
 
@@ -285,7 +282,7 @@ get_password (TnyAccount *account, const gchar *prompt, gboolean *cancel)
                        if (remember)
                                modest_account_mgr_set_string (priv->account_mgr,key,
                                                               MODEST_ACCOUNT_PASSWORD,
-                                                              pwd, TRUE, NULL);
+                                                              pwd, TRUE);
                        /* We need to dup the string even knowing that
                           it's already a dup of the contents of an
                           entry, because it if it's wrong, then camel
@@ -298,8 +295,6 @@ get_password (TnyAccount *account, const gchar *prompt, gboolean *cancel)
                }
        } else
                *cancel = FALSE;
-
-       //g_warning ("pwd: '%s', cancel:%s", pwd, *cancel?"yes":"no");
  
        return pwd;
 }
@@ -329,8 +324,7 @@ forget_password (TnyAccount *account)
 
        /* Remove from configuration system */
        modest_account_mgr_unset (priv->account_mgr,
-                                 key, MODEST_ACCOUNT_PASSWORD,
-                                 TRUE, NULL);
+                                 key, MODEST_ACCOUNT_PASSWORD, TRUE);
 }
 
 
@@ -344,7 +338,7 @@ modest_tny_account_store_finalize (GObject *obj)
        priv->cache_dir = NULL;
 
        if (priv->device) {
-               g_object_unref (priv->device);
+               g_object_unref (G_OBJECT(priv->device));
                priv->device = NULL;
        }
        
@@ -354,21 +348,22 @@ modest_tny_account_store_finalize (GObject *obj)
        }
 
        if (priv->account_mgr) {
-               g_object_unref (priv->account_mgr);
+               g_object_unref (G_OBJECT(priv->account_mgr));
                priv->account_mgr = NULL;
        }
-       
-       if (priv->session) {
-               camel_object_unref (CAMEL_OBJECT(priv->session));
-               priv->session = NULL;
-       }
-       
+
        /* this includes the local folder */
        account_list_free (priv->store_accounts);
        priv->store_accounts = NULL;
        
        account_list_free (priv->transport_accounts);
        priv->transport_accounts = NULL;
+
+       if (priv->session) {
+               camel_object_unref (CAMEL_OBJECT(priv->session));
+               priv->session = NULL;
+       }
+       
        
        G_OBJECT_CLASS(parent_class)->finalize (obj);
 }
@@ -438,7 +433,7 @@ get_accounts  (TnyAccountStore *self, TnyList *list, TnyAccountType type)
        
        priv = MODEST_TNY_ACCOUNT_STORE_GET_PRIVATE(self);
  
-       account_names = modest_account_mgr_account_names (priv->account_mgr, NULL);
+       account_names = modest_account_mgr_account_names (priv->account_mgr);
        
        for (cursor = account_names; cursor; cursor = cursor->next) {