* bugfix: register the new dialog as the new modal dialog; this
[modest] / src / maemo / easysetup / modest-presets.c
index 0a6df35..3ac56dd 100644 (file)
@@ -29,6 +29,7 @@
 
 #include <string.h> /* for strcmp */
 #include "modest-presets.h"
+#include <stdio.h>
 
 /* Include config.h so that _() works: */
 #ifdef HAVE_CONFIG_H
@@ -43,7 +44,7 @@
 #define MODEST_PRESETS_KEY_OUTGOING            "OutgoingMailServer"
 #define MODEST_PRESETS_KEY_MAILBOX_TYPE        "MailboxType"
 #define MODEST_PRESETS_KEY_APOP                "APOPSecureLogin"
-#define MODEST_PRESETS_KEY_SECURE_SMTP         "SecureSMTP"
+#define MODEST_PRESETS_KEY_SECURE_SMTP         "SecureSmtp"
                                                    
 
 ModestPresets*
@@ -62,8 +63,6 @@ modest_presets_new (const gchar *presetfile)
                g_free (presets);
                return NULL;
        }
-
-       /* TODO: Unobfuscate an obfuscated file and then load it with g_key_file_load_from_data() instead. */
        
        if (!g_key_file_load_from_file (presets->keyfile, presetfile,
                                        G_KEY_FILE_NONE, &err)) {
@@ -115,10 +114,12 @@ modest_presets_get_providers  (ModestPresets *self, guint mcc,
        };
                
        /* return *all* providers? */
+       /*
        if (mcc == 0 && include_globals) {
                *provider_ids = all_provider_ids;
                return all_providers;
        }
+       */
        
        /* nope: filter them */
 
@@ -265,24 +266,16 @@ modest_presets_get_info_server_security (ModestPresets *self, const gchar *provi
                                             MODEST_PRESETS_KEY_OUTGOING, NULL);
                if (val) {
                        g_free (val);
-                       info |= MODEST_PRESETS_SECURITY_SECURE_SMTP;
                        
                        val = g_key_file_get_string (self->keyfile, provider_id,
                                                     MODEST_PRESETS_KEY_SECURE_SMTP, NULL);
+                       /* printf("debug: %s: provider_id=%s, secure-smtp val=%s\n", __FUNCTION__, provider_id, val); */
                        if (val && strcmp(val,"true") == 0)
                                info |= MODEST_PRESETS_SECURITY_SECURE_SMTP;
                        g_free(val);
                }
        }
 
-       /* debug */
-/*     g_message ("provider id: %s, apop:%s, secure-incoming:%s, altport: %s, secure-smtp: %s", */
-/*                provider_id, */
-/*                info & MODEST_PRESETS_SECURITY_APOP ? "yes" : "no", */
-/*                info & MODEST_PRESETS_SECURITY_SECURE_INCOMING ? "yes" : "no", */
-/*                info & MODEST_PRESETS_SECURITY_SECURE_INCOMING_ALTERNATE_PORT ? "yes" : "no", */
-/*                info & MODEST_PRESETS_SECURITY_SECURE_SMTP ? "yes" : "no"); */
-
        return info;
 }