diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-09-11 01:35:04 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-09-11 01:35:04 +0000 |
commit | 1ed307edd091effc390a7b98986fccb0f8307582 (patch) | |
tree | cc25a7cbfe172db6e563360d2e6fae1b78f6c249 /bibletime/frontend/btinstallmgr.cpp | |
parent | 84b273fdaa6358ec5e9bacf8a2a1214cd8612f28 (diff) | |
download | bibletime-1ed307edd091effc390a7b98986fccb0f8307582.tar.gz bibletime-1ed307edd091effc390a7b98986fccb0f8307582.zip |
Reactivated bookshelf manager for Sword 0.8 and above
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/bibletime@1173986 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'bibletime/frontend/btinstallmgr.cpp')
-rw-r--r-- | bibletime/frontend/btinstallmgr.cpp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/bibletime/frontend/btinstallmgr.cpp b/bibletime/frontend/btinstallmgr.cpp index 76eef81..b253286 100644 --- a/bibletime/frontend/btinstallmgr.cpp +++ b/bibletime/frontend/btinstallmgr.cpp @@ -10,6 +10,7 @@ //BibleTime includes #include "btinstallmgr.h" #include "util/cpointers.h" +#include "cbtconfig.h" //Qt includes #include <tqfile.h> @@ -18,8 +19,11 @@ //KDE includes #include <kapplication.h> #include <kglobal.h> +#include <klocale.h> #include <kstandarddirs.h> #include <kprocess.h> +#include <kconfig.h> +#include <kmessagebox.h> //Sword includes #include <filemgr.h> @@ -269,8 +273,29 @@ namespace BookshelfManager { BTInstallMgr::BTInstallMgr() : InstallMgr(Tool::RemoteConfig::configPath().latin1(), this) { //use this class also as status reporter this->setFTPPassive(true); + } +#ifdef SWORD_INTERNET_WARNING + bool BTInstallMgr::isUserDisclaimerConfirmed() const + { + KConfig* config = CBTConfig::getConfig(); + config->setGroup("Remote Resources"); + if (config->readNumEntry("Allowed", 0) == 1) { + return true; + } + else { + if (KMessageBox::questionYesNo(0, i18n("Do you wish to allow BibleTime to access the Internet?\nWARNING: Click DENY if you live in a persecuted country!"), i18n("Confirm Internet Access"), i18n("DENY"), i18n("Allow") ) == KMessageBox::No ) { + config->setGroup("Remote Resources"); + config->writeEntry("Allowed", 1); + config->sync(); + return true; + } + else { + return false; + } + } } +#endif BTInstallMgr::~BTInstallMgr() { terminate(); //make sure to close the connection |