def _createNonHeaderWidgets(self): self.profileJoeyPathLabel = wx.StaticText( self, wx.ID_ANY, _extstr(u"importprofile.OldProfilePath:")) #$NON-NLS-1$ self.profileJoeyPathCtrl = ZValidatingFileChooserCtrl( ZProfileJoeyPathValidator(), self, ZFCC_DIRECTORY_TYPE, _extstr(u"importprofile.ChoosePathDialogTitle")) #$NON-NLS-1$ self.profileJoeyPathCtrl.SetToolTipString( _extstr(u"importprofile.EnterZBW1XPathTooltip")) #$NON-NLS-1$ ZNewProfileDialog._createNonHeaderWidgets(self)
def onAddProfile(self, event): try: dialog = ZNewProfileDialog(self, self.model) if self.model.getNumProfiles() == 0: defaultPath = self._createDefaultProfilePath() dialog.setProfilePath(defaultPath) dialog.setProfileName(_extstr(u"manager.MyProfile")) #$NON-NLS-1$ dialog.CentreOnParent() if dialog.ShowModal() == wx.ID_OK: profileInfo = dialog.getProfileInfo() self.model.createProfile(profileInfo) self.profilesListView.refresh() self.profilesListView.Select(self._getProfileIndex(profileInfo[0]), True) dialog.Destroy() except Exception, e: ZShowExceptionMessage(self, e)
def _bindWidgetEvents(self): ZNewProfileDialog._bindWidgetEvents(self) self._bindValidatingWidget(self.profileJoeyPathCtrl)
def __init__(self, parent, profilesModel): ZNewProfileDialog.__init__(self, parent, profilesModel)
def __init__(self, parent, profilesModel): ZNewProfileDialog.__init__(self, parent, profilesModel)
def _bindWidgetEvents(self): ZNewProfileDialog._bindWidgetEvents(self) self._bindValidatingWidget(self.profileJoeyPathCtrl)
def _createNonHeaderWidgets(self): self.profileJoeyPathLabel = wx.StaticText(self, wx.ID_ANY, _extstr(u"importprofile.OldProfilePath:")) #$NON-NLS-1$ self.profileJoeyPathCtrl = ZValidatingFileChooserCtrl(ZProfileJoeyPathValidator(), self, ZFCC_DIRECTORY_TYPE, _extstr(u"importprofile.ChoosePathDialogTitle")) #$NON-NLS-1$ self.profileJoeyPathCtrl.SetToolTipString(_extstr(u"importprofile.EnterZBW1XPathTooltip")); #$NON-NLS-1$ ZNewProfileDialog._createNonHeaderWidgets(self)