summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-08-18 21:26:04 +0300
committerAndrei Karas <akaras@inbox.ru>2014-08-18 21:26:04 +0300
commite21479ccc48ed8383a6ab72f45c43e12e8dffa69 (patch)
tree2882139edd93b0e3ae72fc541b366ed7246e46b2 /src
parent506a064c94e44d4f896fa9b2dc74d30e7f7f8c33 (diff)
downloadmv-e21479ccc48ed8383a6ab72f45c43e12e8dffa69.tar.gz
mv-e21479ccc48ed8383a6ab72f45c43e12e8dffa69.tar.bz2
mv-e21479ccc48ed8383a6ab72f45c43e12e8dffa69.tar.xz
mv-e21479ccc48ed8383a6ab72f45c43e12e8dffa69.zip
Remove default values from okdialog constructor.
Diffstat (limited to 'src')
-rw-r--r--src/client.cpp11
-rw-r--r--src/commands.cpp4
-rw-r--r--src/gamemodifiers.cpp2
-rw-r--r--src/gui/dialogsmanager.cpp3
-rw-r--r--src/gui/widgets/tabs/setup_input.cpp3
-rw-r--r--src/gui/widgets/tabs/setup_theme.cpp3
-rw-r--r--src/gui/widgets/tabs/setup_video.cpp3
-rw-r--r--src/gui/windows/changeemaildialog.cpp3
-rw-r--r--src/gui/windows/changepassworddialog.cpp3
-rw-r--r--src/gui/windows/charcreatedialog.cpp2
-rw-r--r--src/gui/windows/charselectdialog.cpp5
-rw-r--r--src/gui/windows/editserverdialog.cpp3
-rw-r--r--src/gui/windows/okdialog.h10
-rw-r--r--src/gui/windows/registerdialog.cpp3
-rw-r--r--src/gui/windows/socialwindow.cpp2
-rw-r--r--src/gui/windows/unregisterdialog.cpp3
-rw-r--r--src/net/ea/charserverhandler.cpp8
-rw-r--r--src/net/ea/gamehandler.cpp2
-rw-r--r--src/net/ea/playerhandler.cpp9
19 files changed, 50 insertions, 32 deletions
diff --git a/src/client.cpp b/src/client.cpp
index c52468563..04b8746b2 100644
--- a/src/client.cpp
+++ b/src/client.cpp
@@ -1383,7 +1383,8 @@ int Client::gameExec()
logger->log1("State: LOGIN ERROR");
// TRANSLATORS: error dialog header
mCurrentDialog = new OkDialog(_("Error"),
- errorMessage, DialogType::ERROR);
+ errorMessage, DialogType::ERROR,
+ true, true, nullptr, 260);
mCurrentDialog->addActionListener(&loginListener);
mCurrentDialog = nullptr; // OkDialog deletes itself
BLOCK_END("Client::gameExec STATE_LOGIN_ERROR")
@@ -1394,7 +1395,8 @@ int Client::gameExec()
logger->log1("State: ACCOUNT CHANGE ERROR");
// TRANSLATORS: error dialog header
mCurrentDialog = new OkDialog(_("Error"),
- errorMessage, DialogType::ERROR);
+ errorMessage, DialogType::ERROR,
+ true, true, nullptr, 260);
mCurrentDialog->addActionListener(&accountListener);
mCurrentDialog = nullptr; // OkDialog deletes itself
BLOCK_END("Client::gameExec STATE_ACCOUNTCHANGE_ERROR")
@@ -1449,7 +1451,7 @@ int Client::gameExec()
mCurrentDialog = new OkDialog(_("Password Change"),
// TRANSLATORS: password change message text
_("Password changed successfully!"),
- DialogType::ERROR);
+ DialogType::ERROR, true, true, nullptr, 260);
mCurrentDialog->addActionListener(&accountListener);
mCurrentDialog = nullptr; // OkDialog deletes itself
loginData.password = loginData.newPassword;
@@ -1473,7 +1475,8 @@ int Client::gameExec()
// TRANSLATORS: email change message header
mCurrentDialog = new OkDialog(_("Email Change"),
// TRANSLATORS: email change message text
- _("Email changed successfully!"), DialogType::ERROR);
+ _("Email changed successfully!"), DialogType::ERROR,
+ true, true, nullptr, 260);
mCurrentDialog->addActionListener(&accountListener);
mCurrentDialog = nullptr; // OkDialog deletes itself
break;
diff --git a/src/commands.cpp b/src/commands.cpp
index c8718127f..12207be20 100644
--- a/src/commands.cpp
+++ b/src/commands.cpp
@@ -1342,8 +1342,8 @@ static int uploadUpdate(void *ptr,
else
{
// TRANSLATORS: file uploaded message
- new OkDialog(_("File uploaded"), str,
- DialogType::OK, true, false);
+ new OkDialog(_("File uploaded"), str, DialogType::OK,
+ true, false, nullptr, 260);
}
}
}
diff --git a/src/gamemodifiers.cpp b/src/gamemodifiers.cpp
index fc60211e0..0c2427ac6 100644
--- a/src/gamemodifiers.cpp
+++ b/src/gamemodifiers.cpp
@@ -418,7 +418,7 @@ void GameModifiers::changeAwayMode()
// TRANSLATORS: away message box header
OkDialog *const dialog = new OkDialog(_("Away"),
config.getStringValue("afkMessage"),
- DialogType::SILENCE, true, false);
+ DialogType::SILENCE, true, false, nullptr, 260);
localPlayer->setAwayDialog(dialog);
dialog->addActionListener(localPlayer->getAwayListener());
soundManager.volumeOff();
diff --git a/src/gui/dialogsmanager.cpp b/src/gui/dialogsmanager.cpp
index ac15d960d..e456b254f 100644
--- a/src/gui/dialogsmanager.cpp
+++ b/src/gui/dialogsmanager.cpp
@@ -73,7 +73,8 @@ Window *DialogsManager::openErrorDialog(const std::string &header,
{
if (settings.supportUrl.empty() || config.getBoolValue("hidesupport"))
{
- return new OkDialog(header, message, DialogType::ERROR, modal);
+ return new OkDialog(header, message, DialogType::ERROR,
+ modal, true, nullptr, 260);
}
else
{
diff --git a/src/gui/widgets/tabs/setup_input.cpp b/src/gui/widgets/tabs/setup_input.cpp
index 1aababa3f..50bdf96ec 100644
--- a/src/gui/widgets/tabs/setup_input.cpp
+++ b/src/gui/widgets/tabs/setup_input.cpp
@@ -150,7 +150,8 @@ void Setup_Input::apply()
// TRANSLATORS: input settings error
strprintf(_("Conflict \"%s\" and \"%s\" keys. "
"Resolve them, or gameplay may result in strange behaviour."),
- gettext(str1.c_str()), gettext(str2.c_str())), DialogType::ERROR);
+ gettext(str1.c_str()), gettext(str2.c_str())), DialogType::ERROR,
+ true, true, nullptr, 260);
}
keyboard.setEnabled(true);
inputManager.store();
diff --git a/src/gui/widgets/tabs/setup_theme.cpp b/src/gui/widgets/tabs/setup_theme.cpp
index 5ef931249..b719537f7 100644
--- a/src/gui/widgets/tabs/setup_theme.cpp
+++ b/src/gui/widgets/tabs/setup_theme.cpp
@@ -334,7 +334,8 @@ void Setup_Theme::apply()
{
// TRANSLATORS: theme message dialog
new OkDialog(_("Theme Changed"), _("Restart your client for "
- "the change to take effect."));
+ "the change to take effect."), DialogType::OK,
+ true, true, nullptr, 260);
}
config.setValue("selectedSkin", "");
diff --git a/src/gui/widgets/tabs/setup_video.cpp b/src/gui/widgets/tabs/setup_video.cpp
index fc0619c4f..116541d2d 100644
--- a/src/gui/widgets/tabs/setup_video.cpp
+++ b/src/gui/widgets/tabs/setup_video.cpp
@@ -262,7 +262,8 @@ void Setup_Video::apply()
// TRANSLATORS: video settings warning
new OkDialog(_("Changing to OpenGL"),
// TRANSLATORS: video settings warning
- _("Applying change to OpenGL requires restart."));
+ _("Applying change to OpenGL requires restart."),
+ DialogType::OK, true, true, nullptr, 260);
}
mFps = mFpsCheckBox->isSelected() ?
diff --git a/src/gui/windows/changeemaildialog.cpp b/src/gui/windows/changeemaildialog.cpp
index f67a01584..d7dcbacbf 100644
--- a/src/gui/windows/changeemaildialog.cpp
+++ b/src/gui/windows/changeemaildialog.cpp
@@ -166,7 +166,8 @@ void ChangeEmailDialog::action(const ActionEvent &event)
// TRANSLATORS: change email error header
OkDialog *const dlg = new OkDialog(_("Error"),
- errorMsg.str(), DialogType::ERROR);
+ errorMsg.str(), DialogType::ERROR,
+ true, true, nullptr, 260);
dlg->addActionListener(mWrongDataNoticeListener);
}
else
diff --git a/src/gui/windows/changepassworddialog.cpp b/src/gui/windows/changepassworddialog.cpp
index c2bb85c21..b2ca3ebad 100644
--- a/src/gui/windows/changepassworddialog.cpp
+++ b/src/gui/windows/changepassworddialog.cpp
@@ -156,7 +156,8 @@ void ChangePasswordDialog::action(const ActionEvent &event)
// TRANSLATORS: change password error header
OkDialog *const dlg = new OkDialog(_("Error"),
- errorMsg.str(), DialogType::ERROR);
+ errorMsg.str(), DialogType::ERROR,
+ true, true, nullptr, 260);
dlg->addActionListener(mWrongDataNoticeListener);
}
else
diff --git a/src/gui/windows/charcreatedialog.cpp b/src/gui/windows/charcreatedialog.cpp
index ddd6ac873..75e552f54 100644
--- a/src/gui/windows/charcreatedialog.cpp
+++ b/src/gui/windows/charcreatedialog.cpp
@@ -368,7 +368,7 @@ void CharCreateDialog::action(const ActionEvent &event)
new OkDialog(_("Error"),
// TRANSLATORS: char creation error
_("Your name needs to be at least 4 characters."),
- DialogType::ERROR, true, this);
+ DialogType::ERROR, true, this, nullptr, 260);
}
}
else if (id == "cancel")
diff --git a/src/gui/windows/charselectdialog.cpp b/src/gui/windows/charselectdialog.cpp
index 70d8cc4e1..678fe09f7 100644
--- a/src/gui/windows/charselectdialog.cpp
+++ b/src/gui/windows/charselectdialog.cpp
@@ -240,7 +240,8 @@ void CharSelectDialog::action(const ActionEvent &event)
character->data.mAttributes[Attributes::EXP]),
Units::formatCurrency(
character->data.mAttributes[Attributes::MONEY]).c_str());
- new OkDialog(data->getName(), msg, DialogType::SILENCE);
+ new OkDialog(data->getName(), msg, DialogType::SILENCE,
+ true, true, nullptr, 260);
}
}
if (eventId == "switch")
@@ -273,7 +274,7 @@ void CharSelectDialog::action(const ActionEvent &event)
{
// TRANSLATORS: error message
new OkDialog(_("Error"), _("Incorrect password"),
- DialogType::ERROR);
+ DialogType::ERROR, true, true, nullptr, 260);
}
mDeleteIndex = -1;
}
diff --git a/src/gui/windows/editserverdialog.cpp b/src/gui/windows/editserverdialog.cpp
index d72cdf368..1b8127eaf 100644
--- a/src/gui/windows/editserverdialog.cpp
+++ b/src/gui/windows/editserverdialog.cpp
@@ -194,7 +194,8 @@ void EditServerDialog::action(const ActionEvent &event)
OkDialog *const dlg = new OkDialog(_("Error"),
// TRANSLATORS: edit server dialog error message
_("Please at least type both the address and the port "
- "of the server."), DialogType::ERROR);
+ "of the server."), DialogType::ERROR,
+ true, true, nullptr, 260);
dlg->addActionListener(this);
}
else
diff --git a/src/gui/windows/okdialog.h b/src/gui/windows/okdialog.h
index 5017207cd..9db759937 100644
--- a/src/gui/windows/okdialog.h
+++ b/src/gui/windows/okdialog.h
@@ -49,11 +49,11 @@ class OkDialog final : public Window,
*/
OkDialog(const std::string &restrict title,
const std::string &restrict msg,
- const int soundEvent = DialogType::OK,
- const bool modal = true,
- const bool showCenter = true,
- Window *const parent = nullptr,
- const int minWidth = 260);
+ const int soundEvent,
+ const bool modal,
+ const bool showCenter,
+ Window *const parent,
+ const int minWidth);
A_DELETE_COPY(OkDialog)
diff --git a/src/gui/windows/registerdialog.cpp b/src/gui/windows/registerdialog.cpp
index edcac1bda..9f19cbcf1 100644
--- a/src/gui/windows/registerdialog.cpp
+++ b/src/gui/windows/registerdialog.cpp
@@ -244,7 +244,8 @@ void RegisterDialog::action(const ActionEvent &event)
OkDialog *const dlg = new OkDialog(
// TRANSLATORS: error message
- _("Error"), errorMsg, DialogType::ERROR);
+ _("Error"), errorMsg, DialogType::ERROR,
+ true, true, nullptr, 260);
dlg->addActionListener(mWrongDataNoticeListener);
}
else
diff --git a/src/gui/windows/socialwindow.cpp b/src/gui/windows/socialwindow.cpp
index bbfa91a81..aa74ad200 100644
--- a/src/gui/windows/socialwindow.cpp
+++ b/src/gui/windows/socialwindow.cpp
@@ -496,7 +496,7 @@ void SocialWindow::showPartyCreate()
// TRANSLATORS: party creation message
new OkDialog(_("Create Party"),
_("Cannot create party. You are already in a party"),
- DialogType::ERROR, true, true, this);
+ DialogType::ERROR, true, true, this, 260);
return;
}
diff --git a/src/gui/windows/unregisterdialog.cpp b/src/gui/windows/unregisterdialog.cpp
index ad0b98e0e..40ef9d57a 100644
--- a/src/gui/windows/unregisterdialog.cpp
+++ b/src/gui/windows/unregisterdialog.cpp
@@ -145,7 +145,8 @@ void UnRegisterDialog::action(const ActionEvent &event)
// TRANSLATORS: unregister dialog. error message.
OkDialog *const dlg = new OkDialog(_("Error"),
- errorMsg.str(), DialogType::ERROR);
+ errorMsg.str(), DialogType::ERROR,
+ true, true, nullptr, 260);
dlg->addActionListener(mWrongDataNoticeListener);
}
else
diff --git a/src/net/ea/charserverhandler.cpp b/src/net/ea/charserverhandler.cpp
index bb89a10e6..e0bdc0e92 100644
--- a/src/net/ea/charserverhandler.cpp
+++ b/src/net/ea/charserverhandler.cpp
@@ -201,7 +201,8 @@ void CharServerHandler::processCharCreateFailed(Net::MessageIn &msg)
break;
}
// TRANSLATORS: error message header
- new OkDialog(_("Error"), errorMessage, DialogType::ERROR);
+ new OkDialog(_("Error"), errorMessage, DialogType::ERROR,
+ true, true, nullptr, 260);
if (mCharCreateDialog)
mCharCreateDialog->unlock();
BLOCK_END("CharServerHandler::processCharCreateFailed")
@@ -216,7 +217,8 @@ void CharServerHandler::processCharDelete(Net::MessageIn &msg A_UNUSED)
updateCharSelectDialog();
unlockCharSelectDialog();
// TRANSLATORS: info message
- new OkDialog(_("Info"), _("Character deleted."));
+ new OkDialog(_("Info"), _("Character deleted."), DialogType::OK,
+ true, true, nullptr, 260);
BLOCK_END("CharServerHandler::processCharDelete")
}
@@ -226,7 +228,7 @@ void CharServerHandler::processCharDeleteFailed(Net::MessageIn &msg A_UNUSED)
unlockCharSelectDialog();
// TRANSLATORS: error message
new OkDialog(_("Error"), _("Failed to delete character."),
- DialogType::ERROR);
+ DialogType::ERROR, true, true, nullptr, 260);
BLOCK_END("CharServerHandler::processCharDeleteFailed")
}
diff --git a/src/net/ea/gamehandler.cpp b/src/net/ea/gamehandler.cpp
index 244b2190f..f81121fd1 100644
--- a/src/net/ea/gamehandler.cpp
+++ b/src/net/ea/gamehandler.cpp
@@ -90,7 +90,7 @@ void GameHandler::processMapQuitResponse(Net::MessageIn &msg) const
if (msg.readUInt8())
{
new OkDialog(_("Game"), _("Request to quit denied!"),
- DialogType::ERROR);
+ DialogType::ERROR, true, true, nullptr, 260);
}
}
diff --git a/src/net/ea/playerhandler.cpp b/src/net/ea/playerhandler.cpp
index 225162e9a..f7da2d321 100644
--- a/src/net/ea/playerhandler.cpp
+++ b/src/net/ea/playerhandler.cpp
@@ -273,7 +273,8 @@ void PlayerHandler::processPlayerStatUpdate1(Net::MessageIn &msg)
// TRANSLATORS: weight message
_("You are carrying more than "
"half your weight. You are "
- "unable to regain health."), DialogType::OK, false);
+ "unable to regain health."), DialogType::OK,
+ false, true, nullptr, 260);
weightNotice->addActionListener(
&weightListener);
}
@@ -285,7 +286,8 @@ void PlayerHandler::processPlayerStatUpdate1(Net::MessageIn &msg)
// TRANSLATORS: weight message
_("You are carrying less than "
"half your weight. You "
- "can regain health."), DialogType::OK, false);
+ "can regain health."), DialogType::OK,
+ false, true, nullptr, 260);
weightNotice->addActionListener(
&weightListener);
}
@@ -366,7 +368,8 @@ void PlayerHandler::processPlayerStatUpdate1(Net::MessageIn &msg)
{
// TRANSLATORS: message header
deathNotice = new OkDialog(_("Message"),
- DeadDB::getRandomString(), DialogType::OK, false);
+ DeadDB::getRandomString(), DialogType::OK,
+ false, true, nullptr, 260);
deathNotice->addActionListener(&deathListener);
if (localPlayer->getCurrentAction() != BeingAction::DEAD)
{