summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-12-26 20:37:08 +0300
committerAndrei Karas <akaras@inbox.ru>2017-12-26 20:37:08 +0300
commit681547eff8134564281ff05032eb7d29f1e7f312 (patch)
treea6b41f0e5ac25b1c100c3e609ab34739248e544a
parent9bc0a2e01e60e3c57324c86fa76be3bfa88dca81 (diff)
downloadmanaverse-681547eff8134564281ff05032eb7d29f1e7f312.tar.gz
manaverse-681547eff8134564281ff05032eb7d29f1e7f312.tar.bz2
manaverse-681547eff8134564281ff05032eb7d29f1e7f312.tar.xz
manaverse-681547eff8134564281ff05032eb7d29f1e7f312.zip
Remove default parameters from checkbox.
-rw-r--r--src/gui/widgets/checkbox.h6
-rw-r--r--src/gui/widgets/tabs/setup_joystick.cpp11
-rw-r--r--src/gui/widgets/tabs/setup_relations.cpp6
-rw-r--r--src/gui/widgets/tabs/setup_video.cpp17
-rw-r--r--src/gui/windows/logindialog.cpp2
-rw-r--r--src/gui/windows/outfitwindow.cpp6
6 files changed, 30 insertions, 18 deletions
diff --git a/src/gui/widgets/checkbox.h b/src/gui/widgets/checkbox.h
index 27e0a118b..d3c26153b 100644
--- a/src/gui/widgets/checkbox.h
+++ b/src/gui/widgets/checkbox.h
@@ -95,9 +95,9 @@ class CheckBox final : public Widget,
*/
CheckBox(const Widget2 *const widget,
const std::string &restrict caption,
- const bool selected = false,
- ActionListener *const listener = nullptr,
- const std::string &restrict eventId = "");
+ const bool selected,
+ ActionListener *const listener,
+ const std::string &restrict eventId);
A_DELETE_COPY(CheckBox)
diff --git a/src/gui/widgets/tabs/setup_joystick.cpp b/src/gui/widgets/tabs/setup_joystick.cpp
index 12fd49b23..927215e1e 100644
--- a/src/gui/widgets/tabs/setup_joystick.cpp
+++ b/src/gui/widgets/tabs/setup_joystick.cpp
@@ -50,12 +50,15 @@ Setup_Joystick::Setup_Joystick(const Widget2 *const widget) :
// TRANSLATORS: joystick settings tab button
mDetectButton(new Button(this, _("Detect joysticks"), "detect", this)),
// TRANSLATORS: joystick settings tab checkbox
- mJoystickEnabled(new CheckBox(this, _("Enable joystick"))),
+ mJoystickEnabled(new CheckBox(this, _("Enable joystick"),
+ false, nullptr, std::string())),
mNamesModel(new NamesModel),
mNamesDropDown(new DropDown(this, mNamesModel)),
- // TRANSLATORS: joystick settings tab checkbox
- mUseInactiveCheckBox(new CheckBox(this, _("Use joystick if client "
- "window inactive"), config.getBoolValue("useInactiveJoystick"))),
+ mUseInactiveCheckBox(new CheckBox(this,
+ // TRANSLATORS: joystick settings tab checkbox
+ _("Use joystick if client window inactive"),
+ config.getBoolValue("useInactiveJoystick"),
+ nullptr, std::string())),
mOriginalJoystickEnabled(config.getBoolValue("joystickEnabled"))
{
// TRANSLATORS: joystick settings tab name
diff --git a/src/gui/widgets/tabs/setup_relations.cpp b/src/gui/widgets/tabs/setup_relations.cpp
index a5c556812..80e9526f0 100644
--- a/src/gui/widgets/tabs/setup_relations.cpp
+++ b/src/gui/widgets/tabs/setup_relations.cpp
@@ -71,10 +71,12 @@ Setup_Relations::Setup_Relations(const Widget2 *const widget) :
mPlayerTable, Opaque_true, std::string())),
// TRANSLATORS: relation dialog button
mDefaultTrading(new CheckBox(this, _("Allow trading"),
- (playerRelations.getDefault() & PlayerRelation::TRADE) != 0u)),
+ (playerRelations.getDefault() & PlayerRelation::TRADE) != 0u,
+ nullptr, std::string())),
// TRANSLATORS: relation dialog button
mDefaultWhisper(new CheckBox(this, _("Allow whispers"),
- (playerRelations.getDefault() & PlayerRelation::WHISPER) != 0u)),
+ (playerRelations.getDefault() & PlayerRelation::WHISPER) != 0u,
+ nullptr, std::string())),
// TRANSLATORS: relation dialog button
mDeleteButton(new Button(this, _("Delete"), ACTION_DELETE, this)),
mIgnoreActionChoicesModel(new IgnoreChoicesListModel),
diff --git a/src/gui/widgets/tabs/setup_video.cpp b/src/gui/widgets/tabs/setup_video.cpp
index 26e97b19a..7d8e474ea 100644
--- a/src/gui/widgets/tabs/setup_video.cpp
+++ b/src/gui/widgets/tabs/setup_video.cpp
@@ -72,10 +72,12 @@ Setup_Video::Setup_Video(const Widget2 *const widget) :
mOpenGLListModel(new OpenGLListModel),
mModeList(CREATEWIDGETR(ListBox, widget, mModeListModel, "")),
// TRANSLATORS: video settings checkbox
- mFsCheckBox(new CheckBox(this, _("Full screen"), mFullScreenEnabled)),
+ mFsCheckBox(new CheckBox(this, _("Full screen"), mFullScreenEnabled,
+ nullptr, std::string())),
mOpenGLDropDown(new DropDown(widget, mOpenGLListModel)),
// TRANSLATORS: video settings checkbox
- mFpsCheckBox(new CheckBox(this, _("FPS limit:"))),
+ mFpsCheckBox(new CheckBox(this, _("FPS limit:"), false,
+ nullptr, std::string())),
mFpsSlider(new Slider(this, 2.0, 160.0, 1.0)),
mFpsLabel(new Label(this)),
mAltFpsSlider(new Slider(this, 2.0, 160.0, 1.0)),
@@ -93,7 +95,8 @@ Setup_Video::Setup_Video(const Widget2 *const widget) :
#ifdef USE_SDL2
mAllowHighDPI(config.getBoolValue("allowHighDPI")),
// TRANSLATORS: video settings checkbox
- mAllowHighDPICheckBox(new CheckBox(this, _("High DPI"), mAllowHighDPI)),
+ mAllowHighDPICheckBox(new CheckBox(this, _("High DPI"), mAllowHighDPI,
+ nullptr, std::string())),
#endif // USE_SDL2
mCustomCursorCheckBox(new CheckBox(this,
#ifdef ANDROID
@@ -103,12 +106,14 @@ Setup_Video::Setup_Video(const Widget2 *const widget) :
// TRANSLATORS: video settings checkbox
_("Custom cursor"),
#endif // ANDROID
- mCustomCursorEnabled)),
+ mCustomCursorEnabled,
+ nullptr, std::string())),
// TRANSLATORS: video settings checkbox
mEnableResizeCheckBox(new CheckBox(this, _("Enable resize"),
- mEnableResize)),
+ mEnableResize, nullptr, std::string())),
// TRANSLATORS: video settings checkbox
- mNoFrameCheckBox(new CheckBox(this, _("No frame"), mNoFrame))
+ mNoFrameCheckBox(new CheckBox(this, _("No frame"), mNoFrame,
+ nullptr, std::string()))
{
// TRANSLATORS: video settings tab name
setName(_("Video"));
diff --git a/src/gui/windows/logindialog.cpp b/src/gui/windows/logindialog.cpp
index f43921328..076ce14df 100644
--- a/src/gui/windows/logindialog.cpp
+++ b/src/gui/windows/logindialog.cpp
@@ -74,7 +74,7 @@ LoginDialog::LoginDialog(LoginData &data,
mPassField(new PasswordField(this, mLoginData->password)),
// TRANSLATORS: login dialog label
mKeepCheck(new CheckBox(this, _("Remember username"),
- mLoginData->remember)),
+ mLoginData->remember, nullptr, std::string())),
// TRANSLATORS: login dialog label
mUpdateTypeLabel(new Label(this, _("Update:"))),
mUpdateTypeModel(new UpdateTypeModel),
diff --git a/src/gui/windows/outfitwindow.cpp b/src/gui/windows/outfitwindow.cpp
index 60d00747e..17be8f600 100644
--- a/src/gui/windows/outfitwindow.cpp
+++ b/src/gui/windows/outfitwindow.cpp
@@ -70,10 +70,12 @@ OutfitWindow::OutfitWindow() :
mCurrentLabel(new Label(this, strprintf(_("Outfit: %d"), 1))),
// TRANSLATORS: outfits window checkbox
mUnequipCheck(new CheckBox(this, _("Unequip first"),
- serverConfig.getValueBool("OutfitUnequip0", true))),
+ serverConfig.getValueBool("OutfitUnequip0", true),
+ nullptr, std::string())),
// TRANSLATORS: outfits window checkbox
mAwayOutfitCheck(new CheckBox(this, _("Away outfit"),
- serverConfig.getValue("OutfitAwayIndex", OUTFITS_COUNT - 1) != 0u)),
+ serverConfig.getValue("OutfitAwayIndex", OUTFITS_COUNT - 1) != 0u,
+ nullptr, std::string())),
// TRANSLATORS: outfits window label
mKeyLabel(new Label(this, strprintf(_("Key: %s"),
keyName(0).c_str()))),