From fb0b2a777ba8064d4afc3e4e38a80d3505b49d0a Mon Sep 17 00:00:00 2001 From: Peter Penz Date: Thu, 25 Jan 2007 19:37:19 +0000 Subject: Use custom implementation of KonqUndoManager::UiInterface for Dolphin. This allows that error messages are shown inside the status bar of Dolphin (otherwise a modal error dialog containing an "OK" button would be opened). svn path=/trunk/playground/utils/dolphin/; revision=627130 --- src/dolphinmainwindow.h | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) (limited to 'src/dolphinmainwindow.h') diff --git a/src/dolphinmainwindow.h b/src/dolphinmainwindow.h index 804192aa4..ac10a37b4 100644 --- a/src/dolphinmainwindow.h +++ b/src/dolphinmainwindow.h @@ -27,6 +27,7 @@ #include #include #include +#include #include @@ -338,6 +339,7 @@ private: void updateGoActions(); void copyUrls(const KUrl::List& source, const KUrl& dest); void moveUrls(const KUrl::List& source, const KUrl& dest); + void linkUrls(const KUrl::List& source, const KUrl& dest); void clearStatusBar(); /** @@ -367,14 +369,22 @@ private: /// remember pending undo operations until they are finished QList m_undoOperations; - /** Contains meta information for creating files. */ - struct CreateFileEntry - { - QString name; - QString filePath; - QString templatePath; - QString icon; - QString comment; + /** + * Implements a custom error handling for the undo manager. This + * assures that all errors are shown in the status bar of Dolphin + * instead as modal error dialog with an OK button. + */ + class UndoUiInterface : public KonqUndoManager::UiInterface { + public: + 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; }; }; -- cgit v1.3