summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-05-20 20:58:38 +0300
committerAndrei Karas <akaras@inbox.ru>2013-05-21 00:02:09 +0300
commit88dce37e55491ec916fef8fe6cf082c88fcd0550 (patch)
treea4b71bc72dbfd4f3bdf5dd71380ef85675066650
parent47b0f6027337245e4331256df32a2896328e29a1 (diff)
downloadmanaplus-88dce37e55491ec916fef8fe6cf082c88fcd0550.tar.gz
manaplus-88dce37e55491ec916fef8fe6cf082c88fcd0550.tar.bz2
manaplus-88dce37e55491ec916fef8fe6cf082c88fcd0550.tar.xz
manaplus-88dce37e55491ec916fef8fe6cf082c88fcd0550.zip
improve theme setup page.
-rw-r--r--src/gui/setup_theme.cpp13
-rw-r--r--src/gui/setup_theme.h4
2 files changed, 9 insertions, 8 deletions
diff --git a/src/gui/setup_theme.cpp b/src/gui/setup_theme.cpp
index e62f38608..8002ceff8 100644
--- a/src/gui/setup_theme.cpp
+++ b/src/gui/setup_theme.cpp
@@ -122,10 +122,10 @@ public:
virtual ~FontSizeChoiceListModel()
{ }
- virtual int getNumberOfElements()
+ virtual int getNumberOfElements() override A_WARN_UNUSED
{ return maxFontSizes; }
- virtual std::string getElementAt(int i)
+ virtual std::string getElementAt(int i) override A_WARN_UNUSED
{
if (i >= getNumberOfElements() || i < 0)
return "???";
@@ -303,14 +303,13 @@ Setup_Theme::Setup_Theme(const Widget2 *const widget) :
mNpcFontSizeDropDown->setSelected(mNpcFontSize - 9);
mNpcFontSizeDropDown->adjustHeight();
- std::string skin = Theme::getThemeName();
+ const std::string skin = Theme::getThemeName();
if (!skin.empty())
mThemeDropDown->setSelectedString(skin);
else
mThemeDropDown->setSelected(0);
const std::string str = config.getStringValue("lang");
-
for (int f = 0; f < langs_count; f ++)
{
if (LANG_NAME[f].value == str)
@@ -392,8 +391,10 @@ void Setup_Theme::updateInfo()
mInfo = Theme::loadInfo(mTheme);
if (mInfo)
{
- mThemeInfo = std::string("Name: ").append(mInfo->name)
- .append("\nCopyright:\n").append(mInfo->copyright);
+ // TRANSLATORS: theme info dialog
+ mThemeInfo = std::string(_("Name: ")).append(mInfo->name)
+ .append("\n").append(_("Copyright:")).append("\n")
+ .append(mInfo->copyright);
}
else
{
diff --git a/src/gui/setup_theme.h b/src/gui/setup_theme.h
index 6b7358b75..9acfb0b1f 100644
--- a/src/gui/setup_theme.h
+++ b/src/gui/setup_theme.h
@@ -43,9 +43,9 @@ class Setup_Theme final : public SetupTab
~Setup_Theme();
- void apply();
+ void apply() override;
- void cancel();
+ void cancel() override;
void action(const gcn::ActionEvent &event) override;