示例#1
0
 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)
示例#2
0
 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)
示例#3
0
 def update_environment(self):
     environ = TraitEnvironment(self.conn, self.suite, self.current_trait)
     environ.update(self.record)
示例#4
0
 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'])]))
示例#5
0
 def update_environment(self):
     environ = TraitEnvironment(self.conn, self.suite, self.current_trait)
     environ.update(self.record)
示例#6
0
 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'])]))