--- nfo/projects/netfraggle/bin/fraggleDialogPrefs.py 2004/08/31 16:47:03 1.10 +++ nfo/projects/netfraggle/bin/fraggleDialogPrefs.py 2004/09/04 20:26:01 1.13 @@ -3,13 +3,16 @@ from wxPython.wx import * from fraggleEngine import * +import FraggleDialogModules + def create(parent): return fraggleDialogPrefs(parent) [wxID_FRAGGLEDIALOGPREFS, wxID_FRAGGLEDIALOGPREFSBTSAVE, - wxID_FRAGGLEDIALOGPREFSBUTTON1, wxID_FRAGGLEDIALOGPREFSBUTTONPROFILEDEL, + wxID_FRAGGLEDIALOGPREFSBUTTON1, wxID_FRAGGLEDIALOGPREFSBUTTONMODULES, + wxID_FRAGGLEDIALOGPREFSBUTTONPROFILEDEL, wxID_FRAGGLEDIALOGPREFSBUTTONPROFILELOAD, wxID_FRAGGLEDIALOGPREFSBUTTONPROFILESAVE, wxID_FRAGGLEDIALOGPREFSBUTTONTEST, wxID_FRAGGLEDIALOGPREFSCOMBOBOXPROFILE, wxID_FRAGGLEDIALOGPREFSSTATICTEXT1, @@ -19,13 +22,13 @@ wxID_FRAGGLEDIALOGPREFSTEXTCTRLRETRIEVAL, wxID_FRAGGLEDIALOGPREFSTEXTCTRLSERVER, wxID_FRAGGLEDIALOGPREFSTEXTCTRLUSERNAME, -] = map(lambda _init_ctrls: wxNewId(), range(18)) +] = map(lambda _init_ctrls: wxNewId(), range(19)) class fraggleDialogPrefs(wxDialog): def _init_ctrls(self, prnt): # generated method, don't edit wxDialog.__init__(self, id=wxID_FRAGGLEDIALOGPREFS, - name='fraggleDialogPrefs', parent=prnt, pos=wxPoint(283, 313), + name='fraggleDialogPrefs', parent=prnt, pos=wxPoint(482, 310), size=wxSize(374, 260), style=wxDEFAULT_DIALOG_STYLE, title='Netfraggle Preferences') self.SetClientSize(wxSize(366, 233)) @@ -119,6 +122,12 @@ EVT_BUTTON(self.buttonTest, wxID_FRAGGLEDIALOGPREFSBUTTONTEST, self.OnButtonTestButton) + self.buttonModules = wxButton(id=wxID_FRAGGLEDIALOGPREFSBUTTONMODULES, + label='Modules', name='buttonModules', parent=self, + pos=wxPoint(264, 184), size=wxSize(96, 16), style=0) + EVT_BUTTON(self.buttonModules, wxID_FRAGGLEDIALOGPREFSBUTTONMODULES, + self.OnButtonModulesButton) + def __init_profiles(self): list = self.parent.preferencesCtl.getProfileList() print list @@ -130,6 +139,7 @@ import __main__ self.engine = __main__.engine self._init_ctrls(parent) + self.dialogModules = FraggleDialogModules.create(self) self.__init_profiles() def OnBtsaveButton(self, event): @@ -150,7 +160,7 @@ event.Skip() def loadConfig(self): - prefsfile = os.path.join(self.parent.preferencesCtl.getDefaultDir(), 'prefs.xml') + prefsfile = os.path.join(self.parent.engine.getDefaultDir(), 'prefs.xml') self.parent.preferencesCtl.loadConfig(prefsfile) def updateConfig(self): @@ -204,3 +214,8 @@ wxMessageBox("Authentication successful!") else: wxMessageBox("Authentication failed!") + + def OnButtonModulesButton(self, event): + self.dialogModules.Show() + #self.parent.dialogModules.Hide() + event.Skip()