diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-10-18 14:37:36 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-10-18 14:49:53 +0300 |
commit | be7d563ba1e0b20cfe397f2cf4da6f7e3df78d22 (patch) | |
tree | f26591cf82914d30853a1a0d556742c5ec801de8 /src/gui/setup_theme.cpp | |
parent | 9f89a15fbcaf3f24f4c941b7061979e424d6384a (diff) | |
download | manaplus-be7d563ba1e0b20cfe397f2cf4da6f7e3df78d22.tar.gz manaplus-be7d563ba1e0b20cfe397f2cf4da6f7e3df78d22.tar.bz2 manaplus-be7d563ba1e0b20cfe397f2cf4da6f7e3df78d22.tar.xz manaplus-be7d563ba1e0b20cfe397f2cf4da6f7e3df78d22.zip |
Simplify reading values from config.
Diffstat (limited to 'src/gui/setup_theme.cpp')
-rw-r--r-- | src/gui/setup_theme.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/gui/setup_theme.cpp b/src/gui/setup_theme.cpp index 5d34066e1..1886405be 100644 --- a/src/gui/setup_theme.cpp +++ b/src/gui/setup_theme.cpp @@ -163,7 +163,7 @@ Setup_Theme::Setup_Theme() : mThemeLabel(new Label(_("Gui theme"))), mThemesModel(new ThemesModel), mThemeDropDown(new DropDown(mThemesModel)), - mTheme(config.getValue("theme", config.getValue("selectedSkin", ""))), + mTheme(config.getStringValue("theme")), mFontsModel(new FontsModel), mFontLabel(new Label(_("Main Font"))), mFontDropDown(new DropDown(mFontsModel)), @@ -344,7 +344,7 @@ void Setup_Theme::action(const gcn::ActionEvent &event) void Setup_Theme::cancel() { - mTheme = config.getValue("theme", config.getValue("selectedSkin", "")); + mTheme = config.getStringValue("theme"); mLang = config.getStringValue("lang"); mFont = getFileName(config.getStringValue("font")); mBoldFont = getFileName(config.getStringValue("boldFont")); @@ -356,8 +356,7 @@ void Setup_Theme::cancel() void Setup_Theme::apply() { - if (config.getValue("theme", - config.getValue("selectedSkin", "")) != mTheme) + if (config.getStringValue("theme") != mTheme) { new OkDialog(_("Theme Changed"), _("Restart your client for " "the change to take effect.")); |