diff options
| author | Piotr Henryk Dabrowski <[email protected]> | 2019-11-17 18:14:27 +0100 |
|---|---|---|
| committer | Elvis Angelaccio <[email protected]> | 2019-11-17 18:15:26 +0100 |
| commit | 537dc7864ae31e7c1c9a0a0ecf559b7cace23a82 (patch) | |
| tree | 90fe0153147d1d816cc268edfdcfee5cd76fbffd /src/dolphinmainwindow.h | |
| parent | 808339bff654785d564d6c7d077062f6c649ff77 (diff) | |
[Dolphin] Open Preferred Search Tool action
Summary:
Added "Open Preferred Search Tool" action to Tools menu.
It runs preferred (topmost) external search tool as configured in the "More Search Tools" menu.
By default Ctrl+Shift+F shortcut is assigned to this action.
FEATURE: 384798
FIXED-IN: 20.03.80
{F7134238}
{F7134240}
{F7134242}
Reviewers: #dolphin, ngraham, elvisangelaccio
Reviewed By: #dolphin, ngraham
Subscribers: pkloc, kfm-devel, kde-doc-english
Tags: #dolphin, #documentation
Differential Revision: https://phabricator.kde.org/D22594
Diffstat (limited to 'src/dolphinmainwindow.h')
| -rw-r--r-- | src/dolphinmainwindow.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/dolphinmainwindow.h b/src/dolphinmainwindow.h index 3d86340d6..0520e1091 100644 --- a/src/dolphinmainwindow.h +++ b/src/dolphinmainwindow.h @@ -30,6 +30,7 @@ #include <QIcon> #include <QList> +#include <QMenu> #include <QPointer> #include <QUrl> #include <QVector> @@ -352,6 +353,15 @@ private slots: */ void toggleShowMenuBar(); + /** Sets up updates for "Open Preferred Search Tool" action. */ + void setupUpdateOpenPreferredSearchToolAction(); + + /** Updates "Open Preferred Search Tool" action. */ + void updateOpenPreferredSearchToolAction(); + + /** Opens preferred search tool for the current location. */ + void openPreferredSearchTool(); + /** Opens a terminal window for the current location. */ void openTerminal(); @@ -597,6 +607,15 @@ private: /** Adds "What's This?" texts to many widgets and StandardActions. */ void setupWhatsThis(); + /** + * Returns the KIO::StatJob::mostLocalUrl() for the active container URL + * if it's a local file. Otherwise returns the user's home path. + */ + QString activeContainerLocalPath(); + + /** Returns preferred search tool as configured in "More Search Tools" menu. */ + QPointer<QAction> preferredSearchTool(); + private: /** * Implements a custom error handling for the undo manager. This @@ -633,6 +652,9 @@ private: KToolBarPopupAction* m_backAction; KToolBarPopupAction* m_forwardAction; + + QMenu m_searchTools; + }; inline DolphinViewContainer* DolphinMainWindow::activeViewContainer() const |
