mirror of
https://invent.kde.org/system/dolphin
synced 2024-09-17 15:31:20 +00:00
Disable the action that launches kompare if kompare is not installed.
svn path=/trunk/KDE/kdebase/apps/; revision=750038
This commit is contained in:
parent
a81e8d7661
commit
bdb91e85ec
|
@ -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();
|
||||
|
||||
|
|
Loading…
Reference in a new issue