--- nfo/projects/netfraggle/bin/FraggleTopicFrame.py 2004/08/30 13:06:16 1.5 +++ nfo/projects/netfraggle/bin/FraggleTopicFrame.py 2004/08/31 02:25:34 1.6 @@ -1,7 +1,11 @@ #Boa:MDIChild:FraggleTopicFrame -# $Id: FraggleTopicFrame.py,v 1.5 2004/08/30 13:06:16 joko Exp $ +# $Id: FraggleTopicFrame.py,v 1.6 2004/08/31 02:25:34 joko Exp $ # $Log: FraggleTopicFrame.py,v $ +# Revision 1.6 2004/08/31 02:25:34 joko +# U removed FraggleTopicDetailFrame in favor of FraggleItemFrame and FraggleListFrame +# U now clearing topicListBox before updating it +# # Revision 1.5 2004/08/30 13:06:16 joko # U now gets config via self.engine # @@ -24,7 +28,8 @@ from wxPython.wx import * from wxPython.stc import * -import FraggleTopicDetailFrame +import FraggleItemFrame +import FraggleListFrame def create(parent): return FraggleTopicFrame(parent) @@ -73,6 +78,7 @@ #event.Skip() self.engine.fraggleSync() topics = self.engine.getTopics() + self.topicListBox.Clear() i = 0 for topic in topics: self.topicListBox.Append(topic['name'], i) @@ -96,8 +102,12 @@ # resolve associated topic entry topics = self.engine.getTopics() title = topics[seldata]['name'] + result = topics[seldata]['result'] - frame = FraggleTopicDetailFrame.create(self.parent) + if result == 'item': + frame = FraggleItemFrame.create(self.parent) + elif result == 'list': + frame = FraggleListFrame.create(self.parent) frame.SetName(str(seldata)) frame.SetTitle(title)