Skip to content

Commit

Permalink
FIX(client): Show shortcut for "Paste and Send" in menu
Browse files Browse the repository at this point in the history
  • Loading branch information
Hartmnt committed Sep 26, 2024
1 parent 41ed3de commit b75bc8a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/mumble/CustomElements.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,10 @@ void ChatbarTextEdit::contextMenuEvent(QContextMenuEvent *qcme) {
QMenu *menu = createStandardContextMenu();

QAction *action = new QAction(tr("Paste and &Send") + QLatin1Char('\t'), menu);
action->setShortcut(static_cast< int >(Qt::CTRL) | Qt::Key_Shift | Qt::Key_V);
action->setShortcut(QKeySequence(Qt::Key_V, Qt::ShiftModifier, Qt::ControlModifier));
action->setShortcutContext(Qt::ApplicationShortcut);
action->setEnabled(!QApplication::clipboard()->text().isEmpty());
action->setShortcutVisibleInContextMenu(true);
connect(action, SIGNAL(triggered()), this, SLOT(pasteAndSend_triggered()));
if (menu->actions().count() > 6)
menu->insertAction(menu->actions()[6], action);
Expand Down

0 comments on commit b75bc8a

Please sign in to comment.