11 |
|
|
12 |
|
|
13 |
[wxID_FRAGGLEDIALOGPREFS, wxID_FRAGGLEDIALOGPREFSBTSAVE, |
[wxID_FRAGGLEDIALOGPREFS, wxID_FRAGGLEDIALOGPREFSBTSAVE, |
14 |
wxID_FRAGGLEDIALOGPREFSBUTTON1, wxID_FRAGGLEDIALOGPREFSBUTTONMODULES, |
wxID_FRAGGLEDIALOGPREFSBUTTON1, wxID_FRAGGLEDIALOGPREFSBUTTONPROFILEDEL, |
|
wxID_FRAGGLEDIALOGPREFSBUTTONPROFILEDEL, |
|
15 |
wxID_FRAGGLEDIALOGPREFSBUTTONPROFILELOAD, |
wxID_FRAGGLEDIALOGPREFSBUTTONPROFILELOAD, |
16 |
wxID_FRAGGLEDIALOGPREFSBUTTONPROFILESAVE, wxID_FRAGGLEDIALOGPREFSBUTTONTEST, |
wxID_FRAGGLEDIALOGPREFSBUTTONPROFILESAVE, wxID_FRAGGLEDIALOGPREFSBUTTONTEST, |
17 |
wxID_FRAGGLEDIALOGPREFSCOMBOBOXPROFILE, wxID_FRAGGLEDIALOGPREFSSTATICTEXT1, |
wxID_FRAGGLEDIALOGPREFSCOMBOBOXPROFILE, wxID_FRAGGLEDIALOGPREFSSTATICTEXT1, |
21 |
wxID_FRAGGLEDIALOGPREFSTEXTCTRLRETRIEVAL, |
wxID_FRAGGLEDIALOGPREFSTEXTCTRLRETRIEVAL, |
22 |
wxID_FRAGGLEDIALOGPREFSTEXTCTRLSERVER, |
wxID_FRAGGLEDIALOGPREFSTEXTCTRLSERVER, |
23 |
wxID_FRAGGLEDIALOGPREFSTEXTCTRLUSERNAME, |
wxID_FRAGGLEDIALOGPREFSTEXTCTRLUSERNAME, |
24 |
] = map(lambda _init_ctrls: wxNewId(), range(19)) |
] = map(lambda _init_ctrls: wxNewId(), range(18)) |
25 |
|
|
26 |
class fraggleDialogPrefs(wxDialog): |
class fraggleDialogPrefs(wxDialog): |
27 |
def _init_ctrls(self, prnt): |
def _init_ctrls(self, prnt): |
28 |
# generated method, don't edit |
# generated method, don't edit |
29 |
wxDialog.__init__(self, id=wxID_FRAGGLEDIALOGPREFS, |
wxDialog.__init__(self, id=wxID_FRAGGLEDIALOGPREFS, |
30 |
name='fraggleDialogPrefs', parent=prnt, pos=wxPoint(482, 310), |
name='fraggleDialogPrefs', parent=prnt, pos=wxPoint(482, 310), |
31 |
size=wxSize(374, 260), style=wxDEFAULT_DIALOG_STYLE, |
size=wxSize(366, 233), style=wxDEFAULT_DIALOG_STYLE, |
32 |
title='Netfraggle Preferences') |
title='Netfraggle Preferences') |
33 |
|
self._init_utils() |
34 |
self.SetClientSize(wxSize(366, 233)) |
self.SetClientSize(wxSize(366, 233)) |
35 |
|
|
36 |
self.btsave = wxButton(id=wxID_FRAGGLEDIALOGPREFSBTSAVE, |
self.btsave = wxButton(id=wxID_FRAGGLEDIALOGPREFSBTSAVE, |
122 |
EVT_BUTTON(self.buttonTest, wxID_FRAGGLEDIALOGPREFSBUTTONTEST, |
EVT_BUTTON(self.buttonTest, wxID_FRAGGLEDIALOGPREFSBUTTONTEST, |
123 |
self.OnButtonTestButton) |
self.OnButtonTestButton) |
124 |
|
|
|
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) |
|
|
|
|
125 |
def __init_profiles(self): |
def __init_profiles(self): |
126 |
list = self.parent.preferencesCtl.getProfileList() |
list = self.parent.preferencesCtl.getProfileList() |
127 |
print list |
print list |
128 |
for i in list: |
for i in list: |
129 |
self.comboBoxProfile.Append(i) |
self.comboBoxProfile.Append(i) |
130 |
|
|
131 |
|
def _init_utils(self): |
132 |
|
# generated method, don't edit |
133 |
|
pass |
134 |
|
|
135 |
def __init__(self, parent): |
def __init__(self, parent): |
136 |
self.parent = parent |
self.parent = parent |
137 |
import __main__ |
import __main__ |
138 |
self.engine = __main__.engine |
self.engine = __main__.engine |
139 |
self._init_ctrls(parent) |
self._init_ctrls(parent) |
|
self.dialogModules = FraggleDialogModules.create(self) |
|
140 |
self.__init_profiles() |
self.__init_profiles() |
141 |
|
|
142 |
def OnBtsaveButton(self, event): |
def OnBtsaveButton(self, event): |
213 |
wxMessageBox("Authentication failed!") |
wxMessageBox("Authentication failed!") |
214 |
|
|
215 |
def OnButtonModulesButton(self, event): |
def OnButtonModulesButton(self, event): |
216 |
self.dialogModules.Show() |
#self.dialogModules.Show() |
217 |
#self.parent.dialogModules.Hide() |
#self.parent.dialogModules.Hide() |
218 |
event.Skip() |
event.Skip() |