summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-12-23 01:40:21 +0300
committerAndrei Karas <akaras@inbox.ru>2017-12-23 01:40:21 +0300
commit71e06c926c4abc34052a3e2073db609d8e63e22c (patch)
tree683045ff5602eb520a7e8dfa1ad50867ad0db2e5 /src/gui
parent86487ca386118d3a06c029c00ad7f75767c3c719 (diff)
downloadmanaplus-71e06c926c4abc34052a3e2073db609d8e63e22c.tar.gz
manaplus-71e06c926c4abc34052a3e2073db609d8e63e22c.tar.bz2
manaplus-71e06c926c4abc34052a3e2073db609d8e63e22c.tar.xz
manaplus-71e06c926c4abc34052a3e2073db609d8e63e22c.zip
Remove default parameters from editdialog.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/widgets/setupitem.cpp10
-rw-r--r--src/gui/windows/charselectdialog.cpp10
-rw-r--r--src/gui/windows/editdialog.h7
-rw-r--r--src/gui/windows/shopwindow.cpp5
4 files changed, 24 insertions, 8 deletions
diff --git a/src/gui/widgets/setupitem.cpp b/src/gui/widgets/setupitem.cpp
index cc6ded02e..abe67d746 100644
--- a/src/gui/widgets/setupitem.cpp
+++ b/src/gui/widgets/setupitem.cpp
@@ -421,7 +421,10 @@ void SetupItemTextField::action(const ActionEvent &event)
mEditDialog = CREATEWIDGETR(EditDialog,
mText,
mTextField->getText(),
- mEventName + "_EDIT_OK");
+ mEventName + "_EDIT_OK",
+ 300,
+ nullptr,
+ Modal_true);
mEditDialog->addActionListener(this);
}
else if (eventId == mEventName + "_EDIT_OK")
@@ -559,7 +562,10 @@ void SetupItemIntTextField::action(const ActionEvent &event)
mEditDialog = CREATEWIDGETR(EditDialog,
mText,
mTextField->getText(),
- mEventName + "_EDIT_OK");
+ mEventName + "_EDIT_OK",
+ 300,
+ nullptr,
+ Modal_true);
mEditDialog->addActionListener(this);
}
else if (eventId == mEventName + "_EDIT_OK")
diff --git a/src/gui/windows/charselectdialog.cpp b/src/gui/windows/charselectdialog.cpp
index fb759eb96..a8da297cb 100644
--- a/src/gui/windows/charselectdialog.cpp
+++ b/src/gui/windows/charselectdialog.cpp
@@ -177,7 +177,10 @@ void CharSelectDialog::postInit()
// TRANSLATORS: pin code dialog header.
_("Please set new pincode"),
"",
- "OK");
+ "OK",
+ 300,
+ nullptr,
+ Modal_true);
dialog->addActionListener(&pincodeListener);
}
}
@@ -227,7 +230,10 @@ void CharSelectDialog::action(const ActionEvent &event)
// TRANSLATORS: character rename dialog header.
_("Please enter new name"),
player->getName(),
- "OK");
+ "OK",
+ 300,
+ nullptr,
+ Modal_true);
charRenameListener.setId(player->getId());
charRenameListener.setDialog(dialog);
dialog->addActionListener(&charRenameListener);
diff --git a/src/gui/windows/editdialog.h b/src/gui/windows/editdialog.h
index cea7d6f78..6bfad4f55 100644
--- a/src/gui/windows/editdialog.h
+++ b/src/gui/windows/editdialog.h
@@ -48,9 +48,10 @@ class EditDialog final : public Window,
*/
EditDialog(const std::string &restrict title,
const std::string &restrict msg,
- const std::string &restrict eventOk = ACTION_EDIT_OK,
- const int width = 300, Window *const parent = nullptr,
- const Modal modal = Modal_true);
+ const std::string &restrict eventOk,
+ const int width,
+ Window *const parent,
+ const Modal modal);
A_DELETE_COPY(EditDialog)
diff --git a/src/gui/windows/shopwindow.cpp b/src/gui/windows/shopwindow.cpp
index b044831ff..757ffd902 100644
--- a/src/gui/windows/shopwindow.cpp
+++ b/src/gui/windows/shopwindow.cpp
@@ -372,7 +372,10 @@ void ShopWindow::action(const ActionEvent &event)
// TRANSLATORS: shop rename dialog title
_("Please enter new shop name"),
mSellShopName,
- "OK");
+ "OK",
+ 300,
+ nullptr,
+ Modal_true);
shopRenameListener.setDialog(dialog);
dialog->addActionListener(&shopRenameListener);
}