summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-08-22 22:06:06 +0300
committerAndrei Karas <akaras@inbox.ru>2014-08-22 22:06:06 +0300
commitc8d3d3104f929c42804c8ca5bd56bbbfaa894397 (patch)
tree9e19a7949f0fdd1e1f37087196c43eeb10473a92 /src
parentca49d54605d272f43b235c86fe788783cf22537a (diff)
downloadmv-c8d3d3104f929c42804c8ca5bd56bbbfaa894397.tar.gz
mv-c8d3d3104f929c42804c8ca5bd56bbbfaa894397.tar.bz2
mv-c8d3d3104f929c42804c8ca5bd56bbbfaa894397.tar.xz
mv-c8d3d3104f929c42804c8ca5bd56bbbfaa894397.zip
Move options for shortcuts input settings page into separate file.
Diffstat (limited to 'src')
-rw-r--r--src/CMakeLists.txt2
-rw-r--r--src/Makefile.am2
-rw-r--r--src/gui/setupinputpages.cpp1
-rw-r--r--src/gui/widgets/tabs/setup_input.cpp2
-rw-r--r--src/input/pages/pages.cpp147
-rw-r--r--src/input/pages/pages.h1
-rw-r--r--src/input/pages/shortcuts.cpp179
-rw-r--r--src/input/pages/shortcuts.h31
8 files changed, 217 insertions, 148 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 76c2c9ef6..706e57573 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -443,6 +443,8 @@ SET(SRCS
input/pages/basic.h
input/pages/pages.cpp
input/pages/pages.h
+ input/pages/shortcuts.cpp
+ input/pages/shortcuts.h
gui/fonts/font.cpp
gui/fonts/font.h
gui/fonts/textchunk.cpp
diff --git a/src/Makefile.am b/src/Makefile.am
index d06246b19..12d157cdf 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -567,6 +567,8 @@ manaplus_SOURCES += gui/widgets/avatarlistbox.cpp \
input/pages/basic.h \
input/pages/pages.cpp \
input/pages/pages.h \
+ input/pages/shortcuts.cpp \
+ input/pages/shortcuts.h \
gui/fonts/font.cpp \
gui/fonts/font.h \
gui/fonts/textchunk.cpp \
diff --git a/src/gui/setupinputpages.cpp b/src/gui/setupinputpages.cpp
index 40172263a..6aeca77f6 100644
--- a/src/gui/setupinputpages.cpp
+++ b/src/gui/setupinputpages.cpp
@@ -29,6 +29,7 @@
#include "input/pages/basic.h"
#include "input/pages/pages.h"
+#include "input/pages/shortcuts.h"
#include "debug.h"
diff --git a/src/gui/widgets/tabs/setup_input.cpp b/src/gui/widgets/tabs/setup_input.cpp
index 7c4a548c9..41235e3df 100644
--- a/src/gui/widgets/tabs/setup_input.cpp
+++ b/src/gui/widgets/tabs/setup_input.cpp
@@ -27,7 +27,9 @@
#include "input/inputmanager.h"
#include "input/keyboardconfig.h"
+
#include "input/pages/pages.h"
+#include "input/pages/shortcuts.h"
#include "gui/gui.h"
#include "gui/setupinputpages.h"
diff --git a/src/input/pages/pages.cpp b/src/input/pages/pages.cpp
index 6b3f8f33a..858f4d3a3 100644
--- a/src/input/pages/pages.cpp
+++ b/src/input/pages/pages.cpp
@@ -31,153 +31,6 @@
#include "debug.h"
-SetupActionData setupActionDataShortcuts[] =
-{
- {
- // TRANSLATORS: input action name
- N_("Shortcuts modifiers keys"),
- InputAction::NO_VALUE,
- ""
- },
- {
- // TRANSLATORS: input action name
- N_("Item Shortcuts Key"),
- InputAction::SHORTCUTS_KEY,
- "",
- },
- {
- // TRANSLATORS: input action name
- N_("Shortcuts keys"),
- InputAction::NO_VALUE,
- ""
- },
- {
- // TRANSLATORS: input action name
- strprintf(N_("Item Shortcut %d"), 1),
- InputAction::SHORTCUT_1,
- "",
- },
- {
- // TRANSLATORS: input action name
- strprintf(N_("Item Shortcut %d"), 2),
- InputAction::SHORTCUT_2,
- "",
- },
- {
- // TRANSLATORS: input action name
- strprintf(N_("Item Shortcut %d"), 3),
- InputAction::SHORTCUT_3,
- "",
- },
- {
- // TRANSLATORS: input action name
- strprintf(N_("Item Shortcut %d"), 4),
- InputAction::SHORTCUT_4,
- "",
- },
- {
- // TRANSLATORS: input action name
- strprintf(N_("Item Shortcut %d"), 5),
- InputAction::SHORTCUT_5,
- "",
- },
- {
- // TRANSLATORS: input action name
- strprintf(N_("Item Shortcut %d"), 6),
- InputAction::SHORTCUT_6,
- "",
- },
- {
- // TRANSLATORS: input action name
- strprintf(N_("Item Shortcut %d"), 7),
- InputAction::SHORTCUT_7,
- "",
- },
- {
- // TRANSLATORS: input action name
- strprintf(N_("Item Shortcut %d"), 8),
- InputAction::SHORTCUT_8,
- "",
- },
- {
- // TRANSLATORS: input action name
- strprintf(N_("Item Shortcut %d"), 9),
- InputAction::SHORTCUT_9,
- "",
- },
- {
- // TRANSLATORS: input action name
- strprintf(N_("Item Shortcut %d"), 10),
- InputAction::SHORTCUT_10,
- "",
- },
- {
- // TRANSLATORS: input action name
- strprintf(N_("Item Shortcut %d"), 11),
- InputAction::SHORTCUT_11,
- "",
- },
- {
- // TRANSLATORS: input action name
- strprintf(N_("Item Shortcut %d"), 12),
- InputAction::SHORTCUT_12,
- "",
- },
- {
- // TRANSLATORS: input action name
- strprintf(N_("Item Shortcut %d"), 13),
- InputAction::SHORTCUT_13,
- "",
- },
- {
- // TRANSLATORS: input action name
- strprintf(N_("Item Shortcut %d"), 14),
- InputAction::SHORTCUT_14,
- "",
- },
- {
- // TRANSLATORS: input action name
- strprintf(N_("Item Shortcut %d"), 15),
- InputAction::SHORTCUT_15,
- "",
- },
- {
- // TRANSLATORS: input action name
- strprintf(N_("Item Shortcut %d"), 16),
- InputAction::SHORTCUT_16,
- "",
- },
- {
- // TRANSLATORS: input action name
- strprintf(N_("Item Shortcut %d"), 17),
- InputAction::SHORTCUT_17,
- "",
- },
- {
- // TRANSLATORS: input action name
- strprintf(N_("Item Shortcut %d"), 18),
- InputAction::SHORTCUT_18,
- "",
- },
- {
- // TRANSLATORS: input action name
- strprintf(N_("Item Shortcut %d"), 19),
- InputAction::SHORTCUT_19,
- "",
- },
- {
- // TRANSLATORS: input action name
- strprintf(N_("Item Shortcut %d"), 20),
- InputAction::SHORTCUT_20,
- "",
- },
- {
- "",
- InputAction::NO_VALUE,
- ""
- }
-};
-
SetupActionData setupActionDataWindows[] =
{
{
diff --git a/src/input/pages/pages.h b/src/input/pages/pages.h
index d278795b4..0b99fd303 100644
--- a/src/input/pages/pages.h
+++ b/src/input/pages/pages.h
@@ -26,7 +26,6 @@
#include "gui/setupactiondata.h"
-extern SetupActionData setupActionDataShortcuts[];
extern SetupActionData setupActionDataWindows[];
extern SetupActionData setupActionDataEmotes[];
extern SetupActionData setupActionDataOutfits[];
diff --git a/src/input/pages/shortcuts.cpp b/src/input/pages/shortcuts.cpp
new file mode 100644
index 000000000..1a80cd896
--- /dev/null
+++ b/src/input/pages/shortcuts.cpp
@@ -0,0 +1,179 @@
+/*
+ * 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/setupactiondata.h"
+
+#include "input/inputaction.h"
+#include "input/inputactiondata.h"
+
+#include "utils/gettext.h"
+#include "utils/stringutils.h"
+
+#include "debug.h"
+
+SetupActionData setupActionDataShortcuts[] =
+{
+ {
+ // TRANSLATORS: input action name
+ N_("Shortcuts modifiers keys"),
+ InputAction::NO_VALUE,
+ ""
+ },
+ {
+ // TRANSLATORS: input action name
+ N_("Item Shortcuts Key"),
+ InputAction::SHORTCUTS_KEY,
+ "",
+ },
+ {
+ // TRANSLATORS: input action name
+ N_("Shortcuts keys"),
+ InputAction::NO_VALUE,
+ ""
+ },
+ {
+ // TRANSLATORS: input action name
+ strprintf(N_("Item Shortcut %d"), 1),
+ InputAction::SHORTCUT_1,
+ "",
+ },
+ {
+ // TRANSLATORS: input action name
+ strprintf(N_("Item Shortcut %d"), 2),
+ InputAction::SHORTCUT_2,
+ "",
+ },
+ {
+ // TRANSLATORS: input action name
+ strprintf(N_("Item Shortcut %d"), 3),
+ InputAction::SHORTCUT_3,
+ "",
+ },
+ {
+ // TRANSLATORS: input action name
+ strprintf(N_("Item Shortcut %d"), 4),
+ InputAction::SHORTCUT_4,
+ "",
+ },
+ {
+ // TRANSLATORS: input action name
+ strprintf(N_("Item Shortcut %d"), 5),
+ InputAction::SHORTCUT_5,
+ "",
+ },
+ {
+ // TRANSLATORS: input action name
+ strprintf(N_("Item Shortcut %d"), 6),
+ InputAction::SHORTCUT_6,
+ "",
+ },
+ {
+ // TRANSLATORS: input action name
+ strprintf(N_("Item Shortcut %d"), 7),
+ InputAction::SHORTCUT_7,
+ "",
+ },
+ {
+ // TRANSLATORS: input action name
+ strprintf(N_("Item Shortcut %d"), 8),
+ InputAction::SHORTCUT_8,
+ "",
+ },
+ {
+ // TRANSLATORS: input action name
+ strprintf(N_("Item Shortcut %d"), 9),
+ InputAction::SHORTCUT_9,
+ "",
+ },
+ {
+ // TRANSLATORS: input action name
+ strprintf(N_("Item Shortcut %d"), 10),
+ InputAction::SHORTCUT_10,
+ "",
+ },
+ {
+ // TRANSLATORS: input action name
+ strprintf(N_("Item Shortcut %d"), 11),
+ InputAction::SHORTCUT_11,
+ "",
+ },
+ {
+ // TRANSLATORS: input action name
+ strprintf(N_("Item Shortcut %d"), 12),
+ InputAction::SHORTCUT_12,
+ "",
+ },
+ {
+ // TRANSLATORS: input action name
+ strprintf(N_("Item Shortcut %d"), 13),
+ InputAction::SHORTCUT_13,
+ "",
+ },
+ {
+ // TRANSLATORS: input action name
+ strprintf(N_("Item Shortcut %d"), 14),
+ InputAction::SHORTCUT_14,
+ "",
+ },
+ {
+ // TRANSLATORS: input action name
+ strprintf(N_("Item Shortcut %d"), 15),
+ InputAction::SHORTCUT_15,
+ "",
+ },
+ {
+ // TRANSLATORS: input action name
+ strprintf(N_("Item Shortcut %d"), 16),
+ InputAction::SHORTCUT_16,
+ "",
+ },
+ {
+ // TRANSLATORS: input action name
+ strprintf(N_("Item Shortcut %d"), 17),
+ InputAction::SHORTCUT_17,
+ "",
+ },
+ {
+ // TRANSLATORS: input action name
+ strprintf(N_("Item Shortcut %d"), 18),
+ InputAction::SHORTCUT_18,
+ "",
+ },
+ {
+ // TRANSLATORS: input action name
+ strprintf(N_("Item Shortcut %d"), 19),
+ InputAction::SHORTCUT_19,
+ "",
+ },
+ {
+ // TRANSLATORS: input action name
+ strprintf(N_("Item Shortcut %d"), 20),
+ InputAction::SHORTCUT_20,
+ "",
+ },
+ {
+ "",
+ InputAction::NO_VALUE,
+ ""
+ }
+};
diff --git a/src/input/pages/shortcuts.h b/src/input/pages/shortcuts.h
new file mode 100644
index 000000000..53510a3ae
--- /dev/null
+++ b/src/input/pages/shortcuts.h
@@ -0,0 +1,31 @@
+/*
+ * 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 INPUT_PAGES_SHORTCUTS_H
+#define INPUT_PAGES_SHORTCUTS_H
+
+#include "gui/setupactiondata.h"
+
+extern SetupActionData setupActionDataShortcuts[];
+
+#endif // INPUT_PAGES_SHORTCUTS_H