def OnBtnEditProfileButton(self, event): profile = self._configs[self.currentItemIndex] profileDialog = ProfileDialog(self) profileDialog.set_Profile(profile) profileDialog.Centre() if profileDialog.ShowModal() == wx.ID_OK : self.saveProfile(profile)
def OnBtnCopyProfileButton(self, event): copyProfile = copy.deepcopy(self._configs[self.currentItemIndex]) name = copyProfile.get_TaskbarName() copyProfile.set_TaskbarName("Copy of " + name) profileDialog = ProfileDialog(self) profileDialog.set_Profile(copyProfile) profileDialog.Centre() if profileDialog.ShowModal() == wx.ID_OK : self.addProfile(copyProfile)
def OnNewProfile(self, event): # create profile dialog newDiag = ProfileDialog(self) # set profile newDiag.set_Profile(None) newDiag.Centre() result = newDiag.ShowModal() if result == wx.ID_OK : # add the profile to the list self.addProfile(newDiag.get_Profile())