From c325cb416113a059db736585c2c49cfae9885faa Mon Sep 17 00:00:00 2001 From: Nate Graham Date: Thu, 6 Jun 2019 08:46:43 -0600 Subject: [PATCH] Regularize tool names Summary: Currently, some of the items in the {nav Tools} menu have "tool" in the name, and some do not. This is in any event redundant since they're in a menu with that word in it already. In the toolbar, these actions become more inconsistent since their names change and can even differ between what's shown in the pop-up menu and what's shown on the button text. This patch regularizes the names, stops changing the names for the toolbar versions, and updates the docbook accordingly. Test Plan: {F6874459, size=full} {F6874458, size=full} Reviewers: #okular, #vdg, filipf Reviewed By: #vdg, filipf Subscribers: filipf, okular-devel, kde-doc-english Tags: #okular, #documentation Differential Revision: https://phabricator.kde.org/D21621 --- doc/index.docbook | 22 +++++++++++----------- ui/pageview.cpp | 16 +++++----------- 2 files changed, 16 insertions(+), 22 deletions(-) diff --git a/doc/index.docbook b/doc/index.docbook index 41f91461d..8b4b8028e 100644 --- a/doc/index.docbook +++ b/doc/index.docbook @@ -125,9 +125,9 @@ Context menu actions like Rename Bookmarks etc.) Another way is to hold the &LMB; down at any place on the document while dragging the mouse in the - opposite direction of where you want to move. This procedure only works if the Browse Tool is + opposite direction of where you want to move. This procedure only works if the Browse tool is enabled, which you can select by choosing Tools - Browse Tool. + Browse. @@ -357,8 +357,8 @@ Context menu actions like Rename Bookmarks etc.) The source file has been compiled successfully. &okular; knows which editor you would like to use. - The Browse Tool has to be enabled, which you can select by choosing - ToolsBrowse Tool + The Browse tool has to be enabled, which you can select by choosing + ToolsBrowse . @@ -814,7 +814,7 @@ Context menu actions like Rename Bookmarks etc.) - Activating the annotating toolbar will make you switch to the Browse Tool Mode. + Activating the annotating toolbar will make you switch to the Browse Mode. @@ -1723,7 +1723,7 @@ Context menu actions like Rename Bookmarks etc.) &Ctrl;1 Tools - Browse Tool + Browse @@ -1735,7 +1735,7 @@ Context menu actions like Rename Bookmarks etc.) &Ctrl;2 Tools - Zoom Tool + Zoom @@ -1747,11 +1747,11 @@ Context menu actions like Rename Bookmarks etc.) &Ctrl;3 Tools - Selection Tool + Area Selection - The mouse will work as a select tool. In that mode clicking &LMB; and dragging will give the option of copying the text/image of current selected area to the clipboard, speak a text or to save an image to a file. + The mouse will work as a rectangular region selection tool. In that mode clicking &LMB; and dragging will draw a selection box and provide the option of copying the selected content to the clipboard, speaking the selected text, or transforming the selection region into an image and saving it to a file. @@ -1759,7 +1759,7 @@ Context menu actions like Rename Bookmarks etc.) &Ctrl;4 Tools - Text Selection Tool + Text Selection @@ -1773,7 +1773,7 @@ Context menu actions like Rename Bookmarks etc.) &Ctrl;5 Tools - Table Selection Tool + Table Selection diff --git a/ui/pageview.cpp b/ui/pageview.cpp index 04ab4c72c..0e93a85be 100644 --- a/ui/pageview.cpp +++ b/ui/pageview.cpp @@ -591,19 +591,17 @@ do { \ // Mouse mode actions for viewer mode d->mouseModeActionGroup = new QActionGroup( this ); d->mouseModeActionGroup->setExclusive( true ); - d->aMouseNormal = new QAction( QIcon::fromTheme( QStringLiteral("input-mouse") ), i18n( "&Browse Tool" ), this ); + d->aMouseNormal = new QAction( QIcon::fromTheme( QStringLiteral("input-mouse") ), i18n( "&Browse" ), this ); ac->addAction(QStringLiteral("mouse_drag"), d->aMouseNormal ); connect( d->aMouseNormal, &QAction::triggered, this, &PageView::slotSetMouseNormal ); - d->aMouseNormal->setIconText( i18nc( "Browse Tool", "Browse" ) ); d->aMouseNormal->setCheckable( true ); ac->setDefaultShortcut(d->aMouseNormal, QKeySequence(Qt::CTRL + Qt::Key_1)); d->aMouseNormal->setActionGroup( d->mouseModeActionGroup ); d->aMouseNormal->setChecked( Okular::Settings::mouseMode() == Okular::Settings::EnumMouseMode::Browse ); - QAction * mz = new QAction(QIcon::fromTheme( QStringLiteral("page-zoom") ), i18n("&Zoom Tool"), this); + QAction * mz = new QAction(QIcon::fromTheme( QStringLiteral("page-zoom") ), i18n("&Zoom"), this); ac->addAction(QStringLiteral("mouse_zoom"), mz ); connect( mz, &QAction::triggered, this, &PageView::slotSetMouseZoom ); - mz->setIconText( i18nc( "Zoom Tool", "Zoom" ) ); mz->setCheckable( true ); ac->setDefaultShortcut(mz, QKeySequence(Qt::CTRL + Qt::Key_2)); mz->setActionGroup( d->mouseModeActionGroup ); @@ -623,29 +621,26 @@ void PageView::setupActions( KActionCollection * ac ) ac->setDefaultShortcuts(d->aZoomOut, KStandardShortcut::zoomOut()); // Mouse-Mode actions - d->aMouseSelect = new QAction(QIcon::fromTheme( QStringLiteral("select-rectangular") ), i18n("&Selection Tool"), this); + d->aMouseSelect = new QAction(QIcon::fromTheme( QStringLiteral("select-rectangular") ), i18n("Area &Selection"), this); ac->addAction(QStringLiteral("mouse_select"), d->aMouseSelect ); connect( d->aMouseSelect, &QAction::triggered, this, &PageView::slotSetMouseSelect ); - d->aMouseSelect->setIconText( i18nc( "Select Tool", "Selection" ) ); d->aMouseSelect->setCheckable( true ); ac->setDefaultShortcut(d->aMouseSelect, Qt::CTRL + Qt::Key_3); d->aMouseSelect->setActionGroup( d->mouseModeActionGroup ); d->aMouseSelect->setChecked( Okular::Settings::mouseMode() == Okular::Settings::EnumMouseMode::RectSelect ); - d->aMouseTextSelect = new QAction(QIcon::fromTheme( QStringLiteral("draw-text") ), i18n("&Text Selection Tool"), this); + d->aMouseTextSelect = new QAction(QIcon::fromTheme( QStringLiteral("draw-text") ), i18n("&Text Selection"), this); ac->addAction(QStringLiteral("mouse_textselect"), d->aMouseTextSelect ); connect( d->aMouseTextSelect, &QAction::triggered, this, &PageView::slotSetMouseTextSelect ); - d->aMouseTextSelect->setIconText( i18nc( "Text Selection Tool", "Text Selection" ) ); d->aMouseTextSelect->setCheckable( true ); ac->setDefaultShortcut(d->aMouseTextSelect, Qt::CTRL + Qt::Key_4); d->aMouseTextSelect->setActionGroup( d->mouseModeActionGroup ); d->aMouseTextSelect->setChecked( Okular::Settings::mouseMode() == Okular::Settings::EnumMouseMode::TextSelect ); - d->aMouseTableSelect = new QAction(QIcon::fromTheme( QStringLiteral("table") ), i18n("T&able Selection Tool"), this); + d->aMouseTableSelect = new QAction(QIcon::fromTheme( QStringLiteral("table") ), i18n("T&able Selection"), this); ac->addAction(QStringLiteral("mouse_tableselect"), d->aMouseTableSelect ); connect( d->aMouseTableSelect, &QAction::triggered, this, &PageView::slotSetMouseTableSelect ); - d->aMouseTableSelect->setIconText( i18nc( "Table Selection Tool", "Table Selection" ) ); d->aMouseTableSelect->setCheckable( true ); ac->setDefaultShortcut(d->aMouseTableSelect, Qt::CTRL + Qt::Key_5); d->aMouseTableSelect->setActionGroup( d->mouseModeActionGroup ); @@ -654,7 +649,6 @@ void PageView::setupActions( KActionCollection * ac ) d->aMouseMagnifier = new QAction(QIcon::fromTheme( QStringLiteral("document-preview") ), i18n("&Magnifier"), this); ac->addAction(QStringLiteral("mouse_magnifier"), d->aMouseMagnifier ); connect( d->aMouseMagnifier, &QAction::triggered, this, &PageView::slotSetMouseMagnifier ); - d->aMouseMagnifier->setIconText( i18nc( "Magnifier Tool", "Magnifier" ) ); d->aMouseMagnifier->setCheckable( true ); ac->setDefaultShortcut(d->aMouseMagnifier, Qt::CTRL + Qt::Key_6); d->aMouseMagnifier->setActionGroup( d->mouseModeActionGroup );