From 001906b0e9abce56a17f1d422b4920737518dfe0 Mon Sep 17 00:00:00 2001 From: grumbel Date: Wed, 18 Nov 2009 21:31:44 +0000 Subject: [PATCH] Upped tinygettext to r177 Disabled info level messages from tinygettext git-svn-id: http://supertux.lethargik.org/svn/supertux/trunk/supertux@6035 837edb03-e0f3-0310-88ca-d4d4e8b29345 --- src/supertux/language_menu.cpp | 16 ++++++++-------- src/supertux/main.cpp | 6 +++++- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/src/supertux/language_menu.cpp b/src/supertux/language_menu.cpp index ed13ada79..57f270940 100644 --- a/src/supertux/language_menu.cpp +++ b/src/supertux/language_menu.cpp @@ -52,15 +52,15 @@ LanguageMenu::menu_action(MenuItem* item) { if (item->id == MNID_LANGUAGE_AUTO_DETECT) // auto detect { - FL_Locale *locale; - FL_FindLocale(&locale, FL_MESSAGES); - tinygettext::Language language = tinygettext::Language::from_spec(locale->lang, locale->country, locale->variant); - FL_FreeLocale(&locale); + FL_Locale *locale; + FL_FindLocale(&locale, FL_MESSAGES); + tinygettext::Language language = tinygettext::Language::from_spec(locale->lang, locale->country, locale->variant); + FL_FreeLocale(&locale); - dictionary_manager.set_language(language); - g_config->locale = language.str(); - g_config->save(); - Menu::pop_current(); + dictionary_manager.set_language(language); + g_config->locale = language.str(); + g_config->save(); + Menu::pop_current(); } else if (item->id == MNID_LANGUAGE_ENGLISH) // english { diff --git a/src/supertux/main.cpp b/src/supertux/main.cpp index 6bab73244..497987138 100644 --- a/src/supertux/main.cpp +++ b/src/supertux/main.cpp @@ -27,6 +27,8 @@ namespace supertux_apple { } // namespace supertux_apple #endif +#include "tinygettext/log.hpp" + #include "addon/addon_manager.hpp" #include "audio/sound_manager.hpp" #include "binreloc/binreloc.h" @@ -60,6 +62,9 @@ static void init_config() static void init_tinygettext() { + tinygettext::Log::set_log_info_callback(0); + dictionary_manager.set_filesystem(std::auto_ptr(new PhysFSFileSystem)); + dictionary_manager.add_directory("locale"); dictionary_manager.set_charset("UTF-8"); @@ -537,7 +542,6 @@ int supertux_main(int argc, char** argv) Console::instance = new Console(); init_physfs(argv[0]); - dictionary_manager.set_filesystem(std::auto_ptr(new PhysFSFileSystem)); init_sdl(); timelog("controller"); -- 2.11.0