┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/dolphinmainwindow.cpp
diff options
context:
space:
mode:
authorPeter Penz <[email protected]>2007-01-25 21:06:59 +0000
committerPeter Penz <[email protected]>2007-01-25 21:06:59 +0000
commit5e22e4efbae47541b5fb712de149ad4653500f83 (patch)
tree9985a9f7d334263509684dc0c06790ea12b00950 /src/dolphinmainwindow.cpp
parentfb0b2a777ba8064d4afc3e4e38a80d3505b49d0a (diff)
David's patches come in faster than light: removed code duplication, as a proper default implementation is now available in KonqUndoManager::UiInterface::copiedFileWasModified().
svn path=/trunk/playground/utils/dolphin/; revision=627164
Diffstat (limited to 'src/dolphinmainwindow.cpp')
-rw-r--r--src/dolphinmainwindow.cpp22
1 files changed, 1 insertions, 21 deletions
diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp
index 203a85b38..300d99d92 100644
--- a/src/dolphinmainwindow.cpp
+++ b/src/dolphinmainwindow.cpp
@@ -1281,6 +1281,7 @@ void DolphinMainWindow::connectViewSignals(int viewIndex)
}
DolphinMainWindow::UndoUiInterface::UndoUiInterface(DolphinMainWindow* mainWin) :
+ KonqUndoManager::UiInterface(mainWin),
m_mainWin(mainWin)
{
assert(m_mainWin != 0);
@@ -1296,25 +1297,4 @@ void DolphinMainWindow::UndoUiInterface::jobError(KIO::Job* job)
statusBar->setMessage(job->errorString(), DolphinStatusBar::Error);
}
-bool DolphinMainWindow::UndoUiInterface::copiedFileWasModified(const KUrl& src,
- const KUrl& dest,
- time_t /*srcTime*/,
- time_t destTime)
-{
- // The following code has been taken from libkonq/konq_undo.cc
- // Copyright (C) 2000 Simon Hausmann <[email protected]>
- // Copyright (C) 2006 David Faure <[email protected]>
- const QDateTime destDt = QDateTime::fromTime_t(destTime);
- const QString timeStr = KGlobal::locale()->formatDateTime(destDt, true /* short */);
- return KMessageBox::warningContinueCancel(
- m_mainWin,
- i18n( "The file %1 was copied from %2, but since then it has apparently been modified at %3.\n"
- "Undoing the copy will delete the file, and all modifications will be lost.\n"
- "Are you sure you want to delete %4?", dest.pathOrUrl(), src.pathOrUrl(), timeStr, dest.pathOrUrl()),
- i18n( "Undo File Copy Confirmation" ),
- KStandardGuiItem::cont(),
- QString(),
- KMessageBox::Notify | KMessageBox::Dangerous ) == KMessageBox::Continue;
-}
-
#include "dolphinmainwindow.moc"