2007-04-17 Murray Cumming <murrayc@murrayc.com>
authorMurray Cumming <murrayc@murrayc.com>
Tue, 17 Apr 2007 16:49:15 +0000 (16:49 +0000)
committerMurray Cumming <murrayc@murrayc.com>
Tue, 17 Apr 2007 16:49:15 +0000 (16:49 +0000)
* src/modest-account-mgr.c:
        (modest_account_mgr_add_server_account): Set the security and secure-auth
        options, and add a comment saying that the other camel-specific options should be
        removed in future.

pmo-trunk-r1575

ChangeLog2
src/maemo/easysetup/modest-easysetup-wizard.c
src/modest-account-mgr.c

index dcd4b74..b635ca1 100644 (file)
@@ -1,5 +1,12 @@
 2007-04-17  Murray Cumming  <murrayc@murrayc.com>
 
+       * src/modest-account-mgr.c:
+       (modest_account_mgr_add_server_account): Set the security and secure-auth 
+       options, and add a comment saying that the other camel-specific options should be 
+       removed in future.
+
+2007-04-17  Murray Cumming  <murrayc@murrayc.com>
+
        * src/maemo/modest-account-settings-dialog.c: (check_data): Always return something, 
        found by valgrind.
        * src/modest-tny-account-store.c: (account_list_free),
index 744a719..0039ffd 100644 (file)
@@ -1273,7 +1273,7 @@ create_account (ModestEasysetupWizardDialog *self)
        /* Sanity check: */
        /* There must be at least one account now: */
        GSList *account_names = modest_account_mgr_account_names (self->account_manager);
-       if(account_names != NULL)
+       if(!account_names)
        {
                g_warning ("modest_account_mgr_account_names() returned NULL after adding an account.");
        }
index 82dd892..a0b1a04 100644 (file)
@@ -410,6 +410,10 @@ modest_account_mgr_add_server_account (ModestAccountMgr * self,
                option_list = g_slist_append (option_list, MODEST_ACCOUNT_OPTION_USE_LSUB);
                option_list = g_slist_append (option_list, MODEST_ACCOUNT_OPTION_CHECK_ALL);
 
+               /* TODO: Remove this hack. These are hard-coded camel options to make the connection work.
+                * The regular connection options (set later here) should be interpreted instead 
+                * because in future these camel options will not be in gconf. murrayc.
+                */
                /* Security options */
                switch (security) {
                case MODEST_PROTOCOL_SECURITY_NONE:
@@ -434,6 +438,11 @@ modest_account_mgr_add_server_account (ModestAccountMgr * self,
                }
                g_slist_free (option_list);
                g_free (key);
+               
+               
+               /* Add the security and secure-auth settings: */
+               modest_server_account_set_option_security (self, name, security);
+               modest_server_account_set_option_secure_auth (self, name, auth);
        }
 
 cleanup: