summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-08-23 15:27:04 +0300
committerAndrei Karas <akaras@inbox.ru>2014-08-23 15:27:04 +0300
commit35e14007fe44877b160c48db1d4106eba6306859 (patch)
treebd3692d2c37aab8e38a2444f0cdf0f0ed5ec4232 /src
parentdded1355609c8f23281f78ec719b09b1693ea717 (diff)
downloadManaVerse-35e14007fe44877b160c48db1d4106eba6306859.tar.gz
ManaVerse-35e14007fe44877b160c48db1d4106eba6306859.tar.bz2
ManaVerse-35e14007fe44877b160c48db1d4106eba6306859.tar.xz
ManaVerse-35e14007fe44877b160c48db1d4106eba6306859.zip
Move chat command /ignoreallwhispers into actions.
Diffstat (limited to 'src')
-rw-r--r--src/actions/chat.cpp11
-rw-r--r--src/actions/chat.h1
-rw-r--r--src/commands.cpp11
-rw-r--r--src/commands.h5
-rw-r--r--src/input/inputaction.h1
-rw-r--r--src/input/inputactionmap.h9
-rw-r--r--src/input/pages/chat.cpp6
7 files changed, 29 insertions, 15 deletions
diff --git a/src/actions/chat.cpp b/src/actions/chat.cpp
index 9895d8388..d69895af3 100644
--- a/src/actions/chat.cpp
+++ b/src/actions/chat.cpp
@@ -123,6 +123,17 @@ impHandler0(closeAllChatTabs)
return false;
}
+impHandler0(ignoreAllWhispers)
+{
+ if (chatWindow)
+ {
+ chatWindow->ignoreAllWhispers();
+ chatWindow->saveState();
+ return true;
+ }
+ return false;
+}
+
impHandler0(scrollChatUp)
{
if (chatWindow && chatWindow->isWindowVisible())
diff --git a/src/actions/chat.h b/src/actions/chat.h
index bdb62e209..8d0003e73 100644
--- a/src/actions/chat.h
+++ b/src/actions/chat.h
@@ -32,6 +32,7 @@ namespace Actions
decHandler(nextChatTab);
decHandler(closeChatTab);
decHandler(closeAllChatTabs);
+ decHandler(ignoreAllWhispers);
decHandler(scrollChatUp);
decHandler(scrollChatDown);
} // namespace Actions
diff --git a/src/commands.cpp b/src/commands.cpp
index 3c0734e43..abbfeb91e 100644
--- a/src/commands.cpp
+++ b/src/commands.cpp
@@ -754,17 +754,6 @@ impHandler0(attackHuman)
return true;
}
-impHandler0(ignoreAll)
-{
- if (chatWindow)
- {
- chatWindow->ignoreAllWhispers();
- chatWindow->saveState();
- return true;
- }
- return false;
-}
-
impHandler(outfit)
{
if (outfitWindow)
diff --git a/src/commands.h b/src/commands.h
index 8a03a5f40..e694937c6 100644
--- a/src/commands.h
+++ b/src/commands.h
@@ -80,7 +80,6 @@ namespace Commands
decHandler(move);
decHandler(target);
decHandler(attackHuman);
- decHandler(ignoreAll);
decHandler(outfit);
decHandler(emote);
decHandler(emotePet);
@@ -143,8 +142,7 @@ namespace Commands
enum
{
- COMMAND_IGNOREALL = 0,
- COMMAND_HELP,
+ COMMAND_HELP = 0,
COMMAND_ANNOUNCE,
COMMAND_IPC_TOGGLE,
COMMAND_WHERE,
@@ -239,7 +237,6 @@ enum
static const CommandInfo commands[] =
{
- {"ignoreall", &Commands::ignoreAll, -1, false},
{"help", &Commands::help, -1, false},
{"announce", &Commands::announce, -1, true},
{"ipctoggle", &Commands::ipcToggle, -1, false},
diff --git a/src/input/inputaction.h b/src/input/inputaction.h
index 5cea51f31..c9a35a66f 100644
--- a/src/input/inputaction.h
+++ b/src/input/inputaction.h
@@ -342,6 +342,7 @@ namespace InputAction
WINDOW_UPDATER,
TARGET_CLOSEST_MONSTER,
CLOSE_ALL_CHAT_TABS,
+ IGNORE_ALL_WHISPERS,
TOTAL
};
} // namespace InputAction
diff --git a/src/input/inputactionmap.h b/src/input/inputactionmap.h
index 35fd37d57..19026df4d 100644
--- a/src/input/inputactionmap.h
+++ b/src/input/inputactionmap.h
@@ -2846,6 +2846,15 @@ static const InputActionData inputActionData[InputAction::TOTAL] = {
InputAction::NO_VALUE, 50,
InputCondition::INGAME,
"closeall",
+ false},
+ {"keyChatIgnoreAllWhispers",
+ InputType::UNKNOWN, InputAction::NO_VALUE,
+ InputType::UNKNOWN, InputAction::NO_VALUE,
+ Input::GRP_DEFAULT | Input::GRP_GUI,
+ &Actions::ignoreAllWhispers,
+ InputAction::NO_VALUE, 50,
+ InputCondition::INGAME,
+ "ignoreallwhispers",
false}
};
diff --git a/src/input/pages/chat.cpp b/src/input/pages/chat.cpp
index 113efa3a5..d61f7855a 100644
--- a/src/input/pages/chat.cpp
+++ b/src/input/pages/chat.cpp
@@ -74,6 +74,12 @@ SetupActionData setupActionDataChat[] =
},
{
// TRANSLATORS: input action name
+ N_("Ignore all whispers"),
+ InputAction::IGNORE_ALL_WHISPERS,
+ "",
+ },
+ {
+ // TRANSLATORS: input action name
N_("Previous chat line"),
InputAction::CHAT_PREV_HISTORY,
"",