(decide at runtime); this depends on the changes done in modest-providers-data
* include maemo-provider-data in modest, no more separate maemo-providers-data package
* check for DISPLAY to give a better error message at startup
* inform user if 'showui' is not provided
pmo-trunk-r3693
$(MODEST_GSTUFF_LIBS) \
$(MODEST_PLATFORM_LIBS)
-# mcc_mapping will in future be provided by the operator-wizard-settings package:
+# mcc_mapping may be provided by the operator-wizard-settings package:
+# the one here is a copy, as that package is not available in chinook
MMC_MAPPING_FILE=mcc_mapping
mmccmappingdir=$(datadir)/modest/provider-data
mmccmapping_DATA = $(MMC_MAPPING_FILE)
+PROVIDER_DATA_FILE=maemo-provider-data.keyfile
+providerdatadir=$(datadir)/modest/provider-data
+providerdata_DATA = $(PROVIDER_DATA_FILE)
+
EXTRA_DIST=\
- $(MMC_MAPPING_FILE)
+ $(MMC_MAPPING_FILE) \
+ $(PROVIDER_DATA_FILE)
--- /dev/null
+#
+# This file is part of maemo-providers-data
+#
+[aim.com]
+Name=AIM
+MCC=0
+Domain=aim.com
+OutgoingMailServer=smtp.aim.com
+IncomingMailServer=imap.aim.com
+IncomingSecurity=0
+MailboxType=imap
+[aol.com]
+Name=AOL
+MCC=0
+Domain=aol.com
+OutgoingMailServer=smtp.aol.com
+IncomingMailServer=imap.aol.com
+IncomingSecurity=0
+MailboxType=imap
+[gmail.com]
+Name=Gmail
+MCC=0
+Domain=gmail.com
+OutgoingMailServer=smtp.gmail.com
+SecureSmtp=true
+IncomingMailServer=pop.gmail.com
+IncomingSecurity=2
+MailboxType=pop
+[lycos.com]
+Name=Lycos Mail
+MCC=0
+Domain=lcyos.com
+OutgoingMailServer=smtp.mail.lycos.com
+IncomingMailServer=pop.mail.lycos.com
+IncomingSecurity=0
+MailboxType=pop
+[hotmail.com]
+Name=Hotmail
+MCC=0
+Domain=hotmail.com
+OutgoingMailServer=mail.hotmail.com
+IncomingMailServer=smtp.hotmail.com
+IncomingSecurity=0
+MailboxType=pop
+[yahoo.com]
+Name=Yahoo Mail Plus
+MCC=0
+Domain=yahoo.com
+OutgoingMailServer=smtp.mail.yahoo.com
+IncomingMailServer=pop.mail.yahoo.com
+IncomingSecurity=0
+MailboxType=pop
+[TinymailImap]
+Name=TinymailIMAP
+MCC=206
+Domain=tinymail.org
+IncomingMailServer=imap1.tinymail.org
+IncomingSecurity=0
+MailboxType=imap
+[TinymailPop]
+Name=TinymailPOP
+MCC=206
+Domain=tinymail.org
+IncomingMailServer=imap1.tinymail.org
+IncomingSecurity=0
+MailboxType=pop
+
if (priv->dirty) {
GtkDialog *dialog = GTK_DIALOG (hildon_note_new_confirmation (GTK_WINDOW (self),
_("imum_nc_wizard_confirm_lose_changes")));
- /* TODO: These button names will be ambiguous, and not specified in the UI specification. */
+ /* TODO: These button names will be ambiguous, and not
+ * specified in the UI specification. */
const gint dialog_response = gtk_dialog_run (dialog);
self->combo_account_country = NULL;
gint mcc = easysetup_country_combo_box_get_active_country_mcc (
EASYSETUP_COUNTRY_COMBO_BOX (self->combo_account_country));
easysetup_provider_combo_box_fill (
- EASYSETUP_PROVIDER_COMBO_BOX (self->combo_account_serviceprovider), priv->presets, mcc);
+ EASYSETUP_PROVIDER_COMBO_BOX (self->combo_account_serviceprovider),
+ priv->presets, mcc);
}
g_object_unref (idle_data->dialog);
ModestPresets *presets = NULL;
IdleData *idle_data;
- const gchar* filepath = MODEST_PROVIDERS_DATA_PATH; /* Defined in config.h */
- presets = modest_presets_new (filepath);
- if (!(presets)) {
- g_warning ("Could not locate the official provider data keyfile from %s", filepath);
+ const gchar* path = NULL;
+ const gchar* path1 = MODEST_PROVIDER_DATA_FILE;
+ const gchar* path2 = MODEST_MAEMO_PROVIDER_DATA_FILE;
+
+ if (access(path1, R_OK) == 0)
+ path = path1;
+ else if (access(path2, R_OK) == 0)
+ path = path2;
+ else {
+ g_warning ("%s: neither '%s' nor '%s' is a readable provider data file",
+ __FUNCTION__, path1, path2);
+ return NULL;
}
+ presets = modest_presets_new (path);
+ if (!presets) {
+ g_warning ("%s: failed to parse '%s'", __FUNCTION__, path);
+ return NULL;
+ }
+
idle_data = g_new0 (IdleData, 1);
idle_data->dialog = self;
idle_data->presets = presets;
-
- g_idle_add (presets_idle, idle_data);
+
+ g_idle_add (presets_idle, idle_data);
return NULL;
}
FILE* result;
const gchar* path;
- const gchar* path1 = MODEST_OPERATOR_WIZARD_PROVIDER_DATA_DIR;
- const gchar* path2 = MODEST_PROVIDER_DATA_DIR;
+ const gchar* path1 = MODEST_OPERATOR_WIZARD_MCC_MAPPING;
+ const gchar* path2 = MODEST_MCC_MAPPING;
if (access(path1, R_OK) == 0)
path = path1;
return FALSE;
} else
fclose (mcc_file);
-
- if (access (MODEST_PROVIDERS_DATA_PATH, R_OK) != 0) {
+
+ if (access(MODEST_PROVIDER_DATA_FILE, R_OK) != 0 &&
+ access(MODEST_MAEMO_PROVIDER_DATA_FILE, R_OK) != 0) {
g_printerr ("modest: cannot find providers data\n");
return FALSE;
}
-
+
return TRUE;
}
#define MODEST_CONF_NAMESPACE "/apps/modest"
/* the mapping files, there are two possibilities; used in modest_maemo_open_mcc_mapping_file */
-#define MODEST_PROVIDER_DATA_DIR PREFIX "/share/modest/provider-data/mcc_mapping"
-#define MODEST_OPERATOR_WIZARD_PROVIDER_DATA_DIR "/usr/share/operator-wizard/mcc_mapping"
+#define MODEST_MCC_MAPPING PREFIX "/share/modest/provider-data/mcc_mapping"
+#define MODEST_OPERATOR_WIZARD_MCC_MAPPING "/usr/share/operator-wizard/mcc_mapping"
+#define MODEST_PROVIDER_DATA_FILE PREFIX "/share/modest/provider-data/modest-provider-data.keyfile"
+#define MODEST_MAEMO_PROVIDER_DATA_FILE PREFIX "/share/modest/provider-data/maemo-provider-data.keyfile"
/* configuration key definitions for modest */
#define MODEST_ACCOUNT_NAMESPACE MODEST_CONF_NAMESPACE "/accounts"
if (strcmp (argv[1], "showui") == 0)
show_ui_without_top_application_method = TRUE;
}
+
+ if (!show_ui_without_top_application_method) {
+ g_print ("modest: not showing UI\n");
+ g_print ("modest: use 'modest showui' to start with UI\n");
+ }
if (!g_thread_supported())
g_thread_init (NULL);
gdk_threads_init ();
gdk_threads_enter ();
+ if (!getenv("DISPLAY")) {
+ g_printerr ("modest: DISPLAY env variable is not set\n");
+ retval = 1;
+ goto cleanup;
+ }
+
if (!gtk_init_check (&argc, &argv)) {
g_printerr ("modest: failed to initialize gtk\n");
retval = 1;