[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: playground/utils/dolphin/src
From: Peter Penz <peter.penz () gmx ! at>
Date: 2007-01-25 21:07:01
Message-ID: 1169759221.618617.19606.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 627164 by ppenz:
David's patches come in faster than light: removed code duplication, as a proper \
default implementation is now available in \
KonqUndoManager::UiInterface::copiedFileWasModified().
M +1 -21 dolphinmainwindow.cpp
M +1 -4 dolphinmainwindow.h
--- trunk/playground/utils/dolphin/src/dolphinmainwindow.cpp #627163:627164
@@ -1281,6 +1281,7 @@
}
DolphinMainWindow::UndoUiInterface::UndoUiInterface(DolphinMainWindow* mainWin) :
+ KonqUndoManager::UiInterface(mainWin),
m_mainWin(mainWin)
{
assert(m_mainWin != 0);
@@ -1296,25 +1297,4 @@
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 <hausmann@kde.org>
- // Copyright (C) 2006 David Faure <faure@kde.org>
- 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"
--- trunk/playground/utils/dolphin/src/dolphinmainwindow.h #627163:627164
@@ -379,10 +379,7 @@
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;
};
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic