summaryrefslogtreecommitdiff
path: root/src/gui/widgets/tabs
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-10-31 21:53:50 +0300
committerAndrei Karas <akaras@inbox.ru>2015-10-31 21:53:50 +0300
commit06720edd93b51a84650e2d385a24043cc4fb932e (patch)
tree002c54e58ee0cc45feca1fc00b64808b46861f35 /src/gui/widgets/tabs
parente8f29b1cff5360c9d16587b91d72863af4763d08 (diff)
downloadplus-06720edd93b51a84650e2d385a24043cc4fb932e.tar.gz
plus-06720edd93b51a84650e2d385a24043cc4fb932e.tar.bz2
plus-06720edd93b51a84650e2d385a24043cc4fb932e.tar.xz
plus-06720edd93b51a84650e2d385a24043cc4fb932e.zip
Add strong typed bool enum mainconfig.
Diffstat (limited to 'src/gui/widgets/tabs')
-rw-r--r--src/gui/widgets/tabs/setup_audio.cpp10
-rw-r--r--src/gui/widgets/tabs/setup_other.cpp19
-rw-r--r--src/gui/widgets/tabs/setup_visual.cpp8
-rw-r--r--src/gui/widgets/tabs/setuptabscroll.cpp4
4 files changed, 27 insertions, 14 deletions
diff --git a/src/gui/widgets/tabs/setup_audio.cpp b/src/gui/widgets/tabs/setup_audio.cpp
index e913f611c..32445f1c6 100644
--- a/src/gui/widgets/tabs/setup_audio.cpp
+++ b/src/gui/widgets/tabs/setup_audio.cpp
@@ -73,12 +73,14 @@ Setup_Audio::Setup_Audio(const Widget2 *const widget) :
// TRANSLATORS: settings option
new SetupItemSlider(_("Sfx volume"), "", "sfxVolume",
this, "sfxVolumeEvent", 0, soundManager.getMaxVolume(), 1,
- 150, true, true);
+ 150, true,
+ MainConfig_true);
// TRANSLATORS: settings option
new SetupItemSlider(_("Music volume"), "", "musicVolume",
this, "musicVolumeEvent", 0, soundManager.getMaxVolume(), 1,
- 150, true, true);
+ 150, true,
+ MainConfig_true);
// TRANSLATORS: settings option
new SetupItemCheckBox(_("Enable music fade out"), "",
@@ -98,7 +100,9 @@ Setup_Audio::Setup_Audio(const Widget2 *const widget) :
mChannelsList->push_back(_("surround+center+lfe"));
// TRANSLATORS: settings option
new SetupItemSlider2(_("Audio channels"), "", "audioChannels", this,
- "audioChannels", 1, 4, 1, mChannelsList, false, true, false);
+ "audioChannels", 1, 4, 1, mChannelsList, false,
+ MainConfig_true,
+ false);
// TRANSLATORS: settings group
diff --git a/src/gui/widgets/tabs/setup_other.cpp b/src/gui/widgets/tabs/setup_other.cpp
index daf26f668..4a1fc1302 100644
--- a/src/gui/widgets/tabs/setup_other.cpp
+++ b/src/gui/widgets/tabs/setup_other.cpp
@@ -241,11 +241,13 @@ Setup_Other::Setup_Other(const Widget2 *const widget) :
// TRANSLATORS: settings option
new SetupItemTextField(_("Afk message"), "",
- "afkMessage", this, "afkMessageEvent", false);
+ "afkMessage", this, "afkMessageEvent",
+ MainConfig_false);
// TRANSLATORS: settings option
new SetupItemCheckBox(_("Show job"), "", "showJob",
- this, "showJobEvent", false);
+ this, "showJobEvent",
+ MainConfig_false);
// TRANSLATORS: settings option
new SetupItemCheckBox(_("Enable attack filter"), "",
@@ -297,12 +299,14 @@ Setup_Other::Setup_Other(const Widget2 *const widget) :
// TRANSLATORS: settings option
new SetupItemCheckBox(_("Enable guild bot support and disable native "
"guild support"), "", "enableGuildBot", this,
- "enableGuildBotEvent", false);
+ "enableGuildBotEvent",
+ MainConfig_false);
// TRANSLATORS: settings option
new SetupItemCheckBox(_("Enable manamarket bot support"),
"", "enableManaMarketBot", this,
- "enableManaMarketBotEvent", false);
+ "enableManaMarketBotEvent",
+ MainConfig_false);
// TRANSLATORS: settings group
@@ -364,7 +368,8 @@ Setup_Other::Setup_Other(const Widget2 *const widget) :
// TRANSLATORS: settings option
new SetupItemCheckBox(_("Enable buggy servers protection "
"(do not disable)"), "", "enableBuggyServers", this,
- "enableBuggyServersEvent", false);
+ "enableBuggyServersEvent",
+ MainConfig_false);
// TRANSLATORS: settings option
new SetupItemCheckBox(_("Enable debug log"), "",
@@ -403,7 +408,9 @@ Setup_Other::Setup_Other(const Widget2 *const widget) :
#ifndef WIN32
// TRANSLATORS: settings option
new SetupItemTextField(_("Screenshot directory"), "",
- "screenshotDirectory3", this, "screenshotDirectory3Event", true, true);
+ "screenshotDirectory3", this, "screenshotDirectory3Event",
+ MainConfig_true,
+ true);
#endif
// TRANSLATORS: settings option
diff --git a/src/gui/widgets/tabs/setup_visual.cpp b/src/gui/widgets/tabs/setup_visual.cpp
index 5eb549f3a..4bcb041ca 100644
--- a/src/gui/widgets/tabs/setup_visual.cpp
+++ b/src/gui/widgets/tabs/setup_visual.cpp
@@ -141,7 +141,8 @@ Setup_Visual::Setup_Visual(const Widget2 *const widget) :
// TRANSLATORS: settings option
new SetupItemSlider(_("Gui opacity"), "", "guialpha",
- this, "guialphaEvent", 0.1, 1.01, 0.1, 150, true, true);
+ this, "guialphaEvent", 0.1, 1.01, 0.1, 150, true,
+ MainConfig_true);
// TRANSLATORS: settings option
new SetupItemCheckBox(_("Enable gui opacity"),
@@ -171,7 +172,7 @@ Setup_Visual::Setup_Visual(const Widget2 *const widget) :
mParticleList->push_back(_("max"));
(new SetupItemSlider2(_("Particle detail"), "", "particleEmitterSkip",
this, "particleEmitterSkipEvent", 0, 3, 1,
- mParticleList, true, true, false))->setInvertValue(3);
+ mParticleList, true, MainConfig_true, false))->setInvertValue(3);
mParticleTypeList->fillFromArray(&particleTypeList[0],
particleTypeListSize);
@@ -189,7 +190,8 @@ Setup_Visual::Setup_Visual(const Widget2 *const widget) :
// TRANSLATORS: settings option
new SetupItemSlider(_("Gamma"), "", "gamma",
- this, "gammeEvent", 1, 20, 1, 350, true, true);
+ this, "gammeEvent", 1, 20, 1, 350, true,
+ MainConfig_true);
// TRANSLATORS: settings group
diff --git a/src/gui/widgets/tabs/setuptabscroll.cpp b/src/gui/widgets/tabs/setuptabscroll.cpp
index 11c7afd61..14323c3ad 100644
--- a/src/gui/widgets/tabs/setuptabscroll.cpp
+++ b/src/gui/widgets/tabs/setuptabscroll.cpp
@@ -130,7 +130,7 @@ void SetupTabScroll::externalUpdated()
iter != iter_end; ++ iter)
{
SetupItem *const widget = (*iter).second;
- if (widget && !widget->isMainConfig())
+ if (widget && widget->isMainConfig() == MainConfig_false)
widget->externalUpdated((*iter).first);
}
}
@@ -142,7 +142,7 @@ void SetupTabScroll::externalUnloaded()
iter != iter_end; ++ iter)
{
SetupItem *const widget = (*iter).second;
- if (widget && !widget->isMainConfig())
+ if (widget && widget->isMainConfig() == MainConfig_false)
widget->externalUnloaded((*iter).first);
}
}