]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/dolphinmainwindow.cpp
Reanimated drag & drop support for the icons view.
[dolphin.git] / src / dolphinmainwindow.cpp
index 61b7bb2218f93252039dc0fa49719bcb33ebce15..96a919747e17fb53567929d885d7fb5bb9a8736a 100644 (file)
 #include <kfiledialog.h>
 #include <kconfig.h>
 #include <kurl.h>
-#include <kstdaccel.h>
 #include <kaction.h>
-#include <kstdaction.h>
+#include <kstandardaction.h>
 #include <kmenu.h>
-#include <kio/renamedlg.h>
+#include <kio/renamedialog.h>
 #include <kinputdialog.h>
 #include <kshell.h>
 #include <kdesktopfile.h>
@@ -51,6 +50,7 @@
 #include <kstandarddirs.h>
 #include <krun.h>
 #include <klocale.h>
+#include <konqmimedata.h>
 
 #include <qclipboard.h>
 #include <q3dragobject.h>
 DolphinMainWindow::DolphinMainWindow() :
     KMainWindow(0),
     m_splitter(0),
-    m_activeView(0),
-    m_clipboardContainsCutData(false)
+    m_activeView(0)
 {
     setObjectName("Dolphin");
     m_view[PrimaryIdx] = 0;
     m_view[SecondaryIdx] = 0;
-
-    m_fileGroupActions.setAutoDelete(true);
-
-    // TODO: the following members are not used yet. See documentation
-    // of DolphinMainWindow::linkGroupActions() and DolphinMainWindow::linkToDeviceActions()
-    // in the header file for details.
-    //m_linkGroupActions.setAutoDelete(true);
-    //m_linkToDeviceActions.setAutoDelete(true);
 }
 
 DolphinMainWindow::~DolphinMainWindow()
 {
-    /*
-     * bye, bye managed window
-     */
-    DolphinApplication::app()->removeMainWindow( this );
+    qDeleteAll(m_fileGroupActions);
+    m_fileGroupActions.clear();
+
+    DolphinApplication::app()->removeMainWindow(this);
 }
 
 void DolphinMainWindow::setActiveView(DolphinView* view)
@@ -123,9 +114,10 @@ void DolphinMainWindow::setActiveView(DolphinView* view)
 }
 
 void DolphinMainWindow::dropUrls(const KUrl::List& urls,
-                       const KUrl& destination)
+                                 const KUrl& destination)
 {
-    int selectedIndex = -1;
+    m_dropDestination = destination;
+    m_droppedUrls = urls;
 
     /* KDE4-TODO
     const ButtonState keyboardState = KApplication::keyboardMouseState();
@@ -150,49 +142,22 @@ void DolphinMainWindow::dropUrls(const KUrl::List& urls,
         // no shortcut is used, hence open a popup menu
         KMenu popup(this);
 
-        popup.insertItem(SmallIcon("goto"), i18n("&Move Here") + "\t" /* KDE4-TODO: + KKey::modFlagLabel(KKey::SHIFT)*/, 0);
-        popup.insertItem(SmallIcon("editcopy"), i18n( "&Copy Here" ) /* KDE4-TODO + "\t" + KKey::modFlagLabel(KKey::CTRL)*/, 1);
-        popup.insertItem(i18n("&Link Here") /* KDE4-TODO + "\t" + KKey::modFlagLabel((KKey::ModFlag)(KKey::CTRL|KKey::SHIFT)) */, 2);
-        popup.insertSeparator();
-        popup.insertItem(SmallIcon("stop"), i18n("Cancel"), 3);
-        popup.setAccel(i18n("Escape"), 3);
+        QAction* moveAction = popup.addAction(SmallIcon("goto"), i18n("&Move Here"));
+        connect(moveAction, SIGNAL(triggered()), this, SLOT(moveDroppedItems()));
 
-        /* KDE4-TODO: selectedIndex = popup.exec(QCursor::pos()); */
-        popup.exec(QCursor::pos());
-        selectedIndex = 0; // KD4-TODO: use QAction instead of switch below
-        // See libkonq/konq_operations.cc: KonqOperations::doDropFileCopy() (and doDrop, the main method)
-    }
+        QAction* copyAction = popup.addAction(SmallIcon("editcopy"), i18n( "&Copy Here" ));
+        connect(copyAction, SIGNAL(triggered()), this, SLOT(copyDroppedItems()));
 
-    if (selectedIndex < 0) {
-        return;
-    }
+        QAction* linkAction = popup.addAction(i18n("&Link Here"));
+        connect(linkAction, SIGNAL(triggered()), this, SLOT(linkDroppedItems()));
 
-    switch (selectedIndex) {
-        case 0: {
-            // 'Move Here' has been selected
-            updateViewProperties(urls);
-            moveUrls(urls, destination);
-            break;
-        }
+        QAction* cancelAction = popup.addAction(SmallIcon("stop"), i18n("Cancel"));
+        popup.insertSeparator(cancelAction);
 
-        case 1: {
-            // 'Copy Here' has been selected
-            updateViewProperties(urls);
-            copyUrls(urls, destination);
-            break;
-        }
-
-        case 2: {
-            // 'Link Here' has been selected
-            KIO::Job* job = KIO::link(urls, destination);
-            addPendingUndoJob(job, DolphinCommand::Link, urls, destination);
-            break;
-        }
-
-        default:
-            // 'Cancel' has been selected
-            break;
+        popup.exec(QCursor::pos());
     }
+
+    m_droppedUrls.clear();
 }
 
 void DolphinMainWindow::refreshViews()
@@ -217,7 +182,7 @@ void DolphinMainWindow::refreshViews()
                                         m_splitter,
                                         url,
                                         props.viewMode(),
-                                        props.isShowHiddenFilesEnabled());
+                                        props.showHiddenFiles());
             connectViewSignals(i);
             m_view[i]->show();
         }
@@ -239,7 +204,7 @@ void DolphinMainWindow::slotShowHiddenFilesChanged()
 {
     KToggleAction* showHiddenFilesAction =
         static_cast<KToggleAction*>(actionCollection()->action("show_hidden_files"));
-    showHiddenFilesAction->setChecked(m_activeView->isShowHiddenFilesEnabled());
+    showHiddenFilesAction->setChecked(m_activeView->showHiddenFiles());
 }
 
 void DolphinMainWindow::slotSortingChanged(DolphinView::Sorting sorting)
@@ -324,6 +289,22 @@ void DolphinMainWindow::openNewMainWindow()
     DolphinApplication::app()->createMainWindow()->show();
 }
 
+void DolphinMainWindow::moveDroppedItems()
+{
+    moveUrls(m_droppedUrls, m_dropDestination);
+}
+
+void DolphinMainWindow::copyDroppedItems()
+{
+    copyUrls(m_droppedUrls, m_dropDestination);
+}
+
+void DolphinMainWindow::linkDroppedItems()
+{
+    KIO::Job* job = KIO::link(m_droppedUrls, m_dropDestination);
+    addPendingUndoJob(job, DolphinCommand::Link, m_droppedUrls, m_dropDestination);
+}
+
 void DolphinMainWindow::closeEvent(QCloseEvent* event)
 {
     // KDE4-TODO
@@ -388,7 +369,7 @@ void DolphinMainWindow::createFolder()
 
 
     if (baseUrl.isLocalFile() && QFileInfo(baseUrl.path(KUrl::AddTrailingSlash) + name).exists()) {
-        name = KIO::RenameDlg::suggestName(baseUrl, i18n("New Folder"));
+        name = KIO::RenameDialog::suggestName(baseUrl, i18n("New Folder"));
     }
 
     bool ok = false;
@@ -493,7 +474,7 @@ void DolphinMainWindow::createFile()
     const bool fileExists = viewUrl.isLocalFile() &&
                             QFileInfo(viewUrl.path(KUrl::AddTrailingSlash) + KIO::encodeFileName(name)).exists();
     if (fileExists) {
-        name = KIO::RenameDlg::suggestName(viewUrl, name);
+        name = KIO::RenameDialog::suggestName(viewUrl, name);
     }
 
     // let the user change the suggested file name
@@ -572,7 +553,7 @@ void DolphinMainWindow::deleteItems()
     const bool del = KMessageBox::warningContinueCancel(this,
                                                         text,
                                                         QString::null,
-                                                        KGuiItem(i18n("Delete"), SmallIcon("editdelete"))
+                                                        KGuiItem(i18n("Delete"), KIcon("editdelete"))
                                                        ) == KMessageBox::Continue;
     if (del) {
         KIO::Job* job = KIO::del(list);
@@ -618,7 +599,7 @@ void DolphinMainWindow::slotDeleteFileFinished(KJob* job)
 
 void DolphinMainWindow::slotUndoAvailable(bool available)
 {
-    QAction* undoAction = actionCollection()->action(KStdAction::stdName(KStdAction::Undo));
+    QAction* undoAction = actionCollection()->action(KStandardAction::stdName(KStandardAction::Undo));
     if (undoAction != 0) {
         undoAction->setEnabled(available);
     }
@@ -626,7 +607,7 @@ void DolphinMainWindow::slotUndoAvailable(bool available)
 
 void DolphinMainWindow::slotUndoTextChanged(const QString& text)
 {
-    QAction* undoAction = actionCollection()->action(KStdAction::stdName(KStdAction::Undo));
+    QAction* undoAction = actionCollection()->action(KStandardAction::stdName(KStandardAction::Undo));
     if (undoAction != 0) {
         undoAction->setText(text);
     }
@@ -634,7 +615,7 @@ void DolphinMainWindow::slotUndoTextChanged(const QString& text)
 
 void DolphinMainWindow::slotRedoAvailable(bool available)
 {
-    QAction* redoAction = actionCollection()->action(KStdAction::stdName(KStdAction::Redo));
+    QAction* redoAction = actionCollection()->action(KStandardAction::stdName(KStandardAction::Redo));
     if (redoAction != 0) {
         redoAction->setEnabled(available);
     }
@@ -642,7 +623,7 @@ void DolphinMainWindow::slotRedoAvailable(bool available)
 
 void DolphinMainWindow::slotRedoTextChanged(const QString& text)
 {
-    QAction* redoAction = actionCollection()->action(KStdAction::stdName(KStdAction::Redo));
+    QAction* redoAction = actionCollection()->action(KStandardAction::stdName(KStandardAction::Redo));
     if (redoAction != 0) {
         redoAction->setText(text);
     }
@@ -650,37 +631,31 @@ void DolphinMainWindow::slotRedoTextChanged(const QString& text)
 
 void DolphinMainWindow::cut()
 {
-    // TODO: this boolean doesn't work between instances of dolphin or with konqueror or with other
-    // apps. The "application/x-kde-cutselection" mimetype should be used instead, see KonqMimeData
-    // in libkonq
-    m_clipboardContainsCutData = true;
-    /* KDE4-TODO: Q3DragObject* data = new KUrlDrag(m_activeView->selectedUrls(),
-                                       widget());
-    QApplication::clipboard()->setData(data);*/
+    QMimeData* mimeData = new QMimeData();
+    const KUrl::List kdeUrls = m_activeView->selectedUrls();
+    const KUrl::List mostLocalUrls;
+    KonqMimeData::populateMimeData(mimeData, kdeUrls, mostLocalUrls, true);
+    QApplication::clipboard()->setMimeData(mimeData);
 }
 
 void DolphinMainWindow::copy()
 {
-    m_clipboardContainsCutData = false;
-    /* KDE4-TODO:
-    Q3DragObject* data = new KUrlDrag(m_activeView->selectedUrls(),
-                                     widget());
-    QApplication::clipboard()->setData(data);*/
+    QMimeData* mimeData = new QMimeData();
+    const KUrl::List kdeUrls = m_activeView->selectedUrls();
+    const KUrl::List mostLocalUrls;
+    KonqMimeData::populateMimeData(mimeData, kdeUrls, mostLocalUrls, false);
+
+    QApplication::clipboard()->setMimeData(mimeData);
 }
 
 void DolphinMainWindow::paste()
 {
-    /* KDE4-TODO:   - see KonqOperations::doPaste
     QClipboard* clipboard = QApplication::clipboard();
-    QMimeSource* data = clipboard->data();
-    if (!KUrlDrag::canDecode(data)) {
-        return;
-    }
+    const QMimeData* mimeData = clipboard->mimeData();
 
     clearStatusBar();
 
-    KUrl::List sourceUrls;
-    KUrlDrag::decode(data, sourceUrls);
+    const KUrl::List sourceUrls = KUrl::List::fromMimeData(mimeData);
 
     // per default the pasting is done into the current Url of the view
     KUrl destUrl(m_activeView->url());
@@ -699,34 +674,30 @@ void DolphinMainWindow::paste()
         }
     }
 
-
-    updateViewProperties(sourceUrls);
-    if (m_clipboardContainsCutData) {
+    if (KonqMimeData::decodeIsCutSelection(mimeData)) {
         moveUrls(sourceUrls, destUrl);
-        m_clipboardContainsCutData = false;
         clipboard->clear();
     }
     else {
         copyUrls(sourceUrls, destUrl);
-    }*/
+    }
 }
 
 void DolphinMainWindow::updatePasteAction()
 {
-    QAction* pasteAction = actionCollection()->action(KStdAction::stdName(KStdAction::Paste));
+    QAction* pasteAction = actionCollection()->action(KStandardAction::stdName(KStandardAction::Paste));
     if (pasteAction == 0) {
         return;
     }
 
     QString text(i18n("Paste"));
     QClipboard* clipboard = QApplication::clipboard();
-    const QMimeData* data = clipboard->mimeData();
-    /* KDE4-TODO:
-    if (KUrlDrag::canDecode(data)) {
+    const QMimeData* mimeData = clipboard->mimeData();
+
+    KUrl::List urls = KUrl::List::fromMimeData(mimeData);
+    if (!urls.isEmpty()) {
         pasteAction->setEnabled(true);
 
-        KUrl::List urls;
-        KUrlDrag::decode(data, urls);
         const int count = urls.count();
         if (count == 1) {
             pasteAction->setText(i18n("Paste 1 File"));
@@ -735,10 +706,10 @@ void DolphinMainWindow::updatePasteAction()
             pasteAction->setText(i18n("Paste %1 Files").arg(count));
         }
     }
-    else {*/
+    else {
         pasteAction->setEnabled(false);
         pasteAction->setText(i18n("Paste"));
-    //}
+    }
 
     if (pasteAction->isEnabled()) {
         KUrl::List urls = m_activeView->selectedUrls();
@@ -783,11 +754,6 @@ void DolphinMainWindow::setDetailsView()
     m_activeView->setMode(DolphinView::DetailsView);
 }
 
-void DolphinMainWindow::setPreviewsView()
-{
-    m_activeView->setMode(DolphinView::PreviewsView);
-}
-
 void DolphinMainWindow::sortByName()
 {
     m_activeView->setSorting(DolphinView::SortByName);
@@ -820,7 +786,7 @@ void DolphinMainWindow::toggleSplitView()
                                                0,
                                                m_view[PrimaryIdx]->url(),
                                                m_view[PrimaryIdx]->mode(),
-                                               m_view[PrimaryIdx]->isShowHiddenFilesEnabled());
+                                               m_view[PrimaryIdx]->showHiddenFiles());
         connectViewSignals(SecondaryIdx);
         m_splitter->addWidget(m_view[SecondaryIdx]);
         m_splitter->setSizes(QList<int>() << newWidth << newWidth);
@@ -858,14 +824,24 @@ void DolphinMainWindow::stopLoading()
 {
 }
 
-void DolphinMainWindow::showHiddenFiles()
+void DolphinMainWindow::togglePreview()
+{
+    clearStatusBar();
+
+    const KToggleAction* showPreviewAction =
+        static_cast<KToggleAction*>(actionCollection()->action("show_preview"));
+    const bool show = showPreviewAction->isChecked();
+    m_activeView->setShowPreview(show);
+}
+
+void DolphinMainWindow::toggleShowHiddenFiles()
 {
     clearStatusBar();
 
     const KToggleAction* showHiddenFilesAction =
         static_cast<KToggleAction*>(actionCollection()->action("show_hidden_files"));
     const bool show = showHiddenFilesAction->isChecked();
-    m_activeView->setShowHiddenFilesEnabled(show);
+    m_activeView->setShowHiddenFiles(show);
 }
 
 void DolphinMainWindow::showFilterBar()
@@ -1120,7 +1096,7 @@ void DolphinMainWindow::init()
                                          m_splitter,
                                          homeUrl,
                                          props.viewMode(),
-                                         props.isShowHiddenFilesEnabled());
+                                         props.showHiddenFiles());
     connectViewSignals(PrimaryIdx);
     m_view[PrimaryIdx]->show();
 
@@ -1193,11 +1169,11 @@ void DolphinMainWindow::setupActions()
     properties->setShortcut(Qt::Key_Alt | Qt::Key_Return);
     connect(properties, SIGNAL(triggered()), this, SLOT(properties()));
 
-    KStdAction::quit(this, SLOT(quit()), actionCollection());
+    KStandardAction::quit(this, SLOT(quit()), actionCollection());
 
     // setup 'Edit' menu
     UndoManager& undoManager = UndoManager::instance();
-    KStdAction::undo(this,
+    KStandardAction::undo(this,
                      SLOT(undo()),
                      actionCollection());
     connect(&undoManager, SIGNAL(undoAvailable(bool)),
@@ -1205,7 +1181,7 @@ void DolphinMainWindow::setupActions()
     connect(&undoManager, SIGNAL(undoTextChanged(const QString&)),
             this, SLOT(slotUndoTextChanged(const QString&)));
 
-    KStdAction::redo(this,
+    KStandardAction::redo(this,
                      SLOT(redo()),
                      actionCollection());
     connect(&undoManager, SIGNAL(redoAvailable(bool)),
@@ -1213,9 +1189,9 @@ void DolphinMainWindow::setupActions()
     connect(&undoManager, SIGNAL(redoTextChanged(const QString&)),
             this, SLOT(slotRedoTextChanged(const QString&)));
 
-    KStdAction::cut(this, SLOT(cut()), actionCollection());
-    KStdAction::copy(this, SLOT(copy()), actionCollection());
-    KStdAction::paste(this, SLOT(paste()), actionCollection());
+    KStandardAction::cut(this, SLOT(cut()), actionCollection());
+    KStandardAction::copy(this, SLOT(copy()), actionCollection());
+    KStandardAction::paste(this, SLOT(paste()), actionCollection());
 
     KAction* selectAll = new KAction(i18n("Select All"), actionCollection(), "select_all");
     selectAll->setShortcut(Qt::CTRL + Qt::Key_A);
@@ -1226,11 +1202,11 @@ void DolphinMainWindow::setupActions()
     connect(invertSelection, SIGNAL(triggered()), this, SLOT(invertSelection()));
 
     // setup 'View' menu
-    KStdAction::zoomIn(this,
+    KStandardAction::zoomIn(this,
                        SLOT(zoomIn()),
                        actionCollection());
 
-    KStdAction::zoomOut(this,
+    KStandardAction::zoomOut(this,
                         SLOT(zoomOut()),
                         actionCollection());
 
@@ -1244,15 +1220,9 @@ void DolphinMainWindow::setupActions()
     detailsView->setIcon(KIcon("view_text"));
     connect(detailsView, SIGNAL(triggered()), this, SLOT(setDetailsView()));
 
-    KToggleAction* previewsView = new KToggleAction(i18n("Previews"), actionCollection(), "previews");
-    previewsView->setShortcut(Qt::CTRL | Qt::Key_3);
-    previewsView->setIcon(KIcon("gvdirpart"));
-    connect(previewsView, SIGNAL(triggered()), this, SLOT(setPreviewsView()));
-
     QActionGroup* viewModeGroup = new QActionGroup(this);
     viewModeGroup->addAction(iconsView);
     viewModeGroup->addAction(detailsView);
-    viewModeGroup->addAction(previewsView);
 
     KToggleAction* sortByName = new KToggleAction(i18n("By Name"), actionCollection(), "by_name");
     connect(sortByName, SIGNAL(triggered()), this, SLOT(sortByName()));
@@ -1271,16 +1241,20 @@ void DolphinMainWindow::setupActions()
     KToggleAction* sortDescending = new KToggleAction(i18n("Descending"), actionCollection(), "descending");
     connect(sortDescending, SIGNAL(triggered()), this, SLOT(toggleSortOrder()));
 
+    KToggleAction* showPreview = new KToggleAction(i18n("Show Preview"), actionCollection(), "show_preview");
+    connect(showPreview, SIGNAL(triggered()), this, SLOT(togglePreview()));
+
     KToggleAction* showHiddenFiles = new KToggleAction(i18n("Show Hidden Files"), actionCollection(), "show_hidden_files");
     //showHiddenFiles->setShortcut(Qt::ALT | Qt::Key_      KDE4-TODO: what Qt-Key represents '.'?
-    connect(showHiddenFiles, SIGNAL(triggered()), this, SLOT(showHiddenFiles()));
+    connect(showHiddenFiles, SIGNAL(triggered()), this, SLOT(toggleShowHiddenFiles()));
 
     KToggleAction* split = new KToggleAction(i18n("Split View"), actionCollection(), "split_view");
     split->setShortcut(Qt::Key_F10);
     split->setIcon(KIcon("view_left_right"));
     connect(split, SIGNAL(triggered()), this, SLOT(toggleSplitView()));
 
-    KAction* reload = new KAction(i18n("Reload"), "F5", actionCollection(), "reload");
+    KAction* reload = new KAction(actionCollection(), "reload");
+    reload->setText(i18n("Reload"));
     reload->setShortcut(Qt::Key_F5);
     reload->setIcon(KIcon("reload"));
     connect(reload, SIGNAL(triggered()), this, SLOT(reloadView()));
@@ -1301,10 +1275,10 @@ void DolphinMainWindow::setupActions()
     connect(adjustViewProps, SIGNAL(triggered()), this, SLOT(adjustViewProperties()));
 
     // setup 'Go' menu
-    KStdAction::back(this, SLOT(goBack()), actionCollection());
-    KStdAction::forward(this, SLOT(goForward()), actionCollection());
-    KStdAction::up(this, SLOT(goUp()), actionCollection());
-    KStdAction::home(this, SLOT(goHome()), actionCollection());
+    KStandardAction::back(this, SLOT(goBack()), actionCollection());
+    KStandardAction::forward(this, SLOT(goForward()), actionCollection());
+    KStandardAction::up(this, SLOT(goUp()), actionCollection());
+    KStandardAction::home(this, SLOT(goHome()), actionCollection());
 
     // setup 'Tools' menu
     KAction* openTerminal = new KAction(i18n("Open Terminal"), actionCollection(), "open_terminal");
@@ -1327,7 +1301,7 @@ void DolphinMainWindow::setupActions()
     connect(compareFiles, SIGNAL(triggered()), this, SLOT(compareFiles()));
 
     // setup 'Settings' menu
-    KStdAction::preferences(this, SLOT(editSettings()), actionCollection());
+    KStandardAction::preferences(this, SLOT(editSettings()), actionCollection());
 }
 
 void DolphinMainWindow::setupDockWidgets()
@@ -1509,12 +1483,12 @@ void DolphinMainWindow::updateEditActions()
 
 void DolphinMainWindow::updateViewActions()
 {
-    QAction* zoomInAction = actionCollection()->action(KStdAction::stdName(KStdAction::ZoomIn));
+    QAction* zoomInAction = actionCollection()->action(KStandardAction::stdName(KStandardAction::ZoomIn));
     if (zoomInAction != 0) {
         zoomInAction->setEnabled(m_activeView->isZoomInPossible());
     }
 
-    QAction* zoomOutAction = actionCollection()->action(KStdAction::stdName(KStdAction::ZoomOut));
+    QAction* zoomOutAction = actionCollection()->action(KStandardAction::stdName(KStandardAction::ZoomOut));
     if (zoomOutAction != 0) {
         zoomOutAction->setEnabled(m_activeView->isZoomOutPossible());
     }
@@ -1527,9 +1501,9 @@ void DolphinMainWindow::updateViewActions()
         case DolphinView::DetailsView:
             action = actionCollection()->action("details");
             break;
-        case DolphinView::PreviewsView:
-            action = actionCollection()->action("previews");
-            break;
+        //case DolphinView::PreviewsView:
+        //    action = actionCollection()->action("previews");
+        //    break;
         default:
             break;
     }
@@ -1548,7 +1522,7 @@ void DolphinMainWindow::updateViewActions()
 
     KToggleAction* showHiddenFilesAction =
         static_cast<KToggleAction*>(actionCollection()->action("show_hidden_files"));
-    showHiddenFilesAction->setChecked(m_activeView->isShowHiddenFilesEnabled());
+    showHiddenFilesAction->setChecked(m_activeView->showHiddenFiles());
 
     KToggleAction* splitAction = static_cast<KToggleAction*>(actionCollection()->action("split_view"));
     splitAction->setChecked(m_view[SecondaryIdx] != 0);
@@ -1556,35 +1530,11 @@ void DolphinMainWindow::updateViewActions()
 
 void DolphinMainWindow::updateGoActions()
 {
-    QAction* goUpAction = actionCollection()->action(KStdAction::stdName(KStdAction::Up));
+    QAction* goUpAction = actionCollection()->action(KStandardAction::stdName(KStandardAction::Up));
     const KUrl& currentUrl = m_activeView->url();
     goUpAction->setEnabled(currentUrl.upUrl() != currentUrl);
 }
 
-void DolphinMainWindow::updateViewProperties(const KUrl::List& urls)
-{
-    if (urls.isEmpty()) {
-        return;
-    }
-
-    // Updating the view properties might take up to several seconds
-    // when dragging several thousand Urls. Writing a KIO slave for this
-    // use case is not worth the effort, but at least the main widget
-    // must be disabled and a progress should be shown.
-    ProgressIndicator progressIndicator(this,
-                                        i18n("Updating view properties..."),
-                                        QString::null,
-                                        urls.count());
-
-    KUrl::List::ConstIterator end = urls.end();
-    for(KUrl::List::ConstIterator it = urls.begin(); it != end; ++it) {
-        progressIndicator.execOperation();
-
-        ViewProperties props(*it);
-        props.save();
-    }
-}
-
 void DolphinMainWindow::copyUrls(const KUrl::List& source, const KUrl& dest)
 {
     KIO::Job* job = KIO::copy(source, dest);
@@ -1598,9 +1548,9 @@ void DolphinMainWindow::moveUrls(const KUrl::List& source, const KUrl& dest)
 }
 
 void DolphinMainWindow::addPendingUndoJob(KIO::Job* job,
-                                DolphinCommand::Type commandType,
-                                const KUrl::List& source,
-                                const KUrl& dest)
+                                          DolphinCommand::Type commandType,
+                                          const KUrl::List& source,
+                                          const KUrl& dest)
 {
     connect(job, SIGNAL(result(KJob*)),
             this, SLOT(addUndoOperation(KJob*)));