aboutsummaryrefslogtreecommitdiff
path: root/src/mainwindow.cpp
diff options
context:
space:
mode:
authorMike Skec <skec@protonmail.ch>2021-03-12 17:31:02 +1100
committerFelix Queißner <felix@ib-queissner.de>2021-03-12 10:35:57 +0100
commit7e2e8b973163e1716a08da7c798b1a7c0953fee1 (patch)
tree695830871c35f210a5fb09cec065547f55d80dfe /src/mainwindow.cpp
parentfa34218786147957fe512262a104a8f4e372bd4b (diff)
downloadkristall-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.cpp9
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);
}