summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-08-22 16:57:15 +0300
committerAndrei Karas <akaras@inbox.ru>2014-08-22 17:02:21 +0300
commit02f6190bfd37903a0ad95226587cf4473b88332f (patch)
tree3e5904240f9b7ee406aa58c7ed25e296328d75d8 /src
parentd08851e587ad9390a38bd5d6a28252714a71ae14 (diff)
downloadplus-02f6190bfd37903a0ad95226587cf4473b88332f.tar.gz
plus-02f6190bfd37903a0ad95226587cf4473b88332f.tar.bz2
plus-02f6190bfd37903a0ad95226587cf4473b88332f.tar.xz
plus-02f6190bfd37903a0ad95226587cf4473b88332f.zip
Move intformation about setup input pages into separate file.
Diffstat (limited to 'src')
-rw-r--r--src/CMakeLists.txt2
-rw-r--r--src/Makefile.am2
-rw-r--r--src/gui/setupactiondata.cpp38
-rw-r--r--src/gui/setupactiondata.h2
-rw-r--r--src/gui/setupinputpages.cpp66
-rw-r--r--src/gui/setupinputpages.h32
-rw-r--r--src/gui/widgets/tabs/setup_input.cpp1
7 files changed, 105 insertions, 38 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index d88b2fbb0..d59f6fed8 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -438,6 +438,8 @@ SET(SRCS
gui/widgets/tabs/setup_visual.h
gui/setupactiondata.cpp
gui/setupactiondata.h
+ gui/setupinputpages.cpp
+ gui/setupinputpages.h
gui/fonts/font.cpp
gui/fonts/font.h
gui/fonts/textchunk.cpp
diff --git a/src/Makefile.am b/src/Makefile.am
index abd1d7d38..3d27a9691 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -562,6 +562,8 @@ manaplus_SOURCES += gui/widgets/avatarlistbox.cpp \
gui/widgets/tabs/setup_visual.h \
gui/setupactiondata.cpp \
gui/setupactiondata.h \
+ gui/setupinputpages.cpp \
+ gui/setupinputpages.h \
gui/fonts/font.cpp \
gui/fonts/font.h \
gui/fonts/textchunk.cpp \
diff --git a/src/gui/setupactiondata.cpp b/src/gui/setupactiondata.cpp
index f89c394c0..03868a88e 100644
--- a/src/gui/setupactiondata.cpp
+++ b/src/gui/setupactiondata.cpp
@@ -29,6 +29,8 @@
#include "utils/gettext.h"
#include "utils/stringutils.h"
+#include "debug.h"
+
SetupActionData setupActionData0[] =
{
{
@@ -1991,42 +1993,6 @@ SetupActionData setupActionData8[] =
}
};
-SetupActionData *const setupActionData[] =
-{
- setupActionData0,
- setupActionData7,
- setupActionData1,
- setupActionData2,
- setupActionData3,
- setupActionData4,
- setupActionData5,
- setupActionData6,
- setupActionData8
-};
-
-const char *const pages[] =
-{
- // TRANSLATORS: input tab sub tab name
- N_("Basic"),
- // TRANSLATORS: input tab sub tab name
- N_("Move"),
- // TRANSLATORS: input tab sub tab name
- N_("Shortcuts"),
- // TRANSLATORS: input tab sub tab name
- N_("Windows"),
- // TRANSLATORS: input tab sub tab name
- N_("Emotes"),
- // TRANSLATORS: input tab sub tab name
- N_("Outfits"),
- // TRANSLATORS: input tab sub tab name
- N_("Chat"),
- // TRANSLATORS: input tab sub tab name
- N_("Other"),
- // TRANSLATORS: input tab sub tab name
- N_("Gui"),
- nullptr
-};
-
SetupActionData *const touchActionData[] =
{
setupActionData0,
diff --git a/src/gui/setupactiondata.h b/src/gui/setupactiondata.h
index 3f5473602..cd68a9f70 100644
--- a/src/gui/setupactiondata.h
+++ b/src/gui/setupactiondata.h
@@ -48,8 +48,6 @@ struct SetupActionData final
const int touchActionDataSize = 4;
extern SetupActionData *const touchActionData[];
-extern SetupActionData *const setupActionData[];
-extern const char *const pages[];
extern SetupActionData setupActionData0[];
extern SetupActionData setupActionData1[];
extern SetupActionData setupActionData2[];
diff --git a/src/gui/setupinputpages.cpp b/src/gui/setupinputpages.cpp
new file mode 100644
index 000000000..5e99c1384
--- /dev/null
+++ b/src/gui/setupinputpages.cpp
@@ -0,0 +1,66 @@
+/*
+ * The ManaPlus Client
+ * Copyright (C) 2007 Joshua Langley <joshlangley@optusnet.com.au>
+ * Copyright (C) 2009 The Mana World Development Team
+ * Copyright (C) 2009-2010 The Mana Developers
+ * 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/>.
+ */
+
+#include "gui/setupinputpages.h"
+
+#include "gui/setupactiondata.h"
+
+#include "utils/gettext.h"
+
+#include "debug.h"
+
+const char *const pages[] =
+{
+ // TRANSLATORS: input tab sub tab name
+ N_("Basic"),
+ // TRANSLATORS: input tab sub tab name
+ N_("Move"),
+ // TRANSLATORS: input tab sub tab name
+ N_("Shortcuts"),
+ // TRANSLATORS: input tab sub tab name
+ N_("Windows"),
+ // TRANSLATORS: input tab sub tab name
+ N_("Emotes"),
+ // TRANSLATORS: input tab sub tab name
+ N_("Outfits"),
+ // TRANSLATORS: input tab sub tab name
+ N_("Chat"),
+ // TRANSLATORS: input tab sub tab name
+ N_("Other"),
+ // TRANSLATORS: input tab sub tab name
+ N_("Gui"),
+ nullptr
+};
+
+SetupActionData *const setupActionData[] =
+{
+ setupActionData0,
+ setupActionData7,
+ setupActionData1,
+ setupActionData2,
+ setupActionData3,
+ setupActionData4,
+ setupActionData5,
+ setupActionData6,
+ setupActionData8
+};
diff --git a/src/gui/setupinputpages.h b/src/gui/setupinputpages.h
new file mode 100644
index 000000000..2ec058aae
--- /dev/null
+++ b/src/gui/setupinputpages.h
@@ -0,0 +1,32 @@
+/*
+ * The ManaPlus Client
+ * Copyright (C) 2007 Joshua Langley <joshlangley@optusnet.com.au>
+ * Copyright (C) 2009 The Mana World Development Team
+ * Copyright (C) 2009-2010 The Mana Developers
+ * 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_SETUPINPUTPAGES_H
+#define GUI_SETUPINPUTPAGES_H
+
+struct SetupActionData;
+
+extern const char *const pages[];
+extern SetupActionData *const setupActionData[];
+
+#endif // GUI_SETUPINPUTPAGES_H
diff --git a/src/gui/widgets/tabs/setup_input.cpp b/src/gui/widgets/tabs/setup_input.cpp
index af5983cc2..a4080a626 100644
--- a/src/gui/widgets/tabs/setup_input.cpp
+++ b/src/gui/widgets/tabs/setup_input.cpp
@@ -29,6 +29,7 @@
#include "input/keyboardconfig.h"
#include "gui/gui.h"
+#include "gui/setupinputpages.h"
#include "gui/windows/okdialog.h"