From 4b9e2b6c41e740a3eac10078d5fa4fbc63788bbe Mon Sep 17 00:00:00 2001 From: Bjørn Lindeijer Date: Fri, 11 Apr 2008 13:31:52 +0000 Subject: Ported trunk over to Guichan 0.8.0. Based on merge from 0.0 branch, but because of quite a bit of GUI differences there were additional changes and probably additional issues. You have been warned. ;) Merged revisions 4045-4049,4051-4059 via svnmerge from https://themanaworld.svn.sourceforge.net/svnroot/themanaworld/tmw/branches/0.0 ........ r4045 | b_lindeijer | 2008-04-07 17:23:07 +0200 (Mon, 07 Apr 2008) | 3 lines Upgraded to Guichan 0.8.0 (merge from guichan-0.8 branch, except for gcn::TabbedArea usage) ........ r4059 | b_lindeijer | 2008-04-09 16:25:42 +0200 (Wed, 09 Apr 2008) | 2 lines Fixed problem with row height in shop list box. ........ --- src/gui/itemcontainer.cpp | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'src/gui/itemcontainer.cpp') diff --git a/src/gui/itemcontainer.cpp b/src/gui/itemcontainer.cpp index 1abb8f0b..eddb6011 100644 --- a/src/gui/itemcontainer.cpp +++ b/src/gui/itemcontainer.cpp @@ -24,9 +24,9 @@ #include "itemcontainer.h" #include +#include #include "sdlinput.h" -#include "selectionlistener.h" #include "../graphics.h" #include "../inventory.h" @@ -159,20 +159,19 @@ void ItemContainer::setSelectedItem(Item *item) if (mSelectedItem != item) { mSelectedItem = item; - fireSelectionChangedEvent(); + distributeValueChangedEvent(); } } -void -ItemContainer::fireSelectionChangedEvent() +void ItemContainer::distributeValueChangedEvent() { - SelectionEvent event(this); - SelectionListeners::iterator i_end = mListeners.end(); - SelectionListeners::iterator i; + SelectionListenerIterator iter; - for (i = mListeners.begin(); i != i_end; ++i) + for (iter = mSelectionListeners.begin(); iter != mSelectionListeners.end(); + ++iter) { - (*i)->selectionChanged(event); + gcn::SelectionEvent event(this); + (*iter)->valueChanged(event); } } -- cgit v1.2.3-70-g09d2