def newProfile(self): win = BaseRecordDialog(self, ["name"]) win.frame.text_label.setText("Name for new profile:") win.connect(win, SIGNAL("okClicked()"), self.insertNewProfile) skeleton = self.cfg.get("management_gui", "template_profile") if skeleton not in self.profile.get_profile_list(): msg = "Name for new profile: (skeleton does not exist yet.)" win.frame.text_label.setText(msg) win.setRecordData(dict(name=skeleton)) win.show() self._dialog = win
def newProfile(self): win = BaseRecordDialog(self, ['name']) win.frame.text_label.setText('Name for new profile:') win.connect(win, SIGNAL('okClicked()'), self.insertNewProfile) skeleton = self.cfg.get('management_gui', 'template_profile') if skeleton not in self.profile.get_profile_list(): msg = 'Name for new profile: (skeleton does not exist yet.)' win.frame.text_label.setText(msg) win.setRecordData(dict(name=skeleton)) win.show() self._dialog = win
def _perform_new_action(self, context, ident): if context == 'package': win = BaseRecordDialog(self, ['package', 'action']) win.connect(win, SIGNAL('okClicked()'), self.slotAddPackage) win.setRecordData(dict(action='install')) win.show() self._dialog = win elif context == 'script': win = ScriptNameDialog(self, 'trait') win.connect(win, SIGNAL('okClicked()'), self.slotMakeNewScript) win.show() self._dialog = win else: raise MethodNotImplementedError(self, 'TraitView._perform_new_action')