diff options
author | Rohan Garg <rohangarg@ubuntu.com> | 2010-08-17 21:25:56 +0530 |
---|---|---|
committer | Rohan Garg <rohangarg@ubuntu.com> | 2010-08-17 21:31:20 +0530 |
commit | 05afd75d59e9163a303e35fde42afad378a9dd5c (patch) | |
tree | 6d426a7f010ac52790fbf97d0d39f93efa5e4444 /src/settings | |
parent | Merge commit 'refs/merge-requests/172' of git://gitorious.org/rekonq/mainline... (diff) | |
download | rekonq-05afd75d59e9163a303e35fde42afad378a9dd5c.tar.xz |
Define GeneralWidget::disableKGet() to disable KGet
when KGet is not installed
modified: src/settings/generalwidget.cpp
Declare GeneralWidget::disableKGet()
modified: src/settings/generalwidget.h
Diffstat (limited to 'src/settings')
-rw-r--r-- | src/settings/generalwidget.cpp | 20 | ||||
-rw-r--r-- | src/settings/generalwidget.h | 1 |
2 files changed, 21 insertions, 0 deletions
diff --git a/src/settings/generalwidget.cpp b/src/settings/generalwidget.cpp index 09c9e5c7..62695001 100644 --- a/src/settings/generalwidget.cpp +++ b/src/settings/generalwidget.cpp @@ -36,6 +36,9 @@ #include "mainwindow.h" #include "webtab.h" +//KDE Includes +#include <kstandarddirs.h> + GeneralWidget::GeneralWidget(QWidget *parent) : QWidget(parent) @@ -48,6 +51,8 @@ GeneralWidget::GeneralWidget(QWidget *parent) disableHomeSettings(ReKonfig::useNewTabPage()); connect(kcfg_useNewTabPage, SIGNAL(toggled(bool)), this, SLOT(disableHomeSettings(bool))); + + disableKGet(); } @@ -83,3 +88,18 @@ void GeneralWidget::disableHomeSettings(bool b) kcfg_homePage->setEnabled(!b); setHomeToCurrentPageButton->setEnabled(!b); } + +void GeneralWidget::disableKGet() +{ + + if (KStandardDirs::findExe("kget").isNull()) + { + kWarning() << "Install KGet to enable rekonq to use KGet as download manager"; + ReKonfig::setKgetDownload(false); + ReKonfig::setKgetList(false); + kcfg_kgetDownload->setDisabled(true); + kcfg_kgetList->setDisabled(true); + } + + return; +} diff --git a/src/settings/generalwidget.h b/src/settings/generalwidget.h index d669fd04..11a112fb 100644 --- a/src/settings/generalwidget.h +++ b/src/settings/generalwidget.h @@ -44,6 +44,7 @@ public: void save(); bool changed(); + void disableKGet(); signals: void changed(bool); |