From 1ea03c0fce8066c1e22188447b4a6ca4dcef1201 Mon Sep 17 00:00:00 2001 From: "Roberto C. Sanchez" Date: Tue, 21 Oct 2014 22:58:34 -0400 Subject: Imported Upstream version 2.10.1 --- src/frontend/bookmarks/btbookmarkfolder.cpp | 14 ++++++-------- src/frontend/bookmarks/btbookmarkfolder.h | 4 +++- src/frontend/bookmarks/btbookmarkitem.cpp | 16 ++++++++-------- src/frontend/bookmarks/btbookmarkitem.h | 4 +++- src/frontend/bookmarks/btbookmarkitembase.h | 4 +++- src/frontend/bookmarks/btbookmarkloader.cpp | 2 +- src/frontend/bookmarks/btbookmarkloader.h | 4 +++- src/frontend/bookmarks/bteditbookmarkdialog.cpp | 13 ++++++------- src/frontend/bookmarks/bteditbookmarkdialog.h | 4 +++- src/frontend/bookmarks/cbookmarkindex.cpp | 17 +++++++++-------- src/frontend/bookmarks/cbookmarkindex.h | 4 +++- 11 files changed, 48 insertions(+), 38 deletions(-) (limited to 'src/frontend/bookmarks') diff --git a/src/frontend/bookmarks/btbookmarkfolder.cpp b/src/frontend/bookmarks/btbookmarkfolder.cpp index af027a9..3088e99 100644 --- a/src/frontend/bookmarks/btbookmarkfolder.cpp +++ b/src/frontend/bookmarks/btbookmarkfolder.cpp @@ -2,7 +2,7 @@ * * This file is part of BibleTime's source code, http://www.bibletime.info/. * -* Copyright 1999-2011 by the BibleTime developers. +* Copyright 1999-2014 by the BibleTime developers. * The BibleTime source code is licensed under the GNU General Public License version 2.0. * **********/ @@ -10,11 +10,12 @@ #include "frontend/bookmarks/btbookmarkfolder.h" #include +#include "bibletimeapp.h" #include "frontend/bookmarks/btbookmarkitembase.h" #include "frontend/bookmarks/btbookmarkitem.h" #include "frontend/bookmarks/btbookmarkloader.h" #include "util/cresmgr.h" -#include "util/directory.h" +#include "util/geticon.h" BtBookmarkFolder::BtBookmarkFolder(const QString &name, QTreeWidgetItem *parent) @@ -77,12 +78,9 @@ void BtBookmarkFolder::rename() { } void BtBookmarkFolder::update() { - namespace DU = util::directory; - - if (isExpanded() && childCount()) - setIcon(0, DU::getIcon(CResMgr::mainIndex::openedFolder::icon)); - else - setIcon(0, DU::getIcon(CResMgr::mainIndex::closedFolder::icon)); + setIcon(0, util::getIcon(isExpanded() && childCount() + ? CResMgr::mainIndex::openedFolder::icon + : CResMgr::mainIndex::closedFolder::icon)); } bool BtBookmarkFolder::hasDescendant(QTreeWidgetItem* item) const { diff --git a/src/frontend/bookmarks/btbookmarkfolder.h b/src/frontend/bookmarks/btbookmarkfolder.h index 20388df..4f7c80c 100644 --- a/src/frontend/bookmarks/btbookmarkfolder.h +++ b/src/frontend/bookmarks/btbookmarkfolder.h @@ -1,8 +1,10 @@ /********* * +* In the name of the Father, and of the Son, and of the Holy Spirit. +* * This file is part of BibleTime's source code, http://www.bibletime.info/. * -* Copyright 1999-2011 by the BibleTime developers. +* Copyright 1999-2014 by the BibleTime developers. * The BibleTime source code is licensed under the GNU General Public License version 2.0. * **********/ diff --git a/src/frontend/bookmarks/btbookmarkitem.cpp b/src/frontend/bookmarks/btbookmarkitem.cpp index 639d33e..952be22 100644 --- a/src/frontend/bookmarks/btbookmarkitem.cpp +++ b/src/frontend/bookmarks/btbookmarkitem.cpp @@ -2,7 +2,7 @@ * * This file is part of BibleTime's source code, http://www.bibletime.info/. * -* Copyright 1999-2011 by the BibleTime developers. +* Copyright 1999-2014 by the BibleTime developers. * The BibleTime source code is licensed under the GNU General Public License version 2.0. * **********/ @@ -10,14 +10,16 @@ #include "frontend/bookmarks/btbookmarkitem.h" #include -#include "backend/config/cbtconfig.h" +#include "backend/config/btconfig.h" +#include "backend/managers/cswordbackend.h" #include "backend/drivers/cswordmoduleinfo.h" #include "backend/keys/cswordversekey.h" +#include "bibletimeapp.h" #include "btglobal.h" #include "frontend/bookmarks/btbookmarkfolder.h" #include "frontend/bookmarks/bteditbookmarkdialog.h" #include "util/cresmgr.h" -#include "util/directory.h" +#include "util/geticon.h" BtBookmarkItem::BtBookmarkItem(const CSwordModuleInfo *module, @@ -81,7 +83,7 @@ QString BtBookmarkItem::toolTip() const { return QString::null; } - FilterOptions filterOptions = CBTConfig::getFilterOptionDefaults(); + FilterOptions filterOptions = btConfig().getFilterOptions(); filterOptions.footnotes = false; filterOptions.scriptureReferences = false; CSwordBackend::instance()->setFilterOptions(filterOptions); @@ -91,7 +93,7 @@ QString BtBookmarkItem::toolTip() const { k->setKey(key()); // const CLanguageMgr::Language* lang = module()->language(); - // CBTConfig::FontSettingsPair fontPair = CBTConfig::get(lang); + // BtConfig::FontSettingsPair fontPair = getBtConfig().getFontForLanguage(lang); Q_ASSERT(k.data()); QString header = QString::fromLatin1("%1 (%2)") @@ -134,9 +136,7 @@ void BtBookmarkItem::rename() { } void BtBookmarkItem::update() { - namespace DU = util::directory; - - setIcon(0, DU::getIcon(CResMgr::mainIndex::bookmark::icon)); + setIcon(0, util::getIcon(CResMgr::mainIndex::bookmark::icon)); if (m_title.isEmpty()) { m_title = QString::fromLatin1("%1 (%2)").arg(key()).arg(module() ? module()->name() : QObject::tr("unknown")); diff --git a/src/frontend/bookmarks/btbookmarkitem.h b/src/frontend/bookmarks/btbookmarkitem.h index 89fd412..932d4e0 100644 --- a/src/frontend/bookmarks/btbookmarkitem.h +++ b/src/frontend/bookmarks/btbookmarkitem.h @@ -1,8 +1,10 @@ /********* * +* In the name of the Father, and of the Son, and of the Holy Spirit. +* * This file is part of BibleTime's source code, http://www.bibletime.info/. * -* Copyright 1999-2011 by the BibleTime developers. +* Copyright 1999-2014 by the BibleTime developers. * The BibleTime source code is licensed under the GNU General Public License version 2.0. * **********/ diff --git a/src/frontend/bookmarks/btbookmarkitembase.h b/src/frontend/bookmarks/btbookmarkitembase.h index 2ae1430..630d018 100644 --- a/src/frontend/bookmarks/btbookmarkitembase.h +++ b/src/frontend/bookmarks/btbookmarkitembase.h @@ -1,8 +1,10 @@ /********* * +* In the name of the Father, and of the Son, and of the Holy Spirit. +* * This file is part of BibleTime's source code, http://www.bibletime.info/. * -* Copyright 1999-2011 by the BibleTime developers. +* Copyright 1999-2014 by the BibleTime developers. * The BibleTime source code is licensed under the GNU General Public License version 2.0. * **********/ diff --git a/src/frontend/bookmarks/btbookmarkloader.cpp b/src/frontend/bookmarks/btbookmarkloader.cpp index daebfe1..63e0797 100644 --- a/src/frontend/bookmarks/btbookmarkloader.cpp +++ b/src/frontend/bookmarks/btbookmarkloader.cpp @@ -2,7 +2,7 @@ * * This file is part of BibleTime's source code, http://www.bibletime.info/. * -* Copyright 1999-2011 by the BibleTime developers. +* Copyright 1999-2014 by the BibleTime developers. * The BibleTime source code is licensed under the GNU General Public License version 2.0. * **********/ diff --git a/src/frontend/bookmarks/btbookmarkloader.h b/src/frontend/bookmarks/btbookmarkloader.h index 8b819ce..25b56b8 100644 --- a/src/frontend/bookmarks/btbookmarkloader.h +++ b/src/frontend/bookmarks/btbookmarkloader.h @@ -1,8 +1,10 @@ /********* * +* In the name of the Father, and of the Son, and of the Holy Spirit. +* * This file is part of BibleTime's source code, http://www.bibletime.info/. * -* Copyright 1999-2011 by the BibleTime developers. +* Copyright 1999-2014 by the BibleTime developers. * The BibleTime source code is licensed under the GNU General Public License version 2.0. * **********/ diff --git a/src/frontend/bookmarks/bteditbookmarkdialog.cpp b/src/frontend/bookmarks/bteditbookmarkdialog.cpp index 614498f..1291f56 100644 --- a/src/frontend/bookmarks/bteditbookmarkdialog.cpp +++ b/src/frontend/bookmarks/bteditbookmarkdialog.cpp @@ -2,7 +2,7 @@ * * This file is part of BibleTime's source code, http://www.bibletime.info/. * -* Copyright 1999-2011 by the BibleTime developers. +* Copyright 1999-2014 by the BibleTime developers. * The BibleTime source code is licensed under the GNU General Public License version 2.0. * **********/ @@ -16,9 +16,10 @@ #include #include #include +#include "bibletimeapp.h" #include "util/cresmgr.h" -#include "util/dialogutil.h" -#include "util/directory.h" +#include "frontend/messagedialog.h" +#include "util/geticon.h" BtEditBookmarkDialog::BtEditBookmarkDialog(const QString &key, @@ -28,12 +29,10 @@ BtEditBookmarkDialog::BtEditBookmarkDialog(const QString &key, Qt::WindowFlags wflags) : QDialog(parent, wflags) { - namespace DU = util::directory; - QVBoxLayout *mainLayout = new QVBoxLayout(this); resize(400, 300); - setWindowIcon(DU::getIcon(CResMgr::mainIndex::bookmark::icon)); + setWindowIcon(util::getIcon(CResMgr::mainIndex::bookmark::icon)); m_layout = new QFormLayout; @@ -57,7 +56,7 @@ BtEditBookmarkDialog::BtEditBookmarkDialog(const QString &key, | QDialogButtonBox::Ok, Qt::Horizontal, this); - util::prepareDialogBox(m_buttonBox); + message::prepareDialogBox(m_buttonBox); mainLayout->addWidget(m_buttonBox); QObject::connect(m_buttonBox, SIGNAL(accepted()), this, SLOT(accept())); diff --git a/src/frontend/bookmarks/bteditbookmarkdialog.h b/src/frontend/bookmarks/bteditbookmarkdialog.h index c3455e2..674ccdf 100644 --- a/src/frontend/bookmarks/bteditbookmarkdialog.h +++ b/src/frontend/bookmarks/bteditbookmarkdialog.h @@ -1,8 +1,10 @@ /********* * +* In the name of the Father, and of the Son, and of the Holy Spirit. +* * This file is part of BibleTime's source code, http://www.bibletime.info/. * -* Copyright 1999-2011 by the BibleTime developers. +* Copyright 1999-2014 by the BibleTime developers. * The BibleTime source code is licensed under the GNU General Public License version 2.0. * **********/ diff --git a/src/frontend/bookmarks/cbookmarkindex.cpp b/src/frontend/bookmarks/cbookmarkindex.cpp index 15f272c..1b697d0 100644 --- a/src/frontend/bookmarks/cbookmarkindex.cpp +++ b/src/frontend/bookmarks/cbookmarkindex.cpp @@ -2,7 +2,7 @@ * * This file is part of BibleTime's source code, http://www.bibletime.info/. * -* Copyright 1999-2011 by the BibleTime developers. +* Copyright 1999-2014 by the BibleTime developers. * The BibleTime source code is licensed under the GNU General Public License version 2.0. * **********/ @@ -28,9 +28,10 @@ #include #include #include -#include "backend/config/cbtconfig.h" +#include "backend/config/btconfig.h" #include "backend/drivers/cswordmoduleinfo.h" #include "backend/managers/referencemanager.h" +#include "bibletimeapp.h" #include "frontend/cdragdrop.h" #include "frontend/cinfodisplay.h" #include "frontend/cprinter.h" @@ -38,11 +39,12 @@ #include "frontend/bookmarks/btbookmarkitem.h" #include "frontend/bookmarks/btbookmarkfolder.h" #include "frontend/bookmarks/btbookmarkloader.h" +#include "frontend/messagedialog.h" #include "frontend/searchdialog/csearchdialog.h" #include "util/cresmgr.h" #include "util/tool.h" #include "util/directory.h" -#include "util/dialogutil.h" +#include "util/geticon.h" #include "bibletime.h" @@ -52,7 +54,7 @@ CBookmarkIndex::CBookmarkIndex(QWidget *parent) m_previousEventItem(0) { setMouseTracking(true); m_magTimer.setSingleShot(true); - m_magTimer.setInterval(CBTConfig::get(CBTConfig::magDelay)); + m_magTimer.setInterval(btConfig().value("GUI/magDelay", 400)); setContextMenuPolicy(Qt::CustomContextMenu); initView(); initConnections(); @@ -126,12 +128,11 @@ void CBookmarkIndex::initView() { * than to modify all QAction constructors. */ QAction* CBookmarkIndex::newQAction(const QString& text, const QString& pix, const int /*shortcut*/, const QObject* receiver, const char* slot, QObject* parent) { - namespace DU = util::directory; QAction *action; if (pix.isEmpty()) { action = new QAction(text, parent); } else { - action = new QAction(DU::getIcon(pix), text, parent); + action = new QAction(util::getIcon(pix), text, parent); } QObject::connect(action, SIGNAL(triggered()), receiver, slot); return action; @@ -681,7 +682,7 @@ void CBookmarkIndex::printBookmarks() { return; } QSharedPointer printer( - new Printing::CPrinter( this, CBTConfig::getDisplayOptionDefaults(), CBTConfig::getFilterOptionDefaults() ) + new Printing::CPrinter( this, btConfig().getDisplayOptions(), btConfig().getFilterOptions() ) ); printer->printKeyTree(tree); } @@ -699,7 +700,7 @@ void CBookmarkIndex::deleteEntries(bool confirm) { } } - if (util::showQuestion(this, tr("Delete Items"), + if (message::showQuestion(this, tr("Delete Items"), tr("Do you really want to delete the selected items and child-items?"), QMessageBox::Yes | QMessageBox::No, QMessageBox::No ) != QMessageBox::Yes) { diff --git a/src/frontend/bookmarks/cbookmarkindex.h b/src/frontend/bookmarks/cbookmarkindex.h index 2875a5d..df4a1c6 100644 --- a/src/frontend/bookmarks/cbookmarkindex.h +++ b/src/frontend/bookmarks/cbookmarkindex.h @@ -1,8 +1,10 @@ /********* * +* In the name of the Father, and of the Son, and of the Holy Spirit. +* * This file is part of BibleTime's source code, http://www.bibletime.info/. * -* Copyright 1999-2011 by the BibleTime developers. +* Copyright 1999-2014 by the BibleTime developers. * The BibleTime source code is licensed under the GNU General Public License version 2.0. * **********/ -- cgit v1.2.3