[tracker: 1/4] tracker-miner-applications: Add miner_applications_locale_get_current



commit e33f9d95dfb3531279f2f61452f351624f41564e
Author: JÃrg Billeter <j bitron ch>
Date:   Fri Oct 28 13:40:06 2011 +0200

    tracker-miner-applications: Add miner_applications_locale_get_current
    
    No functional change.

 src/miners/fs/tracker-miner-applications-locale.c |   26 ++++++++++++++------
 1 files changed, 18 insertions(+), 8 deletions(-)
---
diff --git a/src/miners/fs/tracker-miner-applications-locale.c b/src/miners/fs/tracker-miner-applications-locale.c
index 41a15a5..960523f 100644
--- a/src/miners/fs/tracker-miner-applications-locale.c
+++ b/src/miners/fs/tracker-miner-applications-locale.c
@@ -57,6 +57,23 @@ miner_applications_locale_get_previous (const gchar *locale_file)
 	return locale;
 }
 
+static gchar *
+miner_applications_locale_get_current (void)
+{
+	gchar *current_locale;
+
+#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);
+#endif
+
+	return current_locale;
+}
+
 static void
 miner_applications_locale_set_current (const gchar *locale_file,
                                        const gchar *locale)
@@ -92,14 +109,7 @@ 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);
-#endif
+	current_locale = miner_applications_locale_get_current ();
 
 	/* Get previous locale */
 	previous_locale = miner_applications_locale_get_previous (filename);



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