/[cvs]/nfo/projects/netfraggle/bin/FraggleTopicFrame.py
ViewVC logotype

Diff of /nfo/projects/netfraggle/bin/FraggleTopicFrame.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.3 by joko, Fri Aug 27 04:47:35 2004 UTC revision 1.5 by joko, Mon Aug 30 13:06:16 2004 UTC
# Line 2  Line 2 
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
# Line 18  from wxPython.stc import * Line 26  from wxPython.stc import *
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,
# Line 29  class FraggleTopicFrame(wxMDIChildFrame) Line 37  class FraggleTopicFrame(wxMDIChildFrame)
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,
# Line 46  class FraggleTopicFrame(wxMDIChildFrame) Line 55  class FraggleTopicFrame(wxMDIChildFrame)
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:
# Line 91  class FraggleTopicFrame(wxMDIChildFrame) Line 106  class FraggleTopicFrame(wxMDIChildFrame)
106          frame.Move(pos)          frame.Move(pos)
107          self.parent.Fit()          self.parent.Fit()
108                    
109            frame.load_content()
110                    
111                    

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.5

MailToCvsAdmin">MailToCvsAdmin
ViewVC Help
Powered by ViewVC 1.1.26 RSS 2.0 feed