From 53d65e6392d3b03d7709385df5006d5d34c22852 Mon Sep 17 00:00:00 2001 From: David Faure Date: Thu, 15 Nov 2007 14:59:02 +0000 Subject: Implement renaming in dolphinpart. No more rename action provided by konqueror, the part provides it now. Had to move a bit of code around in dolphin, as discussed with Peter. svn path=/trunk/KDE/kdebase/apps/; revision=737121 --- src/dolphinmainwindow.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/dolphinmainwindow.cpp') diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp index 18476adb5..77cb13c02 100644 --- a/src/dolphinmainwindow.cpp +++ b/src/dolphinmainwindow.cpp @@ -53,7 +53,6 @@ #include #include #include -#include #include #include #include @@ -123,10 +122,9 @@ void DolphinMainWindow::toggleViews() m_viewContainer[SecondaryView] = container; } -void DolphinMainWindow::rename(const KUrl& oldUrl, const KUrl& newUrl) +void DolphinMainWindow::slotRenaming() { clearStatusBar(); - KonqOperations::rename(this, oldUrl, newUrl); m_undoCommandTypes.append(KonqFileUndoManager::RENAME); } @@ -484,7 +482,7 @@ void DolphinMainWindow::updateNewMenu() void DolphinMainWindow::rename() { clearStatusBar(); - m_activeViewContainer->renameSelectedItems(); + m_activeViewContainer->view()->renameSelectedItems(); } void DolphinMainWindow::moveToTrash() @@ -1460,7 +1458,7 @@ void DolphinMainWindow::updateEditActions() QAction* renameAction = actionCollection()->action("rename"); if (renameAction != 0) { - renameAction->setEnabled(list.count() >= 1); + renameAction->setEnabled(true); } bool enableMoveToTrash = true; @@ -1583,6 +1581,8 @@ void DolphinMainWindow::connectViewSignals(int viewIndex) this, SLOT(slotRequestItemInfo(KFileItem))); connect(view, SIGNAL(activated()), this, SLOT(toggleActiveView())); + connect(view, SIGNAL(renaming()), + this, SLOT(slotRenaming())); const KUrlNavigator* navigator = container->urlNavigator(); connect(navigator, SIGNAL(urlChanged(const KUrl&)), -- cgit v1.3