| 2 |
|
|
| 3 |
# $Id$ |
# $Id$ |
| 4 |
# $Log$ |
# $Log$ |
| 5 |
|
# Revision 1.5 2004/08/30 13:06:16 joko |
| 6 |
|
# U now gets config via self.engine |
| 7 |
|
# |
| 8 |
|
# Revision 1.4 2004/08/27 21:14:02 xabbu |
| 9 |
|
# TopicDetails can now be closed. |
| 10 |
|
# GUI change on Preferences Dialog in order to prepare multiple server profiles. |
| 11 |
|
# Small bugfixes to get the new topic windows working on posix platform. |
| 12 |
|
# |
| 13 |
# Revision 1.3 2004/08/27 04:47:35 joko |
# Revision 1.3 2004/08/27 04:47:35 joko |
| 14 |
# instance of FraggleEngine now available in self.engine |
# instance of FraggleEngine now available in self.engine |
| 15 |
# added event handler "OnTopicListBoxListboxDclick" and logic to open "FraggleTopicDetailFrame"s |
# added event handler "OnTopicListBoxListboxDclick" and logic to open "FraggleTopicDetailFrame"s |
| 26 |
|
|
| 27 |
import FraggleTopicDetailFrame |
import FraggleTopicDetailFrame |
| 28 |
|
|
| 29 |
def create(parent, config): |
def create(parent): |
| 30 |
return FraggleTopicFrame(parent, config) |
return FraggleTopicFrame(parent) |
| 31 |
|
|
| 32 |
[wxID_FRAGGLETOPICFRAME, wxID_FRAGGLETOPICFRAMETOPICLISTBOX, |
[wxID_FRAGGLETOPICFRAME, wxID_FRAGGLETOPICFRAMETOPICLISTBOX, |
| 33 |
wxID_FRAGGLETOPICFRAMEUPDATEBUTTON, |
wxID_FRAGGLETOPICFRAMEUPDATEBUTTON, |
| 37 |
def _init_ctrls(self, prnt): |
def _init_ctrls(self, prnt): |
| 38 |
# generated method, don't edit |
# generated method, don't edit |
| 39 |
wxMDIChildFrame.__init__(self, id=wxID_FRAGGLETOPICFRAME, name='', |
wxMDIChildFrame.__init__(self, id=wxID_FRAGGLETOPICFRAME, name='', |
| 40 |
parent=prnt, pos=wxPoint(352, 280), size=wxSize(177, 219), |
parent=prnt, pos=wxPoint(494, 328), size=wxSize(169, 192), |
| 41 |
style=wxSIMPLE_BORDER | wxDEFAULT_FRAME_STYLE, title='Topics') |
style=wxSIMPLE_BORDER | wxDEFAULT_FRAME_STYLE, title='Topics') |
| 42 |
|
self._init_utils() |
| 43 |
self.SetClientSize(wxSize(169, 192)) |
self.SetClientSize(wxSize(169, 192)) |
| 44 |
|
|
| 45 |
self.updateButton = wxButton(id=wxID_FRAGGLETOPICFRAMEUPDATEBUTTON, |
self.updateButton = wxButton(id=wxID_FRAGGLETOPICFRAMEUPDATEBUTTON, |
| 55 |
wxID_FRAGGLETOPICFRAMETOPICLISTBOX, |
wxID_FRAGGLETOPICFRAMETOPICLISTBOX, |
| 56 |
self.OnTopicListBoxListboxDclick) |
self.OnTopicListBoxListboxDclick) |
| 57 |
|
|
| 58 |
def __init__(self, parent, config): |
def _init_utils(self): |
| 59 |
|
# generated method, don't edit |
| 60 |
|
pass |
| 61 |
|
|
| 62 |
|
def __init__(self, parent): |
| 63 |
self.parent = parent |
self.parent = parent |
| 64 |
self.config = config |
|
| 65 |
|
# render widgets |
| 66 |
self._init_ctrls(parent) |
self._init_ctrls(parent) |
| 67 |
|
|
| 68 |
|
# get engine-instance (singleton) |
| 69 |
import __main__ |
import __main__ |
| 70 |
self.engine = __main__.engine |
self.engine = __main__.engine |
| 71 |
|
|
| 72 |
def OnUpdateButtonButton(self, event): |
def OnUpdateButtonButton(self, event): |
| 73 |
#event.Skip() |
#event.Skip() |
| 74 |
# todo: make fraggleEngine read config on its own |
self.engine.fraggleSync() |
|
self.engine.fraggleSync(self.config) |
|
| 75 |
topics = self.engine.getTopics() |
topics = self.engine.getTopics() |
| 76 |
i = 0 |
i = 0 |
| 77 |
for topic in topics: |
for topic in topics: |
| 106 |
frame.Move(pos) |
frame.Move(pos) |
| 107 |
self.parent.Fit() |
self.parent.Fit() |
| 108 |
|
|
| 109 |
|
frame.load_content() |
| 110 |
|
|
| 111 |
|
|