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
v3.5.13-sru
tpearson 14 years ago
parent 84b273fdaa
commit 1ed307edd0

@ -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

@ -15,7 +15,7 @@
//BibleTIme includes
#include "backend/cswordbackend.h"
#include "config.h"
//sword includes
#include <installmgr.h>
@ -27,6 +27,10 @@
#include <tqstring.h>
#include <tqstringlist.h>
#ifdef SWORD_MULTIVERSE
#define SWORD_INTERNET_WARNING 1
#endif
namespace BookshelfManager {
typedef TQPtrList<sword::InstallSource> InstallSourceList;
@ -80,6 +84,12 @@ private:
BTInstallMgr();
virtual ~BTInstallMgr();
#ifdef SWORD_INTERNET_WARNING
public:
/** Re-implemented from sword::InstallMgr. */
virtual bool isUserDisclaimerConfirmed() const;
#endif
protected:
/* Reimplementations of method in StatusReporter */
virtual void statusUpdate(double dltotal, double dlnow);

@ -502,7 +502,8 @@ the module remote installation feature!</b>")
if (BTInstallMgr::Tool::RemoteConfig::isRemoteSource(&is)) {
// int errorCode = 0;
if (!m_refreshedRemoteSources) {
if (!iMgr.refreshRemoteSource( &is ) ) { //make sure the sources were updated sucessfully
bool successful = iMgr.refreshRemoteSource( &is );
if (!successful ) { //make sure the sources were updated sucessfully
m_refreshedRemoteSources = true;
success = true;
}

@ -59,7 +59,7 @@ void myMessageOutput( QtMsgType type, const char *msg ) {
fprintf( stderr,"(BibleTime %s) WARNING: %s\n",VERSION, msg );
break;
case QtFatalMsg:
fprintf( stderr,"(BibleTime %s) _FATAL_: %s\nPlease contact info@bibletime.de and report this bug!",VERSION, msg );
fprintf( stderr,"(BibleTime %s) _FATAL_: %s\nPlease visit http://bugs.pearsoncomputing.net and report this bug!",VERSION, msg );
abort(); // dump core on purpose
}
}
@ -132,12 +132,12 @@ int main(int argc, char* argv[]) {
PACKAGE,
"BibleTime",
VERSION,
I18N_NOOP("Bible study tool for KDE"),
I18N_NOOP("Bible study tool for Trinity"),
KAboutData::License_GPL_V2,
I18N_NOOP("(c)1999-2007, The BibleTime Team"),
I18N_NOOP("BibleTime is an easy to use but powerful Bible study tool for KDE.\n\nWe are looking for developers and translators.\nIf you'd like to join our team, please send an email to info@bibletime.info."),
I18N_NOOP("(c)1999-2010, The BibleTime Team and The Trinity Project"),
I18N_NOOP("BibleTime is an easy to use but powerful Bible study tool for Trinity.\nIt is a fork of the main BibleTime project in order to provide a native Trinity application.\n\nThe BibleTime project is looking for developers and translators.\nIf you'd like to join their team, please send an email to info@bibletime.info."),
"http://www.bibletime.info/",
"info@bibletime.info"
"trinity-devel@lists.pearsoncomputing.net"
);
/***********************************************

Loading…
Cancel
Save