]> cloud.milkyroute.net Git - dolphin.git/commitdiff
David's patches come in faster than light: removed code duplication, as a proper...
authorPeter Penz <peter.penz19@gmail.com>
Thu, 25 Jan 2007 21:06:59 +0000 (21:06 +0000)
committerPeter Penz <peter.penz19@gmail.com>
Thu, 25 Jan 2007 21:06:59 +0000 (21:06 +0000)
svn path=/trunk/playground/utils/dolphin/; revision=627164

src/dolphinmainwindow.cpp
src/dolphinmainwindow.h

index 203a85b384286e05e57dd184655a5c5e33a677a1..300d99d928eccff08b0354ffd95629a91f3b355e 100644 (file)
@@ -1281,6 +1281,7 @@ void DolphinMainWindow::connectViewSignals(int viewIndex)
 }\r
 \r
 DolphinMainWindow::UndoUiInterface::UndoUiInterface(DolphinMainWindow* mainWin) :\r
 }\r
 \r
 DolphinMainWindow::UndoUiInterface::UndoUiInterface(DolphinMainWindow* mainWin) :\r
+    KonqUndoManager::UiInterface(mainWin),\r
     m_mainWin(mainWin)\r
 {\r
     assert(m_mainWin != 0);\r
     m_mainWin(mainWin)\r
 {\r
     assert(m_mainWin != 0);\r
@@ -1296,25 +1297,4 @@ void DolphinMainWindow::UndoUiInterface::jobError(KIO::Job* job)
     statusBar->setMessage(job->errorString(), DolphinStatusBar::Error);\r
 }\r
 \r
     statusBar->setMessage(job->errorString(), DolphinStatusBar::Error);\r
 }\r
 \r
-bool DolphinMainWindow::UndoUiInterface::copiedFileWasModified(const KUrl& src,\r
-                                                               const KUrl& dest,\r
-                                                               time_t /*srcTime*/,\r
-                                                               time_t destTime)\r
-{\r
-    // The following code has been taken from libkonq/konq_undo.cc\r
-    // Copyright (C) 2000 Simon Hausmann <hausmann@kde.org>\r
-    // Copyright (C) 2006 David Faure <faure@kde.org>\r
-    const QDateTime destDt = QDateTime::fromTime_t(destTime);\r
-    const QString timeStr = KGlobal::locale()->formatDateTime(destDt, true /* short */);\r
-    return KMessageBox::warningContinueCancel(\r
-        m_mainWin,\r
-        i18n( "The file %1 was copied from %2, but since then it has apparently been modified at %3.\n"\r
-              "Undoing the copy will delete the file, and all modifications will be lost.\n"\r
-              "Are you sure you want to delete %4?", dest.pathOrUrl(), src.pathOrUrl(), timeStr, dest.pathOrUrl()),\r
-        i18n( "Undo File Copy Confirmation" ),\r
-        KStandardGuiItem::cont(),\r
-        QString(),\r
-        KMessageBox::Notify | KMessageBox::Dangerous ) == KMessageBox::Continue;\r
-}\r
-\r
 #include "dolphinmainwindow.moc"\r
 #include "dolphinmainwindow.moc"\r
index ac10a37b458234e773895d99caed6339703075a6..6052ec5baf5395fd36ecbdce7c709830ac3e3579 100644 (file)
@@ -379,10 +379,7 @@ private:
         UndoUiInterface(DolphinMainWindow* mainWin);
         virtual ~UndoUiInterface();
         virtual void jobError(KIO::Job* job);
         UndoUiInterface(DolphinMainWindow* mainWin);
         virtual ~UndoUiInterface();
         virtual void jobError(KIO::Job* job);
-        virtual bool copiedFileWasModified(const KUrl& src,
-                                           const KUrl& dest,
-                                           time_t srcTime,
-                                           time_t destTime);
+
     private:
         DolphinMainWindow* m_mainWin;
     };
     private:
         DolphinMainWindow* m_mainWin;
     };