def remove_item(self, *args): d = self.dialogs['remove'] name = d.get_selected_data()[0].name environ = TraitEnvironment(self.conn, self.suite, self.current_trait) del environ[name] dialogs.Message('%s deleted' % name) self.destroy_dialog(d)
def select_trait(self, trait): self.current_trait = trait environ = TraitEnvironment(self.conn, self.suite, trait) self.environ = self.traitparent.get_environment([self.current_trait]) self.sections = dict([(k, v.keys()) for k, v in self.environ]) self.remove_page('Environment') self.record = RecordBox(environ, name=self.current_trait) self.append_page(self.record, 'Environment') self.pages['Environment'].connect('button_press_event', self.box_pressed) #self.menu.connect('populate', self.populate_menu, self.menu) self.record.connect_entries('populate-popup', self.populate_menu, self.menu)
def update_environment(self): environ = TraitEnvironment(self.conn, self.suite, self.current_trait) environ.update(self.record)
def make_new_variable(self, *args): d = self.dialogs['create'] environ = TraitEnvironment(self.conn, self.suite, self.current_trait) environ.update(dict([(d['name'], d['value'])]))