summaryrefslogtreecommitdiff
path: root/src/gui/textdialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/textdialog.cpp')
-rw-r--r--src/gui/textdialog.cpp15
1 files changed, 4 insertions, 11 deletions
diff --git a/src/gui/textdialog.cpp b/src/gui/textdialog.cpp
index b33b664b..120780fe 100644
--- a/src/gui/textdialog.cpp
+++ b/src/gui/textdialog.cpp
@@ -78,21 +78,14 @@ TextDialog::~TextDialog()
void TextDialog::action(const gcn::ActionEvent &event)
{
- setActionEventId(event.getId());
- distributeActionEvent();
+ if (event.getId() == "CANCEL")
+ setActionEventId("~" + getActionEventId());
- if (event.getId() == "CANCEL" || event.getSource() == mOkButton)
- {
- scheduleDelete();
- }
+ distributeActionEvent();
+ scheduleDelete();
}
const std::string &TextDialog::getText() const
{
return mTextField->getText();
}
-
-void TextDialog::setOKButtonActionId(const std::string &name)
-{
- mOkButton->setActionEventId(name);
-}