From 8a31e96d8534d402db9cd48183c0b15732f7d95e Mon Sep 17 00:00:00 2001 From: Jared Adams Date: Mon, 8 Feb 2010 14:40:04 -0700 Subject: Merge PartyWindow and GuildWindow into SocialWindow --- src/gui/textdialog.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'src/gui/textdialog.cpp') 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(); } -- cgit v1.2.3-70-g09d2