summaryrefslogtreecommitdiff
path: root/src/gui/widgets
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-12-26 21:50:46 +0300
committerAndrei Karas <akaras@inbox.ru>2017-12-26 21:50:46 +0300
commit03f4d4beaaa2ea4ac99aa746460283d4ca644a3f (patch)
treee60a1fd194180fea9dd37553c97ab2e28f4cdfc7 /src/gui/widgets
parent6d95f9aeff5dcfc791520e0ffb10cc34ecc348a0 (diff)
downloadmanaplus-03f4d4beaaa2ea4ac99aa746460283d4ca644a3f.tar.gz
manaplus-03f4d4beaaa2ea4ac99aa746460283d4ca644a3f.tar.bz2
manaplus-03f4d4beaaa2ea4ac99aa746460283d4ca644a3f.tar.xz
manaplus-03f4d4beaaa2ea4ac99aa746460283d4ca644a3f.zip
Remove default parameters from dropdown.
Diffstat (limited to 'src/gui/widgets')
-rw-r--r--src/gui/widgets/dropdown.cpp2
-rw-r--r--src/gui/widgets/dropdown.h10
-rw-r--r--src/gui/widgets/setupitem.cpp14
-rw-r--r--src/gui/widgets/setuptouchitem.cpp7
-rw-r--r--src/gui/widgets/tabs/setup_joystick.cpp3
-rw-r--r--src/gui/widgets/tabs/setup_relations.cpp3
-rw-r--r--src/gui/widgets/tabs/setup_theme.cpp36
-rw-r--r--src/gui/widgets/tabs/setup_video.cpp3
8 files changed, 54 insertions, 24 deletions
diff --git a/src/gui/widgets/dropdown.cpp b/src/gui/widgets/dropdown.cpp
index 0a42404a7..7e9de9b53 100644
--- a/src/gui/widgets/dropdown.cpp
+++ b/src/gui/widgets/dropdown.cpp
@@ -393,7 +393,7 @@ void DropDown::mousePressed(MouseEvent& event)
{
mPushed = false;
foldUp();
- hideDrop();
+ hideDrop(true);
}
}
diff --git a/src/gui/widgets/dropdown.h b/src/gui/widgets/dropdown.h
index 029850766..ec2e2136e 100644
--- a/src/gui/widgets/dropdown.h
+++ b/src/gui/widgets/dropdown.h
@@ -57,10 +57,10 @@ class DropDown final : public ActionListener,
public:
DropDown(const Widget2 *const widget,
ListModel *const listModel,
- const bool extended = false,
- const Modal modal = Modal_false,
- ActionListener *const listener = nullptr,
- const std::string &eventId = "");
+ const bool extended,
+ const Modal modal,
+ ActionListener *const listener,
+ const std::string &eventId);
A_DELETE_COPY(DropDown)
@@ -110,7 +110,7 @@ class DropDown final : public ActionListener,
void foldUp();
- void hideDrop(bool event = true);
+ void hideDrop(bool event);
int getSelected() const;
diff --git a/src/gui/widgets/setupitem.cpp b/src/gui/widgets/setupitem.cpp
index 06f895f83..018ed30d8 100644
--- a/src/gui/widgets/setupitem.cpp
+++ b/src/gui/widgets/setupitem.cpp
@@ -697,7 +697,12 @@ void SetupItemDropDown::createControls()
mLabel = new Label(this, mText);
mLabel->setToolTip(mDescription);
- mDropDown = new DropDown(this, mModel);
+ mDropDown = new DropDown(this,
+ mModel,
+ false,
+ Modal_false,
+ nullptr,
+ std::string());
mDropDown->setActionEventId(mEventName);
mDropDown->addActionListener(mParent);
mDropDown->setWidth(mWidth);
@@ -798,7 +803,12 @@ void SetupItemDropDownStr::createControls()
mLabel = new Label(this, mText);
mLabel->setToolTip(mDescription);
- mDropDown = new DropDown(this, mModel);
+ mDropDown = new DropDown(this,
+ mModel,
+ false,
+ Modal_false,
+ nullptr,
+ std::string());
mDropDown->setActionEventId(mEventName);
mDropDown->addActionListener(mParent);
mDropDown->setWidth(mWidth);
diff --git a/src/gui/widgets/setuptouchitem.cpp b/src/gui/widgets/setuptouchitem.cpp
index 122853c7e..13580c222 100644
--- a/src/gui/widgets/setuptouchitem.cpp
+++ b/src/gui/widgets/setuptouchitem.cpp
@@ -95,7 +95,12 @@ void SetupActionDropDown::createControls()
mLabel = new Label(this, mText);
mLabel->setToolTip(mDescription);
- mDropDown = new DropDown(this, mModel);
+ mDropDown = new DropDown(this,
+ mModel,
+ false,
+ Modal_false,
+ nullptr,
+ std::string());
mDropDown->setActionEventId(mEventName);
mDropDown->addActionListener(mParent);
mDropDown->setWidth(mWidth);
diff --git a/src/gui/widgets/tabs/setup_joystick.cpp b/src/gui/widgets/tabs/setup_joystick.cpp
index 927215e1e..04ec3eee4 100644
--- a/src/gui/widgets/tabs/setup_joystick.cpp
+++ b/src/gui/widgets/tabs/setup_joystick.cpp
@@ -53,7 +53,8 @@ Setup_Joystick::Setup_Joystick(const Widget2 *const widget) :
mJoystickEnabled(new CheckBox(this, _("Enable joystick"),
false, nullptr, std::string())),
mNamesModel(new NamesModel),
- mNamesDropDown(new DropDown(this, mNamesModel)),
+ mNamesDropDown(new DropDown(this, mNamesModel,
+ false, Modal_false, nullptr, std::string())),
mUseInactiveCheckBox(new CheckBox(this,
// TRANSLATORS: joystick settings tab checkbox
_("Use joystick if client window inactive"),
diff --git a/src/gui/widgets/tabs/setup_relations.cpp b/src/gui/widgets/tabs/setup_relations.cpp
index 80e9526f0..c922d210c 100644
--- a/src/gui/widgets/tabs/setup_relations.cpp
+++ b/src/gui/widgets/tabs/setup_relations.cpp
@@ -80,7 +80,8 @@ Setup_Relations::Setup_Relations(const Widget2 *const widget) :
// TRANSLATORS: relation dialog button
mDeleteButton(new Button(this, _("Delete"), ACTION_DELETE, this)),
mIgnoreActionChoicesModel(new IgnoreChoicesListModel),
- mIgnoreActionChoicesBox(new DropDown(widget, mIgnoreActionChoicesModel))
+ mIgnoreActionChoicesBox(new DropDown(widget, mIgnoreActionChoicesModel,
+ false, Modal_false, nullptr, std::string()))
{
// TRANSLATORS: relation dialog name
setName(_("Relations"));
diff --git a/src/gui/widgets/tabs/setup_theme.cpp b/src/gui/widgets/tabs/setup_theme.cpp
index e8baed86f..6f4e237a6 100644
--- a/src/gui/widgets/tabs/setup_theme.cpp
+++ b/src/gui/widgets/tabs/setup_theme.cpp
@@ -62,57 +62,69 @@ Setup_Theme::Setup_Theme(const Widget2 *const widget) :
// TRANSLATORS: theme settings label
mThemeLabel(new Label(this, _("Gui theme"))),
mThemesModel(new ThemesModel),
- mThemeDropDown(new DropDown(this, mThemesModel)),
+ mThemeDropDown(new DropDown(this, mThemesModel,
+ false, Modal_false, nullptr, std::string())),
mTheme(config.getStringValue("theme")),
mInfo(Theme::loadInfo(mTheme)),
mFontsModel(new FontsModel),
// TRANSLATORS: theme settings label
mFontLabel(new Label(this, _("Main Font"))),
- mFontDropDown(new DropDown(this, mFontsModel)),
+ mFontDropDown(new DropDown(this, mFontsModel,
+ false, Modal_false, nullptr, std::string())),
mFont(config.getStringValue("font")),
mLangListModel(new LangListModel),
// TRANSLATORS: theme settings label
mLangLabel(new Label(this, _("Language"))),
- mLangDropDown(new DropDown(this, mLangListModel, true)),
+ mLangDropDown(new DropDown(this, mLangListModel,
+ true, Modal_false, nullptr, std::string())),
mLang(config.getStringValue("lang")),
// TRANSLATORS: theme settings label
mBoldFontLabel(new Label(this, _("Bold font"))),
- mBoldFontDropDown(new DropDown(this, mFontsModel)),
+ mBoldFontDropDown(new DropDown(this, mFontsModel,
+ false, Modal_false, nullptr, std::string())),
mBoldFont(config.getStringValue("boldFont")),
// TRANSLATORS: theme settings label
mParticleFontLabel(new Label(this, _("Particle font"))),
- mParticleFontDropDown(new DropDown(this, mFontsModel)),
+ mParticleFontDropDown(new DropDown(this, mFontsModel,
+ false, Modal_false, nullptr, std::string())),
mParticleFont(config.getStringValue("particleFont")),
// TRANSLATORS: theme settings label
mHelpFontLabel(new Label(this, _("Help font"))),
- mHelpFontDropDown(new DropDown(this, mFontsModel)),
+ mHelpFontDropDown(new DropDown(this, mFontsModel,
+ false, Modal_false, nullptr, std::string())),
mHelpFont(config.getStringValue("helpFont")),
// TRANSLATORS: theme settings label
mSecureFontLabel(new Label(this, _("Secure font"))),
- mSecureFontDropDown(new DropDown(this, mFontsModel)),
+ mSecureFontDropDown(new DropDown(this, mFontsModel,
+ false, Modal_false, nullptr, std::string())),
mSecureFont(config.getStringValue("secureFont")),
// TRANSLATORS: theme settings label
mNpcFontLabel(new Label(this, _("Npc font"))),
- mNpcFontDropDown(new DropDown(this, mFontsModel)),
+ mNpcFontDropDown(new DropDown(this, mFontsModel,
+ false, Modal_false, nullptr, std::string())),
mNpcFont(config.getStringValue("npcFont")),
// TRANSLATORS: theme settings label
mJapanFontLabel(new Label(this, _("Japanese font"))),
- mJapanFontDropDown(new DropDown(this, mFontsModel)),
+ mJapanFontDropDown(new DropDown(this, mFontsModel,
+ false, Modal_false, nullptr, std::string())),
mJapanFont(config.getStringValue("japanFont")),
// TRANSLATORS: theme settings label
mChinaFontLabel(new Label(this, _("Chinese font"))),
- mChinaFontDropDown(new DropDown(this, mFontsModel)),
+ mChinaFontDropDown(new DropDown(this, mFontsModel,
+ false, Modal_false, nullptr, std::string())),
mChinaFont(config.getStringValue("chinaFont")),
mFontSizeListModel(new FontSizeChoiceListModel),
// TRANSLATORS: theme settings label
mFontSizeLabel(new Label(this, _("Font size"))),
mFontSize(config.getIntValue("fontSize")),
- mFontSizeDropDown(new DropDown(this, mFontSizeListModel)),
+ mFontSizeDropDown(new DropDown(this, mFontSizeListModel,
+ false, Modal_false, nullptr, std::string())),
mNpcFontSizeListModel(new FontSizeChoiceListModel),
// TRANSLATORS: theme settings label
mNpcFontSizeLabel(new Label(this, _("Npc font size"))),
mNpcFontSize(config.getIntValue("npcfontSize")),
- mNpcFontSizeDropDown(new DropDown(this, mNpcFontSizeListModel)),
+ mNpcFontSizeDropDown(new DropDown(this, mNpcFontSizeListModel,
+ false, Modal_false, nullptr, std::string())),
// TRANSLATORS: button name with information about selected theme
mInfoButton(new Button(this, _("i"), ACTION_INFO, this)),
mThemeInfo()
diff --git a/src/gui/widgets/tabs/setup_video.cpp b/src/gui/widgets/tabs/setup_video.cpp
index 7d8e474ea..3404f5fcc 100644
--- a/src/gui/widgets/tabs/setup_video.cpp
+++ b/src/gui/widgets/tabs/setup_video.cpp
@@ -74,7 +74,8 @@ Setup_Video::Setup_Video(const Widget2 *const widget) :
// TRANSLATORS: video settings checkbox
mFsCheckBox(new CheckBox(this, _("Full screen"), mFullScreenEnabled,
nullptr, std::string())),
- mOpenGLDropDown(new DropDown(widget, mOpenGLListModel)),
+ mOpenGLDropDown(new DropDown(widget, mOpenGLListModel,
+ false, Modal_false, nullptr, std::string())),
// TRANSLATORS: video settings checkbox
mFpsCheckBox(new CheckBox(this, _("FPS limit:"), false,
nullptr, std::string())),