diff options
author | Björn Steinbrink <B.Steinbrink@gmx.de> | 2006-02-01 12:24:10 +0000 |
---|---|---|
committer | Björn Steinbrink <B.Steinbrink@gmx.de> | 2006-02-01 12:24:10 +0000 |
commit | 4490b8643f2449da159c9284503eb2c443aa2e9e (patch) | |
tree | d859ebeb3ee69b89c471793b76f9df7fe9546137 /src/gui/login.cpp | |
parent | 6bff53b318937999a70d775bb6ecea2b18576e0f (diff) | |
download | mana-client-4490b8643f2449da159c9284503eb2c443aa2e9e.tar.gz mana-client-4490b8643f2449da159c9284503eb2c443aa2e9e.tar.bz2 mana-client-4490b8643f2449da159c9284503eb2c443aa2e9e.tar.xz mana-client-4490b8643f2449da159c9284503eb2c443aa2e9e.zip |
Made the OkDialog and ConfirmDialog classes proxies for their buttons' events. Removed the RequestTradeWindow class, replaced with a plain ConfirmDialog. Fixed a memory leak along the way.
Diffstat (limited to 'src/gui/login.cpp')
-rw-r--r-- | src/gui/login.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/gui/login.cpp b/src/gui/login.cpp index 836c1c14..e3828af7 100644 --- a/src/gui/login.cpp +++ b/src/gui/login.cpp @@ -133,7 +133,12 @@ LoginDialog::LoginDialog(LoginData *loginData): serverField->setText(config.getValue("host", "")); - wrongDataNoticeListener = NULL; + wrongDataNoticeListener = new WrongDataNoticeListener(); +} + +LoginDialog::~LoginDialog() +{ + delete wrongDataNoticeListener; } void @@ -160,10 +165,9 @@ LoginDialog::action(const std::string& eventId) // Check login if (user.length() == 0) { - wrongDataNoticeListener = new WrongDataNoticeListener(); wrongDataNoticeListener->setTarget(this->passField); - new OkDialog("Error", "Enter your username first", - wrongDataNoticeListener); + OkDialog *dlg = new OkDialog("Error", "Enter your username first"); + dlg->addActionListener(wrongDataNoticeListener); } else { |