Skip to content
Permalink
Browse files

Merge PR #2682: main, SocketRPC: add 'togglemute' and 'toggledeaf' RP…

…C commands.
  • Loading branch information...
mkrautz committed Dec 1, 2016
2 parents 8aa2558 + 541ac08 commit 9b4ee063e5bd9831e7bfd32707b3a84008121f60
Showing with 26 additions and 0 deletions.
  1. +22 −0 src/mumble/SocketRPC.cpp
  2. +4 −0 src/mumble/main.cpp
@@ -120,6 +120,17 @@ void SocketRPCClient::processXml() {
g.mw->qaAudioMute->trigger();
}
}
iter = qmRequest.find(QLatin1String("togglemute"));
if (iter != qmRequest.constEnd()) {
bool set = iter.value().toBool();
if (set == g.s.bMute) {
g.mw->qaAudioMute->setChecked(set);
g.mw->qaAudioMute->trigger();
} else {
g.mw->qaAudioMute->setChecked(! set);
g.mw->qaAudioMute->trigger();
}
}
iter = qmRequest.find(QLatin1String("deaf"));
if (iter != qmRequest.constEnd()) {
bool set = iter.value().toBool();
@@ -136,6 +147,17 @@ void SocketRPCClient::processXml() {
g.mw->qaAudioDeaf->trigger();
}
}
iter = qmRequest.find(QLatin1String("toggledeaf"));
if (iter != qmRequest.constEnd()) {
bool set = iter.value().toBool();
if (set == g.s.bDeaf) {
g.mw->qaAudioDeaf->setChecked(set);
g.mw->qaAudioDeaf->trigger();
} else {
g.mw->qaAudioDeaf->setChecked(! set);
g.mw->qaAudioDeaf->trigger();
}
}
ack = true;
} else if (request.nodeName() == QLatin1String("url")) {
if (g.sh && g.sh->isRunning() && g.uiSession) {
@@ -160,10 +160,14 @@ int main(int argc, char **argv) {
" Mute self\n"
" unmute\n"
" Unmute self\n"
" togglemute\n"
" Toggle self-mute status\n"
" deaf\n"
" Deafen self\n"
" undeaf\n"
" Undeafen self\n"
" toggledeaf\n"
" Toggle self-deafen stauts\n"
"\n"
);

0 comments on commit 9b4ee06

Please sign in to comment.
You can’t perform that action at this time.