diff options
| author | Mike Skec <skec@protonmail.ch> | 2021-03-12 17:31:02 +1100 |
|---|---|---|
| committer | Felix Queißner <felix@ib-queissner.de> | 2021-03-12 10:35:57 +0100 |
| commit | 7e2e8b973163e1716a08da7c798b1a7c0953fee1 (patch) | |
| tree | 695830871c35f210a5fb09cec065547f55d80dfe /src/mainwindow.cpp | |
| parent | fa34218786147957fe512262a104a8f4e372bd4b (diff) | |
| download | kristall-7e2e8b973163e1716a08da7c798b1a7c0953fee1.tar.gz | |
Add accelerators to menubar
A bit of a hack was needed to add these to the dock menu items - the accelerators won't work in non-English languages
Diffstat (limited to 'src/mainwindow.cpp')
| -rw-r--r-- | src/mainwindow.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index ea34b74..18cc557 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -50,6 +50,15 @@ MainWindow::MainWindow(QApplication * app, QWidget *parent) : QAction * act = dock->toggleViewAction(); act->setShortcut(dock->property("_shortcut").toString()); // act->setIcon(dock->windowIcon()); + + // TODO: make this work in non-English languages somehow + if (act->text() == "Document Outline") + act->setText("Document &Outline"); + else if (act->text() == "Favourites") + act->setText("&Favourites"); + else if (act->text() == "History") + act->setText("&History"); + this->ui->menuView->addAction(act); } |
