summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/actions/chat.cpp11
-rw-r--r--src/actions/chat.h1
-rw-r--r--src/commands.cpp12
-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, 16 deletions
diff --git a/src/actions/chat.cpp b/src/actions/chat.cpp
index 5b70c2085..9895d8388 100644
--- a/src/actions/chat.cpp
+++ b/src/actions/chat.cpp
@@ -112,6 +112,17 @@ impHandler0(closeChatTab)
return false;
}
+impHandler0(closeAllChatTabs)
+{
+ if (chatWindow)
+ {
+ chatWindow->removeAllWhispers();
+ 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 ed7ef97ed..bdb62e209 100644
--- a/src/actions/chat.h
+++ b/src/actions/chat.h
@@ -31,6 +31,7 @@ namespace Actions
decHandler(prevChatTab);
decHandler(nextChatTab);
decHandler(closeChatTab);
+ decHandler(closeAllChatTabs);
decHandler(scrollChatUp);
decHandler(scrollChatDown);
} // namespace Actions
diff --git a/src/commands.cpp b/src/commands.cpp
index 2f68efda4..3c0734e43 100644
--- a/src/commands.cpp
+++ b/src/commands.cpp
@@ -754,18 +754,6 @@ impHandler0(attackHuman)
return true;
}
-
-impHandler0(closeAll)
-{
- if (chatWindow)
- {
- chatWindow->removeAllWhispers();
- chatWindow->saveState();
- return true;
- }
- return false;
-}
-
impHandler0(ignoreAll)
{
if (chatWindow)
diff --git a/src/commands.h b/src/commands.h
index ba3bb28df..8a03a5f40 100644
--- a/src/commands.h
+++ b/src/commands.h
@@ -80,7 +80,6 @@ namespace Commands
decHandler(move);
decHandler(target);
decHandler(attackHuman);
- decHandler(closeAll);
decHandler(ignoreAll);
decHandler(outfit);
decHandler(emote);
@@ -144,8 +143,7 @@ namespace Commands
enum
{
- COMMAND_CLOSEALL = 0,
- COMMAND_IGNOREALL,
+ COMMAND_IGNOREALL = 0,
COMMAND_HELP,
COMMAND_ANNOUNCE,
COMMAND_IPC_TOGGLE,
@@ -241,7 +239,6 @@ enum
static const CommandInfo commands[] =
{
- {"closeall", &Commands::closeAll, -1, false},
{"ignoreall", &Commands::ignoreAll, -1, false},
{"help", &Commands::help, -1, false},
{"announce", &Commands::announce, -1, true},
diff --git a/src/input/inputaction.h b/src/input/inputaction.h
index 2231a89dd..5cea51f31 100644
--- a/src/input/inputaction.h
+++ b/src/input/inputaction.h
@@ -341,6 +341,7 @@ namespace InputAction
WINDOW_ABOUT,
WINDOW_UPDATER,
TARGET_CLOSEST_MONSTER,
+ CLOSE_ALL_CHAT_TABS,
TOTAL
};
} // namespace InputAction
diff --git a/src/input/inputactionmap.h b/src/input/inputactionmap.h
index 65c145dbd..35fd37d57 100644
--- a/src/input/inputactionmap.h
+++ b/src/input/inputactionmap.h
@@ -2837,6 +2837,15 @@ static const InputActionData inputActionData[InputAction::TOTAL] = {
InputCondition::GAME | InputCondition::NOTARGET
| InputCondition::VALIDSPEED,
"",
+ false},
+ {"keyChatCloseAllTabs",
+ InputType::UNKNOWN, InputAction::NO_VALUE,
+ InputType::UNKNOWN, InputAction::NO_VALUE,
+ Input::GRP_DEFAULT | Input::GRP_GUI,
+ &Actions::closeAllChatTabs,
+ InputAction::NO_VALUE, 50,
+ InputCondition::INGAME,
+ "closeall",
false}
};
diff --git a/src/input/pages/chat.cpp b/src/input/pages/chat.cpp
index 71922103a..113efa3a5 100644
--- a/src/input/pages/chat.cpp
+++ b/src/input/pages/chat.cpp
@@ -68,6 +68,12 @@ SetupActionData setupActionDataChat[] =
},
{
// TRANSLATORS: input action name
+ N_("Close all chat tabs"),
+ InputAction::CLOSE_ALL_CHAT_TABS,
+ "",
+ },
+ {
+ // TRANSLATORS: input action name
N_("Previous chat line"),
InputAction::CHAT_PREV_HISTORY,
"",