[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Dolphin Patch ?
From:       Andreas Scherf <scherfa () arcor ! de>
Date:       2008-06-27 23:36:47
Message-ID: 200806280136.48077.scherfa () arcor ! de
[Download RAW message or body]

Hello, 
i changed one thing in the selection part of the dolphin main window.
Everytime 2 files/dirs are selected dolphin searches for "kompare".
I think that we could test this only once to safe time. If somebody 
install/removes compare while running dolphin he couldn't use kompare.
But i think the runtime costs are reduced. Ok ?

Andreas

["dolphinmainwindow_cpp.diff" (text/x-diff)]

Index: apps/dolphin/src/dolphinmainwindow.cpp
===================================================================
--- apps/dolphin/src/dolphinmainwindow.cpp	(Revision 825366)
+++ apps/dolphin/src/dolphinmainwindow.cpp	(Arbeitskopie)
@@ -104,6 +104,8 @@
     KIO::FileUndoManager* undoManager = KIO::FileUndoManager::self();
     undoManager->setUiInterface(new UndoUiInterface());
 
+    kompareInstalled = !KGlobal::dirs()->findExe("kompare").isEmpty();
+
     connect(undoManager, SIGNAL(undoAvailable(bool)),
             this, SLOT(slotUndoAvailable(bool)));
     connect(undoManager, SIGNAL(undoTextChanged(const QString&)),
@@ -209,8 +211,7 @@
 
     QAction* compareFilesAction = actionCollection()->action("compare_files");
     if (selectedUrlsCount == 2) {
-        const bool kompareInstalled = !KGlobal::dirs()->findExe("kompare").isEmpty();
-        compareFilesAction->setEnabled(selectedUrlsCount == 2 && kompareInstalled);
+        compareFilesAction->setEnabled(kompareInstalled);
     } else {
         compareFilesAction->setEnabled(false);
     }

["dolphinmainwindow_h.diff" (text/x-diff)]

Index: apps/dolphin/src/dolphinmainwindow.h
===================================================================
--- apps/dolphin/src/dolphinmainwindow.h	(Revision 825366)
+++ apps/dolphin/src/dolphinmainwindow.h	(Arbeitskopie)
@@ -403,6 +403,7 @@
     DolphinViewContainer* m_activeViewContainer;
     QVBoxLayout* m_centralWidgetLayout;
     int m_id;
+	bool kompareInstalled;
 
     struct ViewTab
     {


>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic