mirror of
https://github.com/mumble-voip/mumble.git
synced 2025-10-26 11:19:16 +00:00
FEAT(client): Add "Move To Own Channel" action to user context menu
Previously, there was no way to move users from channel to channel using only the keyboard. For accessibility reasons, that was not ideal. This commit adds a new action to the user context menu allowing to move the selected user to your own channel (given enough permissions). While this is a decent workaround, the end goal will be to remove this action and replace it with a dedicated dialog to choose the channel a user will be moved to. See #4642
This commit is contained in:
parent
cd7b8ef19f
commit
f63b7b42db
@ -1662,10 +1662,9 @@ void MainWindow::qmUser_aboutToShow() {
|
||||
|
||||
qmUser->clear();
|
||||
|
||||
if (self && p && !isSelf) {
|
||||
if (self && p && !isSelf && self->cChannel != p->cChannel) {
|
||||
qmUser->addAction(qaUserJoin);
|
||||
qaUserJoin->setEnabled(self->cChannel != p->cChannel);
|
||||
|
||||
qmUser->addAction(qaUserMove);
|
||||
qmUser->addSeparator();
|
||||
}
|
||||
|
||||
@ -2344,6 +2343,18 @@ void MainWindow::on_qaUserJoin_triggered() {
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::on_qaUserMove_triggered() {
|
||||
const ClientUser *user = getContextMenuUser();
|
||||
|
||||
if (user) {
|
||||
const Channel *channel = ClientUser::get(Global::get().uiSession)->cChannel;
|
||||
|
||||
if (channel) {
|
||||
Global::get().sh->joinChannel(user->uiSession, channel->iId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::on_qaChannelListen_triggered() {
|
||||
Channel *c = getContextMenuChannel();
|
||||
|
||||
|
||||
@ -260,6 +260,7 @@ public slots:
|
||||
void qmChannel_aboutToShow();
|
||||
void on_qaChannelJoin_triggered();
|
||||
void on_qaUserJoin_triggered();
|
||||
void on_qaUserMove_triggered();
|
||||
void on_qaChannelListen_triggered();
|
||||
void on_qaChannelAdd_triggered();
|
||||
void on_qaChannelRemove_triggered();
|
||||
|
||||
@ -1034,6 +1034,14 @@ the channel's context menu.</string>
|
||||
<string>Joins the channel of this user.</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="qaUserMove">
|
||||
<property name="text">
|
||||
<string>M&ove To Own Channel</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Moves this user to your current channel.</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="qaUserLocalIgnoreTTS">
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user