summaryrefslogtreecommitdiff
path: root/src/gui/textdialog.cpp
diff options
context:
space:
mode:
authorJared Adams <jaxad0127@gmail.com>2010-02-08 14:40:04 -0700
committerJared Adams <jaxad0127@gmail.com>2010-02-08 14:43:51 -0700
commit8a31e96d8534d402db9cd48183c0b15732f7d95e (patch)
tree885d83febf301c1289c3bf7f83bf9dca89e0347c /src/gui/textdialog.cpp
parentbc5c031e43eff506c925682349dd2a52b89d6565 (diff)
downloadmana-8a31e96d8534d402db9cd48183c0b15732f7d95e.tar.gz
mana-8a31e96d8534d402db9cd48183c0b15732f7d95e.tar.bz2
mana-8a31e96d8534d402db9cd48183c0b15732f7d95e.tar.xz
mana-8a31e96d8534d402db9cd48183c0b15732f7d95e.zip
Merge PartyWindow and GuildWindow into SocialWindow
Diffstat (limited to 'src/gui/textdialog.cpp')
-rw-r--r--src/gui/textdialog.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/gui/textdialog.cpp b/src/gui/textdialog.cpp
index 0bdd6030..3e8af7e8 100644
--- a/src/gui/textdialog.cpp
+++ b/src/gui/textdialog.cpp
@@ -65,6 +65,7 @@ TextDialog::TextDialog(const std::string &title, const std::string &msg,
getParent()->moveToTop(this);
}
setVisible(true);
+ requestModalFocus();
mTextField->requestFocus();
instances++;
@@ -77,14 +78,10 @@ TextDialog::~TextDialog()
void TextDialog::action(const gcn::ActionEvent &event)
{
- // Proxy button events to our listeners
- ActionListenerIterator i;
- for (i = mActionListeners.begin(); i != mActionListeners.end(); ++i)
- {
- (*i)->action(event);
- }
+ setActionEventId(event.getId());
+ distributeActionEvent();
- if (event.getId() == "CANCEL" || event.getId() == "OK")
+ if (event.getId() == "CANCEL" || event.getSource() == mOkButton)
{
scheduleDelete();
}