[tracker/tracker-0.12] tracker-miner-fs, applications: Keep track of MLocale-reported locale



commit 0fa6e70eb956e1a0bdba8f90ccf13a4339e85132
Author: Aleksander Morgado <aleksander lanedo com>
Date:   Mon Sep 19 11:05:18 2011 +0200

    tracker-miner-fs, applications: Keep track of MLocale-reported locale
    
    When MeegoTouch libraries are available, we use the MLocale Translation
    catalogue to get translated application names in the Applications Miner.
    
    Until now, we assumed that the language locale in MLocale would be completely
    equal to the one stored in the GConf keys, but this is no longer true; the
    '/meegotouch/i18n/language' key may not hold the country code, while the
    MLocale-reported language now it does (NB#276653). Therefore, it is better to
    keep track of the MLocale-reported locale instead of the GConf-retrieved one.
    
    Fixes NB#282957

 src/miners/fs/tracker-miner-applications-locale.c |   23 ++++----------------
 1 files changed, 5 insertions(+), 18 deletions(-)
---
diff --git a/src/miners/fs/tracker-miner-applications-locale.c b/src/miners/fs/tracker-miner-applications-locale.c
index e67dea4..41a15a5 100644
--- a/src/miners/fs/tracker-miner-applications-locale.c
+++ b/src/miners/fs/tracker-miner-applications-locale.c
@@ -92,26 +92,13 @@ tracker_miner_applications_locale_changed (void)
 	                             NULL);
 	filename = g_build_filename (data_dir, TRACKER_MINER_APPLICATIONS_LOCALE_FILE, NULL);
 
+#ifdef HAVE_MEEGOTOUCH
+	/* If we have meegotouch enabled, take the correct locale as the one from
+	 * meegotouch. */
+	current_locale = tracker_miner_applications_meego_get_locale ();
+#else
 	/* Get current tracker LANG locale */
 	current_locale = tracker_locale_get (TRACKER_LOCALE_LANGUAGE);
-
-#ifdef HAVE_MEEGOTOUCH
-	/* If we have meegotouch enabled, sanity check to compare with our
-	 * tracker locale */
-	{
-		/* Get also current meegotouch locale, which should be EQUAL to
-		 * the tracker locale */
-		gchar *current_mlocale;
-
-		current_mlocale = tracker_miner_applications_meego_get_locale ();
-
-		if (g_strcmp0 (current_locale, current_mlocale) != 0) {
-			g_critical ("Wrong locale settings (tracker locale '%s' vs MLocale '%s')",
-			            current_locale, current_mlocale);
-		}
-
-		g_free (current_mlocale);
-	}
 #endif
 
 	/* Get previous locale */



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]