From 88dce37e55491ec916fef8fe6cf082c88fcd0550 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 20 May 2013 20:58:38 +0300 Subject: improve theme setup page. --- src/gui/setup_theme.cpp | 13 +++++++------ src/gui/setup_theme.h | 4 ++-- 2 files changed, 9 insertions(+), 8 deletions(-) (limited to 'src/gui') 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; -- cgit v1.2.3-70-g09d2