summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-04-26 00:13:17 +0300
committerAndrei Karas <akaras@inbox.ru>2013-04-26 00:13:17 +0300
commit298d8e2ef42eb2c60f1a2c24cf1aeb131dcded09 (patch)
tree7e5196f57a290ff585936f5caf61ac26c9295b00 /src/gui
parent853757df15383c2e9cc33023dc04a256c458e671 (diff)
downloadmv-298d8e2ef42eb2c60f1a2c24cf1aeb131dcded09.tar.gz
mv-298d8e2ef42eb2c60f1a2c24cf1aeb131dcded09.tar.bz2
mv-298d8e2ef42eb2c60f1a2c24cf1aeb131dcded09.tar.xz
mv-298d8e2ef42eb2c60f1a2c24cf1aeb131dcded09.zip
Add mod key for chat (left shift)
New action: mod key + right click - close current whisper.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/chatwindow.cpp16
-rw-r--r--src/gui/setupactiondata.h5
2 files changed, 18 insertions, 3 deletions
diff --git a/src/gui/chatwindow.cpp b/src/gui/chatwindow.cpp
index 2892bb842..cde943c68 100644
--- a/src/gui/chatwindow.cpp
+++ b/src/gui/chatwindow.cpp
@@ -746,9 +746,19 @@ void ChatWindow::mousePressed(gcn::MouseEvent &event)
Tab *const tab = mChatTabs->getSelectedTab();
if (tab)
{
- ChatTab *const cTab = dynamic_cast<ChatTab*>(tab);
- if (cTab)
- viewport->showChatPopup(cTab);
+ if (inputManager.isActionActive(static_cast<int>(
+ Input::KEY_CHAT_MOD)))
+ {
+ ChatTab *const wTab = dynamic_cast<WhisperTab*>(tab);
+ if (wTab)
+ wTab->handleCommand("close", "");
+ }
+ else
+ {
+ ChatTab *const cTab = dynamic_cast<ChatTab*>(tab);
+ if (cTab)
+ viewport->showChatPopup(cTab);
+ }
}
}
}
diff --git a/src/gui/setupactiondata.h b/src/gui/setupactiondata.h
index 38815898c..b47abace7 100644
--- a/src/gui/setupactiondata.h
+++ b/src/gui/setupactiondata.h
@@ -1011,6 +1011,11 @@ static SetupActionData setupActionData5[] =
"",
},
{
+ N_("Chat modifier key"),
+ Input::KEY_CHAT_MOD,
+ "",
+ },
+ {
"",
Input::KEY_NO_VALUE,
""