diff options
author | Jürg Billeter <j@bitron.ch> | 2011-10-28 13:40:06 +0200 |
---|---|---|
committer | Martyn Russell <martyn@lanedo.com> | 2011-11-01 12:30:39 +0000 |
commit | 8a0d5b9afa05735f2aa91174c9319f1fe1b30e23 (patch) | |
tree | 3a65a04a4f96dd4e66016185ca710e6f65bdd01f | |
parent | 41a81a1ea148de7f730bd42e3b98fef38930504e (diff) | |
download | tracker-8a0d5b9afa05735f2aa91174c9319f1fe1b30e23.tar.gz |
tracker-miner-applications: Add miner_applications_locale_get_current
No functional change.
-rw-r--r-- | 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 41a15a5db..960523f34 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); |