summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/CMakeLists.txt1
-rw-r--r--src/Makefile.am1
-rw-r--r--src/gui/models/themesmodel.h45
-rw-r--r--src/gui/widgets/tabs/setup_theme.cpp15
4 files changed, 48 insertions, 14 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index d48d8b50e..af1191eee 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -230,6 +230,7 @@ SET(SRCS
gui/models/tablemodel.h
gui/models/touchactionmodel.cpp
gui/models/touchactionmodel.h
+ gui/models/themesmodel.h
gui/widgets/tabstrip.cpp
gui/widgets/tabstrip.h
gui/widgets/textbox.cpp
diff --git a/src/Makefile.am b/src/Makefile.am
index 45576ab99..733c470d0 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -326,6 +326,7 @@ manaplus_SOURCES += gui/widgets/avatarlistbox.cpp \
gui/models/tablemodel.h \
gui/models/touchactionmodel.cpp \
gui/models/touchactionmodel.h \
+ gui/models/themesmodel.h \
gui/widgets/tabstrip.cpp \
gui/widgets/tabstrip.h \
gui/widgets/textbox.cpp \
diff --git a/src/gui/models/themesmodel.h b/src/gui/models/themesmodel.h
new file mode 100644
index 000000000..b8b9dbae6
--- /dev/null
+++ b/src/gui/models/themesmodel.h
@@ -0,0 +1,45 @@
+/*
+ * The ManaPlus Client
+ * Copyright (C) 2009-2010 Andrei Karas
+ * Copyright (C) 2011-2014 The ManaPlus Developers
+ *
+ * This file is part of The ManaPlus Client.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GUI_MODELS_THEMESMODEL_H
+#define GUI_MODELS_THEMESMODEL_H
+
+#include "gui/models/namesmodel.h"
+
+#include "utils/gettext.h"
+
+#include "debug.h"
+
+class ThemesModel final : public NamesModel
+{
+ public:
+ ThemesModel() :
+ NamesModel()
+ {
+ mNames.push_back(gettext("(default)"));
+ Theme::fillSkinsList(mNames);
+ }
+
+ ~ThemesModel()
+ { }
+};
+
+#endif // GUI_MODELS_THEMESMODEL_H
diff --git a/src/gui/widgets/tabs/setup_theme.cpp b/src/gui/widgets/tabs/setup_theme.cpp
index 99deda940..7f2804c2f 100644
--- a/src/gui/widgets/tabs/setup_theme.cpp
+++ b/src/gui/widgets/tabs/setup_theme.cpp
@@ -28,6 +28,7 @@
#include "gui/models/extendedlistmodel.h"
#include "gui/models/namesmodel.h"
+#include "gui/models/themesmodel.h"
#include "gui/widgets/button.h"
#include "gui/widgets/dropdown.h"
@@ -54,20 +55,6 @@ const char* ACTION_JAPAN_FONT = "japanese font";
const char* ACTION_CHINA_FONT = "chinese font";
const char* ACTION_INFO = "info";
-class ThemesModel final : public NamesModel
-{
-public:
- ThemesModel() :
- NamesModel()
- {
- mNames.push_back(gettext("(default)"));
- Theme::fillSkinsList(mNames);
- }
-
- ~ThemesModel()
- { }
-};
-
class FontsModel final : public NamesModel
{
public: