┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Faure <[email protected]>2007-12-18 15:08:59 +0000
committerDavid Faure <[email protected]>2007-12-18 15:08:59 +0000
commitbdb91e85ec76da0019044c0f9166be5979df41d6 (patch)
treeca79081f2f595dc0bbf61d297fae7bf950184288
parenta81e8d7661af572386aa146e92c23496b5b738f0 (diff)
Disable the action that launches kompare if kompare is not installed.
svn path=/trunk/KDE/kdebase/apps/; revision=750038
-rw-r--r--src/dolphinmainwindow.cpp7
1 files changed, 6 insertions, 1 deletions
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();