summaryrefslogtreecommitdiff
path: root/src/gui/windows/charselectdialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/windows/charselectdialog.cpp')
-rw-r--r--src/gui/windows/charselectdialog.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/gui/windows/charselectdialog.cpp b/src/gui/windows/charselectdialog.cpp
index 658da0455..70bcbcf74 100644
--- a/src/gui/windows/charselectdialog.cpp
+++ b/src/gui/windows/charselectdialog.cpp
@@ -307,12 +307,16 @@ void CharSelectDialog::action(const ActionEvent &event)
return;
if ((mDeleteDialog != nullptr) && mDeleteIndex != -1)
{
+ const Net::Character *const character
+ = mCharacterEntries[mDeleteIndex]->getCharacter();
if (serverFeatures->haveEmailOnDelete())
{
attemptCharacterDelete(mDeleteIndex, mDeleteDialog->getText());
mDeleteDialog = nullptr;
}
- else if (mDeleteDialog->getText() == LoginDialog::savedPassword)
+ else if (character != nullptr &&
+ character->dummy != nullptr &&
+ mDeleteDialog->getText() == character->dummy->getName())
{
attemptCharacterDelete(mDeleteIndex, "");
mDeleteDialog = nullptr;
@@ -323,7 +327,7 @@ void CharSelectDialog::action(const ActionEvent &event)
// TRANSLATORS: error header
_("Error"),
// TRANSLATORS: error message
- _("Incorrect password"),
+ _("Incorrect character name"),
// TRANSLATORS: ok dialog button
_("OK"),
DialogType::ERROR,
@@ -497,9 +501,9 @@ void CharSelectDialog::askPasswordForDeletion(const int index)
{
CREATEWIDGETV(mDeleteDialog, TextDialog,
// TRANSLATORS: char deletion question.
- _("Enter password for deleting character"),
+ _("Enter character name to confirm deleting the character"),
// TRANSLATORS: email label.
- _("Enter password:"),
+ _("Enter character name:"),
this,
true);
}