mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
feat(audio): Adding shortut SHIFT+` (~ tilde) for muting mic.
This commit is contained in:
parent
a6d15140b1
commit
3ecf2e03c4
|
@ -58,6 +58,7 @@
|
|||
#include <QScrollBar>
|
||||
#include <QSplitter>
|
||||
#include <QStringBuilder>
|
||||
#include <QShortcut>
|
||||
|
||||
#include <cassert>
|
||||
|
||||
|
@ -221,6 +222,9 @@ ChatForm::ChatForm(Profile& profile_, Friend* chatFriend, IChatLog& chatLog_,
|
|||
setAcceptDrops(true);
|
||||
retranslateUi();
|
||||
Translator::registerHandler(std::bind(&ChatForm::retranslateUi, this), this);
|
||||
|
||||
// shortcut for mute (SHIFT+ `), (SHIFT + grave accent, gives tilde)
|
||||
new QShortcut(Qt::SHIFT | 0x60, this, SLOT(onMicMuteShortcutToggle()));
|
||||
}
|
||||
|
||||
ChatForm::~ChatForm()
|
||||
|
@ -458,6 +462,15 @@ void ChatForm::onMicMuteToggle()
|
|||
updateMuteMicButton();
|
||||
}
|
||||
|
||||
void ChatForm::onMicMuteShortcutToggle()
|
||||
{
|
||||
CoreAV* av = core.getAv();
|
||||
if (av->isCallActive(f))
|
||||
{
|
||||
onMicMuteToggle();
|
||||
}
|
||||
}
|
||||
|
||||
void ChatForm::onVolMuteToggle()
|
||||
{
|
||||
CoreAV* av = core.getAv();
|
||||
|
|
|
@ -102,6 +102,7 @@ private slots:
|
|||
void onAnswerCallTriggered(bool video);
|
||||
void onRejectCallTriggered();
|
||||
void onMicMuteToggle();
|
||||
void onMicMuteShortcutToggle();
|
||||
void onVolMuteToggle();
|
||||
|
||||
void onFriendStatusChanged(const ToxPk& friendPk, Status::Status status);
|
||||
|
|
Loading…
Reference in New Issue
Block a user