summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-04-10 03:12:42 +0300
committerAndrei Karas <akaras@inbox.ru>2012-04-10 03:12:42 +0300
commit9df03a10b72b7e8c3b5bcf9cc7b595dc9fc17835 (patch)
tree9f46ecd1e8d1e6511ed4a9b8f489c39228f3cfa4
parent2556c72eea6a7d28d543d991e5d5c519726028f0 (diff)
downloadplus-9df03a10b72b7e8c3b5bcf9cc7b595dc9fc17835.tar.gz
plus-9df03a10b72b7e8c3b5bcf9cc7b595dc9fc17835.tar.bz2
plus-9df03a10b72b7e8c3b5bcf9cc7b595dc9fc17835.tar.xz
plus-9df03a10b72b7e8c3b5bcf9cc7b595dc9fc17835.zip
Rename settings tab keyboard to input.
-rw-r--r--src/CMakeLists.txt4
-rw-r--r--src/Makefile.am4
-rw-r--r--src/gui/setup.cpp4
-rw-r--r--src/gui/setup.h2
-rw-r--r--src/gui/setup_input.cpp (renamed from src/gui/setup_keyboard.cpp)26
-rw-r--r--src/gui/setup_input.h (renamed from src/gui/setup_keyboard.h)10
-rw-r--r--src/inputmanager.cpp6
-rw-r--r--src/inputmanager.h8
8 files changed, 32 insertions, 32 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 959c1d5c6..2c60196e0 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -321,8 +321,8 @@ SET(SRCS
gui/setup_theme.h
gui/setup_chat.cpp
gui/setup_chat.h
- gui/setup_keyboard.cpp
- gui/setup_keyboard.h
+ gui/setup_input.cpp
+ gui/setup_input.h
gui/setup_perfomance.cpp
gui/setup_perfomance.h
gui/setup_relations.cpp
diff --git a/src/Makefile.am b/src/Makefile.am
index 90688a620..9c5db0ced 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -324,8 +324,8 @@ manaplus_SOURCES += gui/widgets/avatarlistbox.cpp \
gui/setup_theme.h \
gui/setup_chat.cpp \
gui/setup_chat.h \
- gui/setup_keyboard.cpp \
- gui/setup_keyboard.h \
+ gui/setup_input.cpp \
+ gui/setup_input.h \
gui/setup_perfomance.cpp \
gui/setup_perfomance.h \
gui/setup_players.cpp \
diff --git a/src/gui/setup.cpp b/src/gui/setup.cpp
index c7908a6ac..65444a362 100644
--- a/src/gui/setup.cpp
+++ b/src/gui/setup.cpp
@@ -33,7 +33,7 @@
#include "gui/setup_joystick.h"
#include "gui/setup_other.h"
#include "gui/setup_theme.h"
-#include "gui/setup_keyboard.h"
+#include "gui/setup_input.h"
#include "gui/setup_perfomance.h"
#include "gui/setup_players.h"
#include "gui/setup_relations.h"
@@ -97,7 +97,7 @@ Setup::Setup():
mTabs.push_back(new Setup_Audio);
mTabs.push_back(new Setup_Perfomance);
mTabs.push_back(new Setup_Joystick);
- mTabs.push_back(new Setup_Keyboard);
+ mTabs.push_back(new Setup_Input);
mTabs.push_back(new Setup_Colors);
mTabs.push_back(new Setup_Chat);
mTabs.push_back(new Setup_Players);
diff --git a/src/gui/setup.h b/src/gui/setup.h
index 3a6f66297..df99855e3 100644
--- a/src/gui/setup.h
+++ b/src/gui/setup.h
@@ -42,7 +42,7 @@ class SetupTab;
* @see Setup_Audio
* @see Setup_Colors
* @see Setup_Joystick
- * @see Setup_Keyboard
+ * @see Setup_Input
* @see Setup_Players
* @see Setup_Video
*
diff --git a/src/gui/setup_keyboard.cpp b/src/gui/setup_input.cpp
index ee06fa4a7..cdcae13c4 100644
--- a/src/gui/setup_keyboard.cpp
+++ b/src/gui/setup_input.cpp
@@ -21,7 +21,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "gui/setup_keyboard.h"
+#include "gui/setup_input.h"
#include "inputmanager.h"
#include "keyboardconfig.h"
@@ -743,13 +743,13 @@ class KeyListModel : public gcn::ListModel
std::string mKeyFunctions[keysSize];
};
-Setup_Keyboard::Setup_Keyboard():
+Setup_Input::Setup_Input():
mKeyListModel(new KeyListModel),
mKeyList(new ListBox(mKeyListModel)),
mKeySetting(false)
{
- inputManager.setSetupKeyboard(this);
- setName(_("Keyboard"));
+ inputManager.setSetupInput(this);
+ setName(_("Input"));
refreshKeys();
@@ -781,7 +781,7 @@ Setup_Keyboard::Setup_Keyboard():
setDimension(gcn::Rectangle(0, 0, 500, 350));
}
-Setup_Keyboard::~Setup_Keyboard()
+Setup_Input::~Setup_Input()
{
delete mKeyList;
mKeyList = nullptr;
@@ -796,7 +796,7 @@ Setup_Keyboard::~Setup_Keyboard()
mMakeDefaultButton = nullptr;
}
-void Setup_Keyboard::apply()
+void Setup_Input::apply()
{
keyUnresolved();
int key1, key2;
@@ -816,7 +816,7 @@ void Setup_Keyboard::apply()
inputManager.store();
}
-void Setup_Keyboard::cancel()
+void Setup_Input::cancel()
{
keyUnresolved();
@@ -826,7 +826,7 @@ void Setup_Keyboard::cancel()
refreshKeys();
}
-void Setup_Keyboard::action(const gcn::ActionEvent &event)
+void Setup_Input::action(const gcn::ActionEvent &event)
{
if (event.getSource() == mKeyList)
{
@@ -884,7 +884,7 @@ void Setup_Keyboard::action(const gcn::ActionEvent &event)
}
}
-void Setup_Keyboard::refreshAssignedKey(int index)
+void Setup_Input::refreshAssignedKey(int index)
{
const SetupActionData &key = setupActionData[index];
if (key.actionId == Input::KEY_NO_VALUE)
@@ -902,7 +902,7 @@ void Setup_Keyboard::refreshAssignedKey(int index)
}
}
-void Setup_Keyboard::newKeyCallback(int index)
+void Setup_Input::newKeyCallback(int index)
{
mKeySetting = false;
int i = keyToSetupData(index);
@@ -911,7 +911,7 @@ void Setup_Keyboard::newKeyCallback(int index)
mAssignKeyButton->setEnabled(true);
}
-int Setup_Keyboard::keyToSetupData(int index)
+int Setup_Input::keyToSetupData(int index)
{
for (int i = 0; i < keysSize; i++)
{
@@ -922,13 +922,13 @@ int Setup_Keyboard::keyToSetupData(int index)
return -1;
}
-void Setup_Keyboard::refreshKeys()
+void Setup_Input::refreshKeys()
{
for (int i = 0; i < keysSize; i++)
refreshAssignedKey(i);
}
-void Setup_Keyboard::keyUnresolved()
+void Setup_Input::keyUnresolved()
{
if (mKeySetting)
{
diff --git a/src/gui/setup_keyboard.h b/src/gui/setup_input.h
index 3b5fd5dfa..31bc5bcb1 100644
--- a/src/gui/setup_keyboard.h
+++ b/src/gui/setup_input.h
@@ -21,8 +21,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef GUI_SETUP_KEYBOARD_H
-#define GUI_SETUP_KEYBOARD_H
+#ifndef GUI_SETUP_INPUT_H
+#define GUI_SETUP_INPUT_H
#include "guichanfwd.h"
@@ -32,18 +32,18 @@
#include <string>
-class Setup_Keyboard : public SetupTab
+class Setup_Input : public SetupTab
{
public:
/**
* Constructor
*/
- Setup_Keyboard();
+ Setup_Input();
/**
* Destructor
*/
- ~Setup_Keyboard();
+ ~Setup_Input();
void apply();
diff --git a/src/inputmanager.cpp b/src/inputmanager.cpp
index 6ae93b88e..3f4904abe 100644
--- a/src/inputmanager.cpp
+++ b/src/inputmanager.cpp
@@ -33,7 +33,7 @@
#include "gui/npcdialog.h"
#include "gui/npcpostdialog.h"
#include "gui/setup.h"
-#include "gui/setup_keyboard.h"
+#include "gui/setup_input.h"
#include "gui/textdialog.h"
#include "gui/tradewindow.h"
@@ -62,7 +62,7 @@ class KeyFunctor
InputManager::InputManager() :
- mSetupKey(nullptr),
+ mSetupInput(nullptr),
mNewKeyIndex(Input::KEY_NO_VALUE)
{
}
@@ -243,7 +243,7 @@ bool InputManager::hasConflicts(int &key1, int &key2)
void InputManager::callbackNewKey()
{
- mSetupKey->newKeyCallback(mNewKeyIndex);
+ mSetupInput->newKeyCallback(mNewKeyIndex);
}
bool InputManager::isActionActive(int index) const
diff --git a/src/inputmanager.h b/src/inputmanager.h
index 2469e2e10..9e2081f4e 100644
--- a/src/inputmanager.h
+++ b/src/inputmanager.h
@@ -33,7 +33,7 @@
struct KeyData;
-class Setup_Keyboard;
+class Setup_Input;
enum KeyTypes
{
@@ -124,8 +124,8 @@ class InputManager
/**
* Set a reference to the key setup window.
*/
- void setSetupKeyboard(Setup_Keyboard *setupKey)
- { mSetupKey = setupKey; }
+ void setSetupInput(Setup_Input *setupInput)
+ { mSetupInput = setupInput; }
/**
* Get the index of the new key to be assigned.
@@ -142,7 +142,7 @@ class InputManager
bool triggerAction(const KeysVector *ptrs);
protected:
- Setup_Keyboard *mSetupKey; /**< Reference to setup window */
+ Setup_Input *mSetupInput; /**< Reference to setup window */
int mNewKeyIndex; /**< Index of new key to be assigned */