Ejemplo n.º 1
0
 def diff_selection(self, *args):
     lrow = self.view.lbox.get_selected_data()[0]
     rrow = self.view.rbox.get_selected_data()[0]
     lfam, rfam = lrow.family, rrow.family
     lcfg = FamilyVariablesConfig(self.conn, lfam)
     rcfg = FamilyVariablesConfig(self.conn, rfam)
     lcfg.diff(rcfg)
Ejemplo n.º 2
0
 def diff_selection(self, *args):
     lrow = self.view.lbox.get_selected_data()[0]
     rrow = self.view.rbox.get_selected_data()[0]
     lfam, rfam = lrow.family, rrow.family
     lcfg = FamilyVariablesConfig(self.conn, lfam)
     rcfg = FamilyVariablesConfig(self.conn, rfam)
     lcfg.diff(rcfg)
Ejemplo n.º 3
0
 def var_menu_selected(self, menu_item, action):
     if action == 'edit':
         config = FamilyVariablesConfig(self.conn, self.current_family)
         newconfig = config.edit()
         config.update(newconfig)
         self.select_family(self.current_family)
     elif action == 'drop':
         pages = dict(self.pages)
         listbox = pages['environment'].listbox
         rows = listbox.get_selected_data()
         data = dict(family=self.current_family)
         for row in rows:
             data['trait'] = row.trait
             data['name'] = row.name
             clause = reduce(and_, [Eq(k, v) for k,v in data.items()])
             self.family.env.cursor.delete(clause=clause)
Ejemplo n.º 4
0
 def var_menu_selected(self, menu_item, action):
     if action == 'edit':
         config = FamilyVariablesConfig(self.conn, self.current_family)
         newconfig = config.edit()
         config.update(newconfig)
         self.select_family(self.current_family)
     elif action == 'drop':
         pages = dict(self.pages)
         listbox = pages['environment'].listbox
         rows = listbox.get_selected_data()
         data = dict(family=self.current_family)
         for row in rows:
             data['trait'] = row.trait
             data['name'] = row.name
             clause = reduce(and_, [Eq(k, v) for k,v in data.items()])
             self.family.env.cursor.delete(clause=clause)
Ejemplo n.º 5
0
 def getData(self):
     item = self.currentItem()
     return FamilyVariablesConfig(self.conn, item.family)