X-Git-Url: http://git.maemo.org/git/?p=modest;a=blobdiff_plain;f=src%2Fmodest-init.c;h=619b31e90fab4c8f5b4312fd6d8b8f058aabe2bd;hp=f313ed7062e8ae03645c754d3bf04904f00db868;hb=800a2c925d5b3fbbf2937cd2066a4f694f7cd741;hpb=c5e2714e23c9d314a57b3e5769286f9014fb8d82 diff --git a/src/modest-init.c b/src/modest-init.c index f313ed7..619b31e 100644 --- a/src/modest-init.c +++ b/src/modest-init.c @@ -277,6 +277,9 @@ modest_init_uninit (void) if (!modest_runtime_uninit()) g_printerr ("modest: failed to uninit runtime\n"); + if (!modest_platform_uninit()) + g_printerr ("modest: failed to uninit platform\n"); + _is_initialized = FALSE; return TRUE; } @@ -523,9 +526,9 @@ init_debug_g_type (void) gflags = 0; mflags = modest_runtime_get_debug_flags (); - if (mflags & MODEST_RUNTIME_DEBUG_DEBUG_OBJECTS) + if (mflags & MODEST_RUNTIME_DEBUG_OBJECTS) gflags |= G_TYPE_DEBUG_OBJECTS; - if (mflags & MODEST_RUNTIME_DEBUG_DEBUG_SIGNALS) + if (mflags & MODEST_RUNTIME_DEBUG_SIGNALS) gflags |= G_TYPE_DEBUG_SIGNALS; g_type_init_with_debug_flags (gflags); @@ -548,15 +551,23 @@ static void init_i18n (void) { const gchar* gettext_package; - /* Setup gettext, to use our .po files: */ - /* GETTEXT_PACKAGE and MODEST_LOCALE_DIR are defined in config.h */ -/* #ifdef MODEST_HILDON_VERSION_0 */ -/* gettext_package = GETTEXT_PACKAGE; */ -/* bindtextdomain (gettext_package, MODEST_LOCALE_DIR); */ -/* #else */ -/* gettext_package = "osso-email"; /\* HACK to use the localizations *\/ */ -/* bindtextdomain (gettext_package, "/usr/share/locale"); */ -/* #endif /\*MODEST_HILDON_VERSION_0*\/ */ + +#ifdef MODEST_PLATFORM_MAEMO + /* little trick make en_GB the fallback language, instead + * of the logical IDs + * we need the ugly ifdefs, because modest_platform_init is + * too late. + */ + const gchar *lang = getenv ("LANG"); + if (!lang) + setenv ("LANGUAGE", "en_GB", 1); + else { + gchar *language = g_strdup_printf ("%s:en_GB", lang); + setenv ("LANGUAGE", language, 1); + g_free (language); + } + /* end of little trick */ +#endif /*MODEST_PLATFORM_MAEMO */ gettext_package = GETTEXT_PACKAGE;