Disable the action that launches kompare if kompare is not installed.

svn path=/trunk/KDE/kdebase/apps/; revision=750038
This commit is contained in:
David Faure 2007-12-18 15:08:59 +00:00
parent a81e8d7661
commit bdb91e85ec

View file

@ -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();