summaryrefslogtreecommitdiff
path: root/src/gui/setup_theme.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/setup_theme.cpp')
-rw-r--r--src/gui/setup_theme.cpp33
1 files changed, 4 insertions, 29 deletions
diff --git a/src/gui/setup_theme.cpp b/src/gui/setup_theme.cpp
index d4a1d5652..7386f496a 100644
--- a/src/gui/setup_theme.cpp
+++ b/src/gui/setup_theme.cpp
@@ -29,10 +29,11 @@
#include "gui/widgets/button.h"
#include "gui/widgets/checkbox.h"
+#include "gui/widgets/dropdown.h"
#include "gui/widgets/label.h"
#include "gui/widgets/layouthelper.h"
+#include "gui/widgets/namesmodel.h"
#include "gui/widgets/textfield.h"
-#include "gui/widgets/dropdown.h"
#include "configuration.h"
#include "localplayer.h"
@@ -53,32 +54,6 @@ const char* ACTION_HELP_FONT = "help font";
const char* ACTION_SECURE_FONT = "secure font";
const char* ACTION_JAPAN_FONT = "japan font";
-class NamesModel : public gcn::ListModel
-{
-public:
- NamesModel()
- {
- }
-
- virtual ~NamesModel() { }
-
- virtual int getNumberOfElements()
- {
- return static_cast<int>(mNames.size());
- }
-
- virtual std::string getElementAt(int i)
- {
- if (i >= getNumberOfElements() || i < 0)
- return _("???");
-
- return mNames[i];
- }
-
-protected:
- std::vector<std::string> mNames;
-};
-
class ThemesModel : public NamesModel
{
public:
@@ -374,8 +349,8 @@ void Setup_Theme::apply()
if (config.getValue("theme",
config.getValue("selectedSkin", "")) != mTheme)
{
- new OkDialog(_("Theme Changed"),
- _("Restart your client for the change to take effect."));
+ new OkDialog(_("Theme Changed"), _("Restart your client for "
+ "the change to take effect."));
}
config.setValue("selectedSkin", "");