From bdb91e85ec76da0019044c0f9166be5979df41d6 Mon Sep 17 00:00:00 2001 From: David Faure Date: Tue, 18 Dec 2007 15:08:59 +0000 Subject: [PATCH] Disable the action that launches kompare if kompare is not installed. svn path=/trunk/KDE/kdebase/apps/; revision=750038 --- src/dolphinmainwindow.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp index ea240ba83c..acd1282a2a 100644 --- a/src/dolphinmainwindow.cpp +++ b/src/dolphinmainwindow.cpp @@ -321,7 +321,12 @@ void DolphinMainWindow::slotSelectionChanged(const KFileItemList& selection) } QAction* compareFilesAction = actionCollection()->action("compare_files"); - compareFilesAction->setEnabled(selectedUrlsCount == 2); + if (selectedUrlsCount == 2) { + const bool kompareInstalled = !KGlobal::dirs()->findExe("kompare").isEmpty(); + compareFilesAction->setEnabled(selectedUrlsCount == 2 && kompareInstalled); + } else { + compareFilesAction->setEnabled(false); + } m_activeViewContainer->updateStatusBar();