diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-10-31 21:53:50 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-10-31 21:53:50 +0300 |
commit | 06720edd93b51a84650e2d385a24043cc4fb932e (patch) | |
tree | 002c54e58ee0cc45feca1fc00b64808b46861f35 /src | |
parent | e8f29b1cff5360c9d16587b91d72863af4763d08 (diff) | |
download | manaverse-06720edd93b51a84650e2d385a24043cc4fb932e.tar.gz manaverse-06720edd93b51a84650e2d385a24043cc4fb932e.tar.bz2 manaverse-06720edd93b51a84650e2d385a24043cc4fb932e.tar.xz manaverse-06720edd93b51a84650e2d385a24043cc4fb932e.zip |
Add strong typed bool enum mainconfig.
Diffstat (limited to 'src')
-rw-r--r-- | src/CMakeLists.txt | 1 | ||||
-rw-r--r-- | src/Makefile.am | 1 | ||||
-rw-r--r-- | src/enums/simpletypes/mainconfig.h | 28 | ||||
-rw-r--r-- | src/gui/widgets/setupbuttonitem.cpp | 2 | ||||
-rw-r--r-- | src/gui/widgets/setupitem.cpp | 43 | ||||
-rw-r--r-- | src/gui/widgets/setupitem.h | 46 | ||||
-rw-r--r-- | src/gui/widgets/setupquickitem.cpp | 2 | ||||
-rw-r--r-- | src/gui/widgets/setuptouchitem.cpp | 4 | ||||
-rw-r--r-- | src/gui/widgets/setuptouchitem.h | 5 | ||||
-rw-r--r-- | src/gui/widgets/tabs/setup_audio.cpp | 10 | ||||
-rw-r--r-- | src/gui/widgets/tabs/setup_other.cpp | 19 | ||||
-rw-r--r-- | src/gui/widgets/tabs/setup_visual.cpp | 8 | ||||
-rw-r--r-- | src/gui/widgets/tabs/setuptabscroll.cpp | 4 |
13 files changed, 111 insertions, 62 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 8eb7697a7..c04351494 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1115,6 +1115,7 @@ SET(SRCS enums/simpletypes/intdefines.h enums/simpletypes/itemcolor.h enums/simpletypes/keep.h + enums/simpletypes/mainconfig.h enums/simpletypes/modal.h enums/simpletypes/modifiable.h enums/simpletypes/move.h diff --git a/src/Makefile.am b/src/Makefile.am index 25c365104..8863d482b 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -578,6 +578,7 @@ SRC += events/actionevent.h \ enums/simpletypes/intdefines.h \ enums/simpletypes/itemcolor.h \ enums/simpletypes/keep.h \ + enums/simpletypes/mainconfig.h \ enums/simpletypes/modal.h \ enums/simpletypes/modifiable.h \ enums/simpletypes/move.h \ diff --git a/src/enums/simpletypes/mainconfig.h b/src/enums/simpletypes/mainconfig.h new file mode 100644 index 000000000..e33b9399e --- /dev/null +++ b/src/enums/simpletypes/mainconfig.h @@ -0,0 +1,28 @@ +/* + * The ManaPlus Client + * Copyright (C) 2015 The ManaPlus Developers + * + * This file is part of The ManaPlus Client. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#ifndef ENUMS_SIMPLETYPES_MAINCONFIG_H +#define ENUMS_SIMPLETYPES_MAINCONFIG_H + +#include "enums/simpletypes/booldefines.h" + +defBoolEnum(MainConfig); + +#endif // ENUMS_SIMPLETYPES_MAINCONFIG_H diff --git a/src/gui/widgets/setupbuttonitem.cpp b/src/gui/widgets/setupbuttonitem.cpp index 147ece4a9..b08ccc53c 100644 --- a/src/gui/widgets/setupbuttonitem.cpp +++ b/src/gui/widgets/setupbuttonitem.cpp @@ -34,7 +34,7 @@ SetupButtonItem::SetupButtonItem(const std::string &restrict text, SetupTabScroll *restrict const parent, const std::string &restrict eventName, ActionListener *const listener) : - SetupItem(text, description, "", parent, eventName, false), + SetupItem(text, description, "", parent, eventName, MainConfig_false), mHorizont(nullptr), mButton(nullptr) { diff --git a/src/gui/widgets/setupitem.cpp b/src/gui/widgets/setupitem.cpp index 6bc0ef655..c066c55eb 100644 --- a/src/gui/widgets/setupitem.cpp +++ b/src/gui/widgets/setupitem.cpp @@ -53,7 +53,7 @@ SetupItem::SetupItem(const std::string &restrict text, const std::string &restrict keyName, SetupTabScroll *restrict const parent, const std::string &restrict eventName, - const bool mainConfig) : + const MainConfig mainConfig) : ActionListener(), Widget2(parent), mText(text), @@ -77,7 +77,7 @@ SetupItem::SetupItem(const std::string &restrict text, SetupTabScroll *restrict const parent, const std::string &restrict eventName, const std::string &restrict def, - const bool mainConfig) : + const MainConfig mainConfig) : ActionListener(), Widget2(parent), mText(text), @@ -101,7 +101,7 @@ SetupItem::~SetupItem() Configuration *SetupItem::getConfig() const { - if (mMainConfig) + if (mMainConfig == MainConfig_true) return &config; else return &serverConfig; @@ -212,7 +212,7 @@ SetupItemCheckBox::SetupItemCheckBox(const std::string &restrict text, const std::string &restrict keyName, SetupTabScroll *restrict const parent, const std::string &restrict eventName, - const bool mainConfig) : + const MainConfig mainConfig) : SetupItem(text, description, keyName, parent, eventName, mainConfig), mCheckBox(nullptr) { @@ -225,7 +225,7 @@ SetupItemCheckBox::SetupItemCheckBox(const std::string &restrict text, SetupTabScroll *restrict const parent, const std::string &restrict eventName, const std::string &restrict def, - const bool mainConfig) : + const MainConfig mainConfig) : SetupItem(text, description, keyName, parent, eventName, def, mainConfig), mCheckBox(nullptr) { @@ -274,7 +274,7 @@ SetupItemTextField::SetupItemTextField(const std::string &restrict text, const std::string &restrict keyName, SetupTabScroll *restrict const parent, const std::string &restrict eventName, - const bool mainConfig, + const MainConfig mainConfig, const bool useBase64) : SetupItem(text, description, keyName, parent, eventName, mainConfig), mHorizont(nullptr), @@ -294,7 +294,7 @@ SetupItemTextField::SetupItemTextField(const std::string &restrict text, SetupTabScroll *restrict const parent, const std::string &restrict eventName, const std::string &restrict def, - const bool mainConfig, + const MainConfig mainConfig, const bool useBase64) : SetupItem(text, description, keyName, parent, eventName, def, mainConfig), mHorizont(nullptr), @@ -444,7 +444,7 @@ SetupItemIntTextField::SetupItemIntTextField(const std::string &restrict text, const std::string &restrict eventName, const int min, const int max, - const bool mainConfig) : + const MainConfig mainConfig) : SetupItem(text, description, keyName, parent, eventName, mainConfig), mHorizont(nullptr), mLabel(nullptr), @@ -469,7 +469,7 @@ SetupItemIntTextField::SetupItemIntTextField(const std::string &restrict text, eventName, const int min, const int max, const std::string &restrict def, - const bool mainConfig) : + const MainConfig mainConfig) : SetupItem(text, description, keyName, parent, eventName, def, mainConfig), mHorizont(nullptr), mLabel(nullptr), @@ -577,7 +577,7 @@ SetupItemLabel::SetupItemLabel(const std::string &restrict text, const std::string &restrict description, SetupTabScroll *restrict const parent, const bool separator) : - SetupItem(text, description, "", parent, "", "", true), + SetupItem(text, description, "", parent, "", "", MainConfig_true), mLabel(nullptr), mIsSeparator(separator) { @@ -636,7 +636,7 @@ SetupItemDropDown::SetupItemDropDown(const std::string &restrict text, const std::string &restrict eventName, ListModel *restrict const model, const int width, - const bool mainConfig) : + const MainConfig mainConfig) : SetupItem(text, description, keyName, parent, eventName, mainConfig), mHorizont(nullptr), mLabel(nullptr), @@ -656,7 +656,7 @@ SetupItemDropDown::SetupItemDropDown(const std::string &restrict text, ListModel *restrict const model, const int width, const std::string &restrict def, - const bool mainConfig) : + const MainConfig mainConfig) : SetupItem(text, description, keyName, parent, eventName, def, mainConfig), mHorizont(nullptr), mLabel(nullptr), @@ -729,7 +729,7 @@ SetupItemSlider::SetupItemSlider(const std::string &restrict text, const double step, const int width, const bool onTheFly, - const bool mainConfig) : + const MainConfig mainConfig) : SetupItem(text, description, keyName, parent, eventName, mainConfig), mHorizont(nullptr), mLabel(nullptr), @@ -755,7 +755,7 @@ SetupItemSlider::SetupItemSlider(const std::string &restrict text, const std::string &restrict def, const int width, const bool onTheFly, - const bool mainConfig) : + const MainConfig mainConfig) : SetupItem(text, description, keyName, parent, eventName, def, mainConfig), mHorizont(nullptr), mLabel(nullptr), @@ -847,7 +847,7 @@ SetupItemSlider2::SetupItemSlider2(const std::string &restrict text, const int step, SetupItemNames *restrict const values, const bool onTheFly, - const bool mainConfig, + const MainConfig mainConfig, const bool doNotAlign) : SetupItem(text, description, keyName, parent, eventName, mainConfig), mHorizont(nullptr), @@ -878,7 +878,7 @@ SetupItemSlider2::SetupItemSlider2(const std::string &restrict text, SetupItemNames *restrict const values, const std::string &restrict def, const bool onTheFly, - const bool mainConfig, + const MainConfig mainConfig, const bool doNotAlign) : SetupItem(text, description, keyName, parent, eventName, def, mainConfig), mHorizont(nullptr), @@ -1032,8 +1032,9 @@ SetupItemSliderList::SetupItemSliderList(const std::string &restrict text, SetupTabScroll *restrict const parent, const std::string &restrict eventName, ListModel *restrict const model, - const int width, const bool onTheFly, - const bool mainConfig) : + const int width, + const bool onTheFly, + const MainConfig mainConfig) : SetupItem(text, description, keyName, parent, eventName, mainConfig), mHorizont(nullptr), mLabel(nullptr), @@ -1055,7 +1056,7 @@ SetupItemSliderList::SetupItemSliderList(const std::string &restrict text, const std::string &restrict def, const int width, const bool onTheFly, - const bool mainConfig) : + const MainConfig mainConfig) : SetupItem(text, description, keyName, parent, eventName, def, mainConfig), mHorizont(nullptr), mLabel(nullptr), @@ -1139,7 +1140,7 @@ SetupItemSound::SetupItemSound(const std::string &restrict text, const std::string &restrict eventName, ListModel *restrict const model, const int width, const bool onTheFly, - const bool mainConfig) : + const MainConfig mainConfig) : SetupItemSliderList(text, description, keyName, parent, eventName, model, width, onTheFly, mainConfig), mButton(nullptr) @@ -1179,7 +1180,7 @@ SetupItemSliderInt::SetupItemSliderInt(const std::string &restrict text, const int min, const int width, const bool onTheFly, - const bool mainConfig) : + const MainConfig mainConfig) : SetupItemSliderList(text, description, keyName, parent, eventName, model, width, onTheFly, mainConfig), mMin(min) diff --git a/src/gui/widgets/setupitem.h b/src/gui/widgets/setupitem.h index 0853c6f19..f1a2b9484 100644 --- a/src/gui/widgets/setupitem.h +++ b/src/gui/widgets/setupitem.h @@ -21,6 +21,8 @@ #ifndef GUI_WIDGETS_SETUPITEM_H #define GUI_WIDGETS_SETUPITEM_H +#include "enums/simpletypes/mainconfig.h" + #include "gui/widgets/widget2.h" #include "listeners/actionlistener.h" @@ -87,7 +89,7 @@ class SetupItem notfinal : public ActionListener, virtual void externalUnloaded(const std::string &eventName); - bool isMainConfig() const A_WARN_UNUSED + MainConfig isMainConfig() const A_WARN_UNUSED { return mMainConfig; } void fixFirstItemSize(Widget *const widget); @@ -109,7 +111,7 @@ class SetupItem notfinal : public ActionListener, const std::string &restrict keyName, SetupTabScroll *restrict const parent, const std::string &restrict eventName, - const bool mainConfig); + const MainConfig mainConfig); SetupItem(const std::string &restrict text, const std::string &restrict description, @@ -117,7 +119,7 @@ class SetupItem notfinal : public ActionListener, SetupTabScroll *restrict const parent, const std::string &restrict eventName, const std::string &def, - const bool mainConfig); + const MainConfig mainConfig); std::string mText; @@ -139,7 +141,7 @@ class SetupItem notfinal : public ActionListener, int mValueType; - bool mMainConfig; + MainConfig mMainConfig; bool mUseDefault; }; @@ -152,7 +154,7 @@ class SetupItemCheckBox final : public SetupItem const std::string &restrict keyName, SetupTabScroll *restrict const parent, const std::string &restrict eventName, - const bool mainConfig = true); + const MainConfig mainConfig = MainConfig_true); SetupItemCheckBox(const std::string &restrict text, const std::string &restrict description, @@ -160,7 +162,7 @@ class SetupItemCheckBox final : public SetupItem SetupTabScroll *restrict const parent, const std::string &restrict eventName, const std::string &restrict def, - const bool mainConfig = true); + const MainConfig mainConfig = MainConfig_true); A_DELETE_COPY(SetupItemCheckBox) @@ -184,7 +186,7 @@ class SetupItemTextField final : public SetupItem const std::string &restrict keyName, SetupTabScroll *restrict const parent, const std::string &restrict eventName, - const bool mainConfig = true, + const MainConfig mainConfig = MainConfig_true, const bool useBase64 = false); SetupItemTextField(const std::string &restrict text, @@ -193,7 +195,7 @@ class SetupItemTextField final : public SetupItem SetupTabScroll *restrict const parent, const std::string &restrict eventName, const std::string &restrict def, - const bool mainConfig = true, + const MainConfig mainConfig = MainConfig_true, const bool useBase64 = false); A_DELETE_COPY(SetupItemTextField) @@ -240,7 +242,7 @@ class SetupItemIntTextField final : public SetupItem SetupTabScroll *restrict const parent, const std::string &restrict eventName, const int min, const int max, - const bool mainConfig = true); + const MainConfig mainConfig = MainConfig_true); SetupItemIntTextField(const std::string &restrict text, const std::string &restrict description, @@ -249,7 +251,7 @@ class SetupItemIntTextField final : public SetupItem const std::string &restrict eventName, const int min, const int max, const std::string &restrict def, - const bool mainConfig = true); + const MainConfig mainConfig = MainConfig_true); A_DELETE_COPY(SetupItemIntTextField) @@ -311,7 +313,8 @@ class SetupItemDropDown final : public SetupItem SetupTabScroll *restrict const parent, const std::string &restrict eventName, ListModel *restrict const model, - const int width, const bool mainConfig = true); + const int width, + const MainConfig mainConfig = MainConfig_true); SetupItemDropDown(const std::string &restrict text, const std::string &restrict description, @@ -321,7 +324,7 @@ class SetupItemDropDown final : public SetupItem ListModel *restrict const model, const int width, const std::string &restrict def, - const bool mainConfig = true); + const MainConfig mainConfig = MainConfig_true); A_DELETE_COPY(SetupItemDropDown) @@ -354,7 +357,7 @@ class SetupItemSlider final : public SetupItem const double step, const int width, const bool onTheFly, - const bool mainConfig); + const MainConfig mainConfig); SetupItemSlider(const std::string &restrict text, const std::string &restrict description, @@ -367,7 +370,7 @@ class SetupItemSlider final : public SetupItem const std::string &restrict def, const int width, const bool onTheFly, - const bool mainConfig); + const MainConfig mainConfig); A_DELETE_COPY(SetupItemSlider) @@ -411,7 +414,7 @@ class SetupItemSlider2 final : public SetupItem const int min, const int max, const int step, SetupItemNames *restrict const values, const bool onTheFly, - const bool mainConfig, + const MainConfig mainConfig, const bool doNotAlign); SetupItemSlider2(const std::string &restrict text, @@ -423,7 +426,7 @@ class SetupItemSlider2 final : public SetupItem SetupItemNames *restrict const values, const std::string &restrict def, const bool onTheFly, - const bool mainConfig, + const MainConfig mainConfig, const bool doNotAlign); A_DELETE_COPY(SetupItemSlider2) @@ -487,8 +490,9 @@ class SetupItemSliderList notfinal : public SetupItem SetupTabScroll *restrict const parent, const std::string &restrict eventName, ListModel *restrict const model, - const int width = 150, const bool onTheFly = false, - const bool mainConfig = true); + const int width = 150, + const bool onTheFly = false, + const MainConfig mainConfig = MainConfig_true); SetupItemSliderList(const std::string &restrict text, const std::string &restrict description, @@ -499,7 +503,7 @@ class SetupItemSliderList notfinal : public SetupItem const std::string &restrict def, const int width = 150, const bool onTheFly = false, - const bool mainConfig = true); + const MainConfig mainConfig = MainConfig_true); HorizontContainer *mHorizont; Label *mLabel; @@ -520,7 +524,7 @@ class SetupItemSound final : public SetupItemSliderList ListModel *restrict const model, const int width = 150, const bool onTheFly = false, - const bool mainConfig = true); + const MainConfig mainConfig = MainConfig_true); A_DELETE_COPY(SetupItemSound) @@ -544,7 +548,7 @@ class SetupItemSliderInt final : public SetupItemSliderList const int min, const int width = 150, const bool onTheFly = false, - const bool mainConfig = true); + const MainConfig mainConfig = MainConfig_true); A_DELETE_COPY(SetupItemSliderInt) diff --git a/src/gui/widgets/setupquickitem.cpp b/src/gui/widgets/setupquickitem.cpp index 85b164c0a..fb8e2c538 100644 --- a/src/gui/widgets/setupquickitem.cpp +++ b/src/gui/widgets/setupquickitem.cpp @@ -34,7 +34,7 @@ SetupQuickItem::SetupQuickItem(const std::string &restrict description, const std::string &restrict eventName, ModifierGetFuncPtr getFunc, ModifierChangeFuncPtr changeFunc) : - SetupItem("", description, "", parent, eventName, false), + SetupItem("", description, "", parent, eventName, MainConfig_false), mHorizont(nullptr), mButton(nullptr), mLabel(nullptr), diff --git a/src/gui/widgets/setuptouchitem.cpp b/src/gui/widgets/setuptouchitem.cpp index eb8741abc..020cee517 100644 --- a/src/gui/widgets/setuptouchitem.cpp +++ b/src/gui/widgets/setuptouchitem.cpp @@ -42,7 +42,7 @@ SetupActionDropDown::SetupActionDropDown(const std::string &restrict text, TouchActionsModel *restrict const model, const int width, - const bool mainConfig) : + const MainConfig mainConfig) : SetupItem(text, description, keyName, parent, eventName, mainConfig), mHorizont(nullptr), mLabel(nullptr), @@ -64,7 +64,7 @@ SetupActionDropDown::SetupActionDropDown(const std::string &restrict text, const model, const int width, const std::string &restrict def, - const bool mainConfig) : + const MainConfig mainConfig) : SetupItem(text, description, keyName, parent, eventName, def, mainConfig), mHorizont(nullptr), mLabel(nullptr), diff --git a/src/gui/widgets/setuptouchitem.h b/src/gui/widgets/setuptouchitem.h index 117ea6d4e..2805a557d 100644 --- a/src/gui/widgets/setuptouchitem.h +++ b/src/gui/widgets/setuptouchitem.h @@ -34,7 +34,8 @@ class SetupActionDropDown final : public SetupItem SetupTabScroll *restrict const parent, const std::string &restrict eventName, TouchActionsModel *restrict const model, - const int width, const bool mainConfig = true); + const int width, + const MainConfig mainConfig = MainConfig_true); SetupActionDropDown(const std::string &restrict text, const std::string &restrict description, @@ -43,7 +44,7 @@ class SetupActionDropDown final : public SetupItem const std::string &restrict eventName, TouchActionsModel *restrict const model, const int width, const std::string &def, - const bool mainConfig = true); + const MainConfig mainConfig = MainConfig_true); A_DELETE_COPY(SetupActionDropDown) 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); } } |