summaryrefslogtreecommitdiff
path: root/src/frontend/settingsdialogs/btlanguagesettings.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/frontend/settingsdialogs/btlanguagesettings.cpp')
-rw-r--r--src/frontend/settingsdialogs/btlanguagesettings.cpp19
1 files changed, 11 insertions, 8 deletions
diff --git a/src/frontend/settingsdialogs/btlanguagesettings.cpp b/src/frontend/settingsdialogs/btlanguagesettings.cpp
index be2dd17..37e53c8 100644
--- a/src/frontend/settingsdialogs/btlanguagesettings.cpp
+++ b/src/frontend/settingsdialogs/btlanguagesettings.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.
*
**********/
@@ -14,11 +14,12 @@
#include <QLabel>
#include <QVBoxLayout>
#include <QWidget>
-#include "backend/config/cbtconfig.h"
+#include "backend/config/btconfig.h"
+#include "bibletimeapp.h"
#include "frontend/settingsdialogs/cconfigurationdialog.h"
#include "util/cresmgr.h"
+#include "util/geticon.h"
#include "util/tool.h"
-#include "util/directory.h"
// Sword includes:
#include <localemgr.h>
@@ -29,7 +30,7 @@ typedef std::list<sword::SWBuf>::const_iterator SBLCI;
BtLanguageSettingsPage::BtLanguageSettingsPage(CConfigurationDialog *parent)
- : BtConfigDialog::Page(util::directory::getIcon(CResMgr::settings::languages::icon), parent)
+ : BtConfigDialog::Page(util::getIcon(CResMgr::settings::languages::icon), parent)
{
m_swordLocaleCombo = new QComboBox(this);
m_languageNamesLabel = new QLabel(this);
@@ -44,7 +45,7 @@ BtLanguageSettingsPage::BtLanguageSettingsPage(CConfigurationDialog *parent)
}
void BtLanguageSettingsPage::save() {
- CBTConfig::set(CBTConfig::language, m_swordLocaleCombo->itemData(m_swordLocaleCombo->currentIndex()).toString());
+ btConfig().setValue("language", m_swordLocaleCombo->itemData(m_swordLocaleCombo->currentIndex()));
}
void BtLanguageSettingsPage::resetLanguage() {
@@ -67,14 +68,14 @@ void BtLanguageSettingsPage::resetLanguage() {
}
}
}
- CBTConfig::set(CBTConfig::language, best);
+ btConfig().setValue("language", best);
}
QVector<QString> BtLanguageSettingsPage::bookNameAbbreviationsTryVector() {
QVector<QString> atv;
atv.reserve(4);
{
- QString settingsLanguage = CBTConfig::get(CBTConfig::language);
+ QString settingsLanguage = btConfig().value<QString>("language");
if (!settingsLanguage.isEmpty())
atv.append(settingsLanguage);
}
@@ -132,5 +133,7 @@ void BtLanguageSettingsPage::retranslateUi() {
setHeaderText(tr("Languages"));
m_languageNamesLabel->setText(tr("Language for names of Bible books:"));
- m_swordLocaleCombo->setToolTip(tr("The languages which can be used for the biblical booknames"));
+ const QString toolTip(tr("The languages which can be used for the biblical book names. Translations are provided by the Sword library."));
+ m_languageNamesLabel->setToolTip(toolTip);
+ m_swordLocaleCombo->setToolTip(toolTip);
}