diff options
| author | Peter Penz <[email protected]> | 2011-04-10 18:32:53 +0200 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2011-04-10 18:36:24 +0200 |
| commit | 426aac2eab61b0d0da84dfa08c62725b5889b31a (patch) | |
| tree | 5d4c8fb5c533b5b3238fa80eed712db5730a0200 /src/dolphinpart.cpp | |
| parent | 2baa9ec45a3e7e169e73ee74c74c0954702ab882 (diff) | |
Readd KFind shortcut for the Dolphin KPart
When the searching has been integrated into Dolphin the "Find File..."
entry had been removed from the Tools menu. Readd it into the Dolphin
KPart so that it is still available for Konqueror.
BUG: 270072
FIXED-IN: 4.7.0
Diffstat (limited to 'src/dolphinpart.cpp')
| -rw-r--r-- | src/dolphinpart.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/dolphinpart.cpp b/src/dolphinpart.cpp index c861e1d2b..299043595 100644 --- a/src/dolphinpart.cpp +++ b/src/dolphinpart.cpp @@ -31,6 +31,7 @@ #include <KLocale> #include <KMessageBox> #include <KPluginFactory> +#include <KRun> #include <KToggleAction> #include <KIO/NetAccess> #include <KToolInvocation> @@ -193,6 +194,12 @@ void DolphinPart::createActions() goActionGroup); // Tools menu + KAction* findFile = actionCollection()->addAction("find_file"); + findFile->setText(i18nc("@action:inmenu Tools", "Find File...")); + findFile->setShortcut(Qt::CTRL | Qt::Key_F); + findFile->setIcon(KIcon("edit-find")); + connect(findFile, SIGNAL(triggered()), this, SLOT(slotFindFile())); + if (KAuthorized::authorizeKAction("shell_access")) { KAction* action = actionCollection()->addAction("open_terminal"); action->setIcon(KIcon("utilities-terminal")); @@ -200,7 +207,6 @@ void DolphinPart::createActions() connect(action, SIGNAL(triggered()), SLOT(slotOpenTerminal())); action->setShortcut(Qt::Key_F4); } - } void DolphinPart::createGoAction(const char* name, const char* iconName, @@ -516,6 +522,11 @@ void DolphinPart::slotOpenTerminal() KToolInvocation::invokeTerminal(QString(), dir); } +void DolphinPart::slotFindFile() +{ + KRun::run("kfind", url(), widget()); +} + void DolphinPart::updateNewMenu() { // As requested by KNewFileMenu : |
