summaryrefslogtreecommitdiff
path: root/src/gui/widgets
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-12-26 19:34:40 +0300
committerAndrei Karas <akaras@inbox.ru>2017-12-26 19:34:40 +0300
commit81145e509cdba68c94c4173e16ddd492cd813db8 (patch)
tree3603449bfdd5e2d357b240cdaa5cead9b4077a1f /src/gui/widgets
parent5e7a4e68d73eb9adcb72de9d7e2b0e592f2c58cc (diff)
downloadplus-81145e509cdba68c94c4173e16ddd492cd813db8.tar.gz
plus-81145e509cdba68c94c4173e16ddd492cd813db8.tar.bz2
plus-81145e509cdba68c94c4173e16ddd492cd813db8.tar.xz
plus-81145e509cdba68c94c4173e16ddd492cd813db8.zip
Remove default parameters from textfield.
Diffstat (limited to 'src/gui/widgets')
-rw-r--r--src/gui/widgets/chatinput.h3
-rw-r--r--src/gui/widgets/inttextfield.cpp3
-rw-r--r--src/gui/widgets/passwordfield.cpp6
-rw-r--r--src/gui/widgets/setupitem.cpp3
-rw-r--r--src/gui/widgets/tabs/setup_colors.cpp12
-rw-r--r--src/gui/widgets/textfield.h14
6 files changed, 23 insertions, 18 deletions
diff --git a/src/gui/widgets/chatinput.h b/src/gui/widgets/chatinput.h
index 92c7dc341..286589ade 100644
--- a/src/gui/widgets/chatinput.h
+++ b/src/gui/widgets/chatinput.h
@@ -40,7 +40,8 @@ class ChatInput final : public TextField
{
public:
explicit ChatInput(ChatWindow *const window) :
- TextField(window, "", LoseFocusOnTab_false),
+ TextField(window, std::string(),
+ LoseFocusOnTab_false, nullptr, std::string(), false),
mWindow(window),
mFocusGaining(false)
{
diff --git a/src/gui/widgets/inttextfield.cpp b/src/gui/widgets/inttextfield.cpp
index 41436d310..d67520c2b 100644
--- a/src/gui/widgets/inttextfield.cpp
+++ b/src/gui/widgets/inttextfield.cpp
@@ -38,7 +38,8 @@ IntTextField::IntTextField(const Widget2 *const widget,
const int max,
const Enable enabled,
const int width) :
- TextField(widget, toString(def)),
+ TextField(widget, toString(def),
+ LoseFocusOnTab_true, nullptr, std::string(), false),
mMin(0),
mMax(0),
mDefault(def),
diff --git a/src/gui/widgets/passwordfield.cpp b/src/gui/widgets/passwordfield.cpp
index bc2ca4827..faa5bb876 100644
--- a/src/gui/widgets/passwordfield.cpp
+++ b/src/gui/widgets/passwordfield.cpp
@@ -28,10 +28,10 @@
PasswordField::PasswordField(const Widget2 *const widget,
const std::string &text) :
- TextField(widget, text),
+ TextField(widget, text,
+ LoseFocusOnTab_true, nullptr, std::string(), false),
mPasswordChar(mSkin != nullptr ? CAST_8(
- mSkin->getOption("passwordChar", 42))
- : CAST_8(42))
+ mSkin->getOption("passwordChar", 42)) : CAST_8(42))
{
}
diff --git a/src/gui/widgets/setupitem.cpp b/src/gui/widgets/setupitem.cpp
index 9a2bb663f..06f895f83 100644
--- a/src/gui/widgets/setupitem.cpp
+++ b/src/gui/widgets/setupitem.cpp
@@ -371,7 +371,8 @@ void SetupItemTextField::createControls()
mValue,
LoseFocusOnTab_true,
mParent,
- mEventName);
+ mEventName,
+ false);
// TRANSLATORS: setup item button
mButton = new Button(this, _("Edit"), mEventName + "_EDIT", mParent);
mWidget = mTextField;
diff --git a/src/gui/widgets/tabs/setup_colors.cpp b/src/gui/widgets/tabs/setup_colors.cpp
index cdbda9415..d15fdc1b1 100644
--- a/src/gui/widgets/tabs/setup_colors.cpp
+++ b/src/gui/widgets/tabs/setup_colors.cpp
@@ -68,19 +68,23 @@ Setup_Colors::Setup_Colors(const Widget2 *const widget) :
// TRANSLATORS: colors tab. label.
mGradDelayLabel(new Label(this, _("Delay:"))),
mGradDelaySlider(new Slider(this, 20.0, 100.0, 1.0)),
- mGradDelayText(new TextField(this)),
+ mGradDelayText(new TextField(this, std::string(), LoseFocusOnTab_true,
+ nullptr, std::string(), false)),
// TRANSLATORS: colors tab. label.
mRedLabel(new Label(this, _("Red:"))),
mRedSlider(new Slider(this, 0.0, 255.0, 1.0)),
- mRedText(new TextField(this)),
+ mRedText(new TextField(this, std::string(), LoseFocusOnTab_true,
+ nullptr, std::string(), false)),
// TRANSLATORS: colors tab. label.
mGreenLabel(new Label(this, _("Green:"))),
mGreenSlider(new Slider(this, 0.0, 255.0, 1.0)),
- mGreenText(new TextField(this)),
+ mGreenText(new TextField(this, std::string(), LoseFocusOnTab_true,
+ nullptr, std::string(), false)),
// TRANSLATORS: colors tab. label.
mBlueLabel(new Label(this, _("Blue:"))),
mBlueSlider(new Slider(this, 0.0, 255.0, 1.0)),
- mBlueText(new TextField(this))
+ mBlueText(new TextField(this, std::string(), LoseFocusOnTab_true,
+ nullptr, std::string(), false))
{
// TRANSLATORS: settings colors tab name
setName(_("Colors"));
diff --git a/src/gui/widgets/textfield.h b/src/gui/widgets/textfield.h
index 8001008a1..73ce0c525 100644
--- a/src/gui/widgets/textfield.h
+++ b/src/gui/widgets/textfield.h
@@ -94,14 +94,12 @@ class TextField notfinal : public Widget,
/**
* Constructor, initializes the text field with the given string.
*/
- explicit TextField(const Widget2 *restrict const widget,
- const std::string &restrict text = "",
- const LoseFocusOnTab loseFocusOnTab =
- LoseFocusOnTab_true,
- ActionListener *restrict
- const listener = nullptr,
- const std::string &restrict eventId = "",
- const bool sendAlwaysEvents = false);
+ TextField(const Widget2 *restrict const widget,
+ const std::string &restrict text,
+ const LoseFocusOnTab loseFocusOnTab,
+ ActionListener *restrict const listener,
+ const std::string &restrict eventId,
+ const bool sendAlwaysEvents);
A_DELETE_COPY(TextField)