From 02f6190bfd37903a0ad95226587cf4473b88332f Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 22 Aug 2014 16:57:15 +0300 Subject: Move intformation about setup input pages into separate file. --- src/CMakeLists.txt | 2 ++ src/Makefile.am | 2 ++ src/gui/setupactiondata.cpp | 38 ++------------------- src/gui/setupactiondata.h | 2 -- src/gui/setupinputpages.cpp | 66 ++++++++++++++++++++++++++++++++++++ src/gui/setupinputpages.h | 32 +++++++++++++++++ src/gui/widgets/tabs/setup_input.cpp | 1 + 7 files changed, 105 insertions(+), 38 deletions(-) create mode 100644 src/gui/setupinputpages.cpp create mode 100644 src/gui/setupinputpages.h (limited to 'src') 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 + * 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 . + */ + +#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 + * 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 . + */ + +#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" -- cgit v1.2.3-60-g2f50