From: David Faure Date: Tue, 18 Dec 2007 15:08:59 +0000 (+0000) Subject: Disable the action that launches kompare if kompare is not installed. X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/commitdiff_plain/bdb91e85ec76da0019044c0f9166be5979df41d6 Disable the action that launches kompare if kompare is not installed. svn path=/trunk/KDE/kdebase/apps/; revision=750038 --- diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp index ea240ba83..acd1282a2 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();