Пример #1
0
 def diff_selection(self, *args):
     lrow = self.view.lbox.get_selected_data()[0]
     rrow = self.view.rbox.get_selected_data()[0]
     lscript = TraitScript(self.conn, self.lsuite)
     rscript = TraitScript(self.conn, self.rsuite)
     lscript.set_trait(lrow.trait)
     rscript.set_trait(rrow.trait)
     ldata = lscript.scriptdata(lrow.script)
     rdata = rscript.scriptdata(rrow.script)
     differ = Differ(ldata, rdata)
     differ.diff()
     if differ.isdifferent('left', ldata):
         newdata = differ.get_data('left')
         lscript.update_scriptdata(lrow.script, newdata)
     if differ.isdifferent('right', rdata):
         newdata = differ.get_data('right')
         rscript.update_scriptdata(rrow.script, newdata)
Пример #2
0
 def __init__(self, conn, suite, trait, script):
     self.conn = conn
     self.suite = suite
     self.trait = trait
     self.script = TraitScript(self.conn, self.suite)
     self.script.set_trait(trait)
     self.current_script = script
     text = self.script.read_script(self.current_script)
     TextScroll.__init__(self, text)
Пример #3
0
 def __init__(self, conn, suite, trait):
     MyNotebook.__init__(self)
     self.conn = conn
     self.suite = suite
     self.trait = trait
     self.script = TraitScript(self.conn, self.suite)
     self.script.set_trait(trait)
     self.menu = SimpleMenu()
     for row in self.script.scripts():
         name = row.script
         sfile = self.script.scriptfile(name)
         self.append_script(name, sfile.read())
         sfile.close()
Пример #4
0
 def __init__(self, message, conn, suite, name='AllScriptsDialog'):
     dialogs.CList.__init__(self, message, name=name)
     self.script = TraitScript(conn, suite)
     rows = self.script.cmd.select()
     self.set_rows(rows)
Пример #5
0
 def set_suite(self, suite):
     self.scripts = TraitScript(self.conn, suite)
     self.templates = TraitTemplate(self.conn, suite)
     self.traits = Traits(self.conn, suite)
Пример #6
0
 def __init__(self, conn, suite, cfg):
     Installer.__init__(self, conn, cfg=cfg)
     self.traitpackage = TraitPackage(conn, suite)
     self.traittemplate = TraitTemplate(conn, suite)
     self.traitdebconf = TraitDebconf(conn, suite)
     self.traitscripts = TraitScript(conn, suite)