lists.zerezo.com



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

***BOGO*** Dolphin Patch ?



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
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);
     }
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 <<