summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHenrik Fehlauer <[email protected]>2018-02-15 22:32:02 +0100
committerHenrik Fehlauer <[email protected]>2018-02-15 22:58:37 +0100
commit8dcc864492e2a528adc96f35eb777850e3f7d221 (patch)
treecae1881458ff924e1892ab10487b8b845fa91f33
parent84260984aa7ac0177fcce40f1bced27d9582ed1b (diff)
Reorganize tools button menu for best user experience
Summary: After 5206cdda2292, 7034b50c5c9e and 45c37a64e1cc were worked on in parallel and added entries to the new {nav Tools} menu, it was necessary to put them in the right order in the end. The suggestion in D10542#207008 was met with approval, as {nav Open Screenshots Folder} seems like an often used feature and therefore belongs on top, and {nav Record Screen} is only slightly related to the actual screenshot and thus can go at the bottom. Ref T7841 Test Plan Menu still works, same order as in planned docbook patch (see D10542). {F5713238} Reviewers: #spectacle, gregormi, ngraham Reviewed By: #spectacle, ngraham Subscribers: ngraham Maniphest Tasks: T7841 Differential Revision: https://phabricator.kde.org/D10561
-rw-r--r--src/Gui/KSMainWindow.cpp21
1 files changed, 10 insertions, 11 deletions
diff --git a/src/Gui/KSMainWindow.cpp b/src/Gui/KSMainWindow.cpp
index 02f8a8a..2c3e895 100644
--- a/src/Gui/KSMainWindow.cpp
+++ b/src/Gui/KSMainWindow.cpp
@@ -152,13 +152,6 @@ void KSMainWindow::init()
KGuiItem::assign(mToolsButton, KGuiItem(i18n("Tools")));
mToolsButton->setIcon(QIcon::fromTheme(QStringLiteral("application-menu")));
mDialogButtonBox->addButton(mToolsButton, QDialogButtonBox::ActionRole);
- mScreenRecorderToolsMenu = mToolsMenu->addMenu(i18n("Record Screen"));
- connect(mScreenRecorderToolsMenu, &QMenu::aboutToShow, [this]()
- {
- mScreenrecorderToolsMenuFactory.reset(new KMoreToolsMenuFactory(QStringLiteral("spectacle/screenrecorder-tools")));
- mScreenRecorderToolsMenu->clear();
- mScreenrecorderToolsMenuFactory->fillMenuFromGroupingNames(mScreenRecorderToolsMenu, { QStringLiteral("screenrecorder") });
- } );
mToolsButton->setMenu(mToolsMenu);
KGuiItem::assign(mSendToButton, KGuiItem(i18n("Export")));
@@ -181,11 +174,17 @@ void KSMainWindow::init()
mDialogButtonBox->button(QDialogButtonBox::Help)->setMenu(helpMenu->menu());
// the tools menu
+ mToolsMenu->addAction(QIcon::fromTheme(QStringLiteral("document-open-folder")),
+ i18n("Open Screenshots Folder"),
+ this, &KSMainWindow::openScreenshotsFolder);
mToolsMenu->addAction(KStandardAction::print(this, &KSMainWindow::showPrintDialog, this));
- mToolsMenu->addAction(
- QIcon::fromTheme(QStringLiteral("document-open-folder")),
- i18n("Open Screenshots Folder"),
- this, &KSMainWindow::openScreenshotsFolder);
+ mScreenRecorderToolsMenu = mToolsMenu->addMenu(i18n("Record Screen"));
+ connect(mScreenRecorderToolsMenu, &QMenu::aboutToShow, [this]()
+ {
+ mScreenrecorderToolsMenuFactory.reset(new KMoreToolsMenuFactory(QStringLiteral("spectacle/screenrecorder-tools")));
+ mScreenRecorderToolsMenu->clear();
+ mScreenrecorderToolsMenuFactory->fillMenuFromGroupingNames(mScreenRecorderToolsMenu, { QStringLiteral("screenrecorder") });
+ } );
// the save menu
mSaveAsAction = KStandardAction::saveAs(this, &KSMainWindow::saveAs, this);