From f842e0b40d8382011f0bc46b1446945d99ac0425 Mon Sep 17 00:00:00 2001 From: Bjørn Lindeijer Date: Sun, 14 Jan 2007 14:54:39 +0000 Subject: Upgraded to Guichan 0.6.0 (merge from guichan-0.6.0 branch). --- src/gui/npclistdialog.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/gui/npclistdialog.cpp') diff --git a/src/gui/npclistdialog.cpp b/src/gui/npclistdialog.cpp index 895ef1f9..1bcdc8ff 100644 --- a/src/gui/npclistdialog.cpp +++ b/src/gui/npclistdialog.cpp @@ -50,7 +50,7 @@ NpcListDialog::NpcListDialog(): cancelButton->getX() - 5 - okButton->getWidth(), cancelButton->getY()); - mItemList->setEventId("item"); + mItemList->setActionEventId("item"); mItemList->addActionListener(this); @@ -91,11 +91,11 @@ NpcListDialog::reset() } void -NpcListDialog::action(const std::string& eventId, gcn::Widget* widget) +NpcListDialog::action(const gcn::ActionEvent &event) { int choice = 0; - if (eventId == "ok") + if (event.getId() == "ok") { // Send the selected index back to the server int selectedIndex = mItemList->getSelected(); @@ -104,7 +104,7 @@ NpcListDialog::action(const std::string& eventId, gcn::Widget* widget) choice = selectedIndex + 1; } } - else if (eventId == "cancel") + else if (event.getId() == "cancel") { choice = 0xff; // 0xff means cancel } -- cgit v1.2.3-70-g09d2