Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 8dcc8644 authored by Henrik Fehlauer's avatar Henrik Fehlauer

Reorganize tools button menu for best user experience

Summary:
After 5206cdda, 7034b50c and 45c37a64 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
parent 84260984
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment