2 |
|
|
3 |
# $Id$ |
# $Id$ |
4 |
# $Log$ |
# $Log$ |
5 |
|
# Revision 1.8 2004/09/17 09:46:30 xabbu |
6 |
|
# U function OnUpdateButtonButton items will be added in the correct order now |
7 |
|
# |
8 |
|
# Revision 1.7 2004/09/15 22:31:27 xabbu |
9 |
|
# + in function OnUpdateButtonButton call to fraggleSync replaced with syncTopics |
10 |
|
# + topics are being recieved from the server now |
11 |
|
# |
12 |
# Revision 1.6 2004/08/31 02:25:34 joko |
# Revision 1.6 2004/08/31 02:25:34 joko |
13 |
# U removed FraggleTopicDetailFrame in favor of FraggleItemFrame and FraggleListFrame |
# U removed FraggleTopicDetailFrame in favor of FraggleItemFrame and FraggleListFrame |
14 |
# U now clearing topicListBox before updating it |
# U now clearing topicListBox before updating it |
83 |
|
|
84 |
def OnUpdateButtonButton(self, event): |
def OnUpdateButtonButton(self, event): |
85 |
#event.Skip() |
#event.Skip() |
86 |
self.engine.fraggleSync() |
self.engine.syncTopics() |
87 |
topics = self.engine.getTopics() |
topics = self.engine.getTopics() |
88 |
|
#print topics |
89 |
self.topicListBox.Clear() |
self.topicListBox.Clear() |
90 |
i = 0 |
i = 0 |
91 |
for topic in topics: |
for topic in topics: |
92 |
self.topicListBox.Append(topic['name'], i) |
self.topicListBox.Append(topics[str(i)], i) |
93 |
i = i + 1 |
i = i + 1 |
94 |
|
|
95 |
def OnTopicListBoxListboxDclick(self, event): |
def OnTopicListBoxListboxDclick(self, event): |
109 |
|
|
110 |
# resolve associated topic entry |
# resolve associated topic entry |
111 |
topics = self.engine.getTopics() |
topics = self.engine.getTopics() |
112 |
title = topics[seldata]['name'] |
title = topics[str(seldata)] |
113 |
result = topics[seldata]['result'] |
#print title |
114 |
|
print topics |
115 |
if result == 'item': |
|
116 |
frame = FraggleItemFrame.create(self.parent) |
frame = FraggleListFrame.create(self.parent) |
|
elif result == 'list': |
|
|
frame = FraggleListFrame.create(self.parent) |
|
117 |
frame.SetName(str(seldata)) |
frame.SetName(str(seldata)) |
118 |
frame.SetTitle(title) |
frame.SetTitle(title) |
119 |
|
|
122 |
frame.Move(pos) |
frame.Move(pos) |
123 |
self.parent.Fit() |
self.parent.Fit() |
124 |
|
|
125 |
frame.load_content() |
frame.load_content(topics[str(seldata)]) |
126 |
|
|
127 |
|
|