Пример #1
0
 def __init__(self, conn, suite, name='TraitDebconfBrowser'):
     self.menu = make_menu(dcmenu_cmds, self.modify_trait)
     ListNoteBook.__init__(self)
     self.conn = conn
     self.suite = suite
     self.dc = TraitDebconf(self.conn, self.suite)
     self.traits = Traits(self.conn, self.suite)
     self.reset_rows()
Пример #2
0
 def __init__(self, config):
     ListNoteBook.__init__(self)
     self.config = config
     self.set_rows(self.config.filelist.keys(), columns=['package'])
     self.set_row_select(self._package_selected)
     self.append_page(TextScroll('hello there'), 'status')
     for tab in ['conffiles', 'md5sums', 'filelist']:
         self.append_page(ScrollCList(), tab)
Пример #3
0
 def __init__(self, config):
     ListNoteBook.__init__(self)
     self.config = config
     self.set_rows(self.config.filelist.keys(), columns = ['package'])
     self.set_row_select(self._package_selected)
     self.append_page(TextScroll('hello there'), 'status')
     for tab in ['conffiles', 'md5sums', 'filelist']:
         self.append_page(ScrollCList(), tab)
Пример #4
0
 def __init__(self, conn, name='_EnvironmentEditor'):
     ListNoteBook.__init__(self, name=name)
     self.conn = conn
     self.main = StatementCursor(self.conn, name=name)
     self.append_page(RecordBox({}), 'Environment')
     self.menu = SimpleMenu()
     self.delimiters = DELIMITERS['out-arrows']
     self.dialogs = {}.fromkeys(['create', 'remove'])
Пример #5
0
 def __init__(self, conn, suite, name='TraitDebconfBrowser'):
     self.menu = make_menu(dcmenu_cmds, self.modify_trait)
     ListNoteBook.__init__(self)
     self.conn = conn
     self.suite = suite
     self.dc = TraitDebconf(self.conn, self.suite)
     self.traits = Traits(self.conn, self.suite)
     self.reset_rows()
Пример #6
0
 def __init__(self, conn, suite=None):
     self.menu = make_menu(TRAITCMDS, self.trait_command)
     ListNoteBook.__init__(self)
     self.conn = conn
     self.suite = suite
     self.reset_rows()
     for page in ['parents', 'packages', 'templates', 'scripts']:
         self.append_page(ScrollCList(), page)
Пример #7
0
 def __init__(self, conn, name='_EnvironmentEditor'):
     ListNoteBook.__init__(self, name=name)
     self.conn = conn
     self.main = StatementCursor(self.conn, name=name)
     self.append_page(RecordBox({}), 'Environment')
     self.menu = SimpleMenu()
     self.delimiters = DELIMITERS['out-arrows']
     self.dialogs = {}.fromkeys(['create', 'remove'])
Пример #8
0
 def __init__(self, conn, maintable, pkey):
     self.menu = make_menu(["insert", "update", "done"], self.pkey_command)
     ListNoteBook.__init__(self)
     self.conn = conn
     self.main = StatementCursor(self.conn)
     self.main.set_table(maintable)
     self.pkey = pkey
     self.dialogs = {}.fromkeys(["insert", "update", "delete"])
     self.relations = {}
Пример #9
0
 def __init__(self, conn, maintable, pkey):
     self.menu = make_menu(['insert', 'update', 'done'], self.pkey_command)
     ListNoteBook.__init__(self)
     self.conn = conn
     self.main = StatementCursor(self.conn)
     self.main.set_table(maintable)
     self.pkey = pkey
     self.dialogs = {}.fromkeys(['insert', 'update', 'delete'])
     self.relations = {}
Пример #10
0
 def __init__(self, conn, suite):
     self.conn = conn
     self.suite = suite
     self.traits = Traits(self.conn, self.suite)
     self.edit_menu = make_menu(SCRIPTS, self.modify_trait, name='edit')
     self.diff_menu = make_menu(SCRIPTS, self.modify_trait, name='diff')
     self.menu = make_menu(['edit', 'diff'], self.edit_menu)
     self.menu['edit'].set_submenu(self.edit_menu)
     self.menu['diff'].set_submenu(self.diff_menu)
     ListNoteBook.__init__(self)
     self.reset_rows()
Пример #11
0
 def __init__(self, conn):
     self.menu = make_menu(['delete'], self.modify_family)
     ListNoteBook.__init__(self)
     self.conn = conn
     self.family = Family(self.conn)
     self.var_menu = make_menu(['edit', 'nothing', 'nothing', 'drop'],
                               self.var_menu_selected)
     self.parent_menu = make_menu(['drop'], self.modify_parent)
     self.reset_rows()
     self.append_page(ScrollCList(rcmenu=self.var_menu), 'environment')
     self.append_page(ScrollCList(rcmenu=self.parent_menu), 'parents')
     self.set_size_request(400, 300)
Пример #12
0
 def __init__(self, conn, suites, name='ProfileBrowser'):
     self.menu = self.__make_mainmenu_(suites)
     ListNoteBook.__init__(self, name=name)
     self.conn = conn
     self.profiles = Profiles(self.conn)
     self.profiletrait = ProfileTrait(self.conn)
     self.trait_menu = make_menu(['drop', 'order'], self.trait_command)
     self.pdata_menu = make_menu(['edit', 'drop'], self.variable_command)
     self.reset_rows()
     self.append_page(ScrollCList(rcmenu=self.trait_menu), 'traits')
     self.append_page(ScrollCList(rcmenu=self.pdata_menu), 'variables')
     self.dialogs = {}.fromkeys(['order'])
Пример #13
0
 def __init__(self, dbhost, dbuser, passwd=None):
     self.menu = make_menu(["connect", "disconnect"], self.db_command)
     ListNoteBook.__init__(self)
     self.conn = BaseConnection(user=dbuser, host=dbhost, dbname="template1", passwd=passwd)
     self.dialogs = {}.fromkeys(["database"])
     self.dbname = "template1"
     self.reset_rows()
     self.connections = {}
     self._dbuser = dbuser
     self._dbhost = dbhost
     self._dbpasswd = passwd
     self.table_edit_menu = make_menu(["edit"], self.table_edit_menu_command)
Пример #14
0
 def __init__(self, conn, suites, name='ProfileBrowser'):
     self.menu = self.__make_mainmenu_(suites)
     ListNoteBook.__init__(self, name=name)
     self.conn = conn
     self.profiles = Profiles(self.conn)
     self.profiletrait = ProfileTrait(self.conn)
     self.trait_menu = make_menu(['drop', 'order'], self.trait_command)
     self.pdata_menu = make_menu(['edit', 'drop'], self.variable_command)
     self.reset_rows()
     self.append_page(ScrollCList(rcmenu=self.trait_menu), 'traits')
     self.append_page(ScrollCList(rcmenu=self.pdata_menu), 'variables')
     self.dialogs = {}.fromkeys(['order'])
Пример #15
0
 def __init__(self, conn):
     self.menu = make_menu(['delete'], self.modify_family)
     ListNoteBook.__init__(self)
     self.conn = conn
     self.family = Family(self.conn)
     self.var_menu = make_menu(['edit', 'nothing', 'nothing', 'drop'],
                           self.var_menu_selected)
     self.parent_menu = make_menu(['drop'], self.modify_parent)
     self.reset_rows()
     self.append_page(ScrollCList(rcmenu=self.var_menu), 'environment')
     self.append_page(ScrollCList(rcmenu=self.parent_menu), 'parents')
     self.set_size_request(400, 300)
Пример #16
0
 def __init__(self, conn, name='RepositoryBrowser'):
     self.menu = self.__make_mainmenu_()
     ListNoteBook.__init__(self, name=name)
     self._targets_ = [repos_target]
     self._dnd = self.drag_rows
     self.set_usize(300, 200)
     self.conn = conn
     self.current = None
     self.repos = RepositoryManager(self.conn)
     self.sources_menu = make_menu(['update release'], self.sources_command)
     self.reset_rows()
     self.dialogs = {}.fromkeys(['downloads'])
Пример #17
0
 def __init__(self, dbhost, dbuser, passwd=None):
     self.menu = make_menu(['connect', 'disconnect'], self.db_command)
     ListNoteBook.__init__(self)
     self.conn = BaseConnection(user=dbuser, host=dbhost,
                                dbname='template1', passwd=passwd)
     self.dialogs = {}.fromkeys(['database'])
     self.dbname = 'template1'
     self.reset_rows()
     self.connections = {}
     self._dbuser = dbuser
     self._dbhost = dbhost
     self._dbpasswd = passwd
     self.table_edit_menu = make_menu(['edit'], self.table_edit_menu_command)
Пример #18
0
 def __init__(self, conn, suite):
     self.menu = make_menu(_MODTRAIT, self.modify_trait)
     ListNoteBook.__init__(self)
     self.conn = conn
     self.traits = Traits(self.conn, suite)
     self.trait_selection = '_all_traits_'
     self.reset_rows()
     self.cfg = PaellaConfig()
     self._parents = TraitParent(self.conn, suite)
     self.cursor = StatementCursor(self.conn)
     self.template_path = '/nowhere'
     self.tarball_path = self.cfg.get('management_gui', 'bkuptarball_path')
     self.suite = suite
Пример #19
0
 def __init__(self, conn, suite):
     self.menu = make_menu(_MODTRAIT, self.modify_trait)
     ListNoteBook.__init__(self)
     self.conn = conn
     self.traits = Traits(self.conn, suite)
     self.trait_selection = '_all_traits_'
     self.reset_rows()
     self.cfg = PaellaConfig()
     self._parents = TraitParent(self.conn, suite)
     self.cursor = StatementCursor(self.conn)
     self.template_path = '/nowhere'
     self.tarball_path = self.cfg.get('management_gui', 'bkuptarball_path')
     self.suite = suite
Пример #20
0
 def __init__(self, conn, suite):
     self.menu = make_menu(['delete'], self.modify_trait)
     ListNoteBook.__init__(self)
     self.conn = conn
     self.suite = suite
     self.trait = Trait(self.conn, self.suite)
     self.package_menu = make_menu(['install', 'remove', 'purge', 'drop'],
                           self.set_package)
     self.parent_menu = make_menu(['drop'], self.modify_parent)
     self.reset_rows()
     self.append_page(ScrollCList(rcmenu=self.package_menu), 'packages')
     self.append_page(ScrollCList(rcmenu=self.parent_menu), 'parents')
     self.set_size_request(400, 300)
Пример #21
0
 def __init__(self, conn, maintable, reltable, pkey, fields):
     self.menu = make_menu(["insert", "update", "done"], self.pkey_command)
     ListNoteBook.__init__(self)
     self.conn = conn
     self.main = StatementCursor(self.conn)
     self.main.set_table(maintable)
     self.rel = StatementCursor(self.conn)
     self.rel.set_table(reltable)
     self.pkey = pkey
     self._fields = fields
     self.fields = [self.pkey] + self._fields
     self.reset_rows()
     self.dialogs = {}.fromkeys(["insert", "update", "delete"])
     self.relmenu = make_menu(["insert", "update", "delete"], self.relmenu_command)
Пример #22
0
 def __init__(self, conn, suite, trait):
     self.conn = conn
     self.suite = suite
     self.trait = trait
     self.cursor = StatementCursor(self.conn)
     self.cursor.set_table('%s_scripts' % self.suite)
     self.edit_menu = make_menu(SCRIPTS, self.modify_trait, name='edit')
     self.diff_menu = make_menu(SCRIPTS, self.modify_trait, name='diff')
     self.menu = make_menu(['edit', 'diff'], self.modify_trait)
     self.menu['edit'].set_submenu(self.edit_menu)
     self.menu['diff'].set_submenu(self.diff_menu)
     self.menu.set_name('main')
     ListNoteBook.__init__(self)
     self.reset_rows()
Пример #23
0
 def __init__(self, conn, maintable, reltable, pkey, fields):
     self.menu = make_menu(['insert', 'update', 'done'], self.pkey_command)
     ListNoteBook.__init__(self)
     self.conn = conn
     self.main = StatementCursor(self.conn)
     self.main.set_table(maintable)
     self.rel = StatementCursor(self.conn)
     self.rel.set_table(reltable)
     self.pkey = pkey
     self._fields = fields
     self.fields = [self.pkey] + self._fields
     self.reset_rows()
     self.dialogs = {}.fromkeys(['insert', 'update', 'delete'])
     self.relmenu = make_menu(['insert', 'update', 'delete'],
                              self.relmenu_command)
Пример #24
0
 def __init__(self, dbhost, dbuser, passwd=None):
     self.menu = make_menu(['connect', 'disconnect'], self.db_command)
     ListNoteBook.__init__(self)
     self.conn = BaseConnection(user=dbuser,
                                host=dbhost,
                                dbname='template1',
                                passwd=passwd)
     self.dialogs = {}.fromkeys(['database'])
     self.dbname = 'template1'
     self.reset_rows()
     self.connections = {}
     self._dbuser = dbuser
     self._dbhost = dbhost
     self._dbpasswd = passwd
     self.table_edit_menu = make_menu(['edit'],
                                      self.table_edit_menu_command)
Пример #25
0
 def __init__(self, conn, suite, trait):
     self.menu = make_menu(TEMPL_CMDS, self.template_command)
     self.conn = conn
     self.current_trait = trait
     self.traittemplate = TraitTemplate(self.conn, suite)
     self.traittemplate.set_trait(self.current_trait)
     self.traitpackage = TraitPackage(self.conn, suite)
     self.traitpackage.set_trait(self.current_trait)
     self.current_template = None
     self.cfg = PaellaConfig()
     self.template_path = '/nowhere'
     self._tmp_path = '/nowhere'
     self.tarball_path = self.cfg.get('management_gui', 'bkuptarball_path')
     ListNoteBook.__init__(self)
     self.set_suite(suite)
     self.extracted = None
     self.reset_rows()
     self.dialogs = {}.fromkeys(['attach', 'rootsel'])
Пример #26
0
 def __init__(self, conn, suite, trait):
     self.menu = make_menu(TEMPL_CMDS, self.template_command)
     self.conn = conn
     self.current_trait = trait
     self.traittemplate = TraitTemplate(self.conn, suite)
     self.traittemplate.set_trait(self.current_trait)
     self.traitpackage = TraitPackage(self.conn, suite)
     self.traitpackage.set_trait(self.current_trait)
     self.current_template = None
     self.cfg = PaellaConfig()
     self.template_path = '/nowhere'
     self._tmp_path = '/nowhere'
     self.tarball_path = self.cfg.get('management_gui', 'bkuptarball_path')
     ListNoteBook.__init__(self)
     self.set_suite(suite)
     self.extracted = None
     self.reset_rows()
     self.dialogs = {}.fromkeys(['attach', 'rootsel'])
Пример #27
0
 def __init__(self, rgb):
     ListNoteBook.__init__(self)
     self.rgb = rgb
     self.rgb.set_plain(1)
     self._style = Style(self.rgb)
     self.set_rows(rgb.keys(), ['color'])
     self._elements = {}
     for element in style_elements:
         #color_names = [c.name for c in self._style.elements[element]
         name_dict = dict([
             (k, v.name) for k, v in self._style.elements[element].items()
         ])
         container = ItemButtonBox(name_dict, name=element)
         self.append_page(container, element)
         self._elements[element] = container
         for button in container.vdict.values():
             button.connect('drag_data_received', self.drop_color)
             button.drag_dest_set(
                 DEST_DEFAULT_MOTION | DEST_DEFAULT_HIGHLIGHT
                 | DEST_DEFAULT_DROP, [color_target], ACTION_COPY)
     self.listbox.connect('drag_data_get', self.drag_color)
     self.listbox.drag_source_set(BUTTON1_MASK, [color_target], ACTION_COPY)
Пример #28
0
 def __init__(self, rgb):
     ListNoteBook.__init__(self)
     self.rgb = rgb
     self.rgb.set_plain(1)
     self._style = Style(self.rgb)
     self.set_rows(rgb.keys(), ['color'])
     self._elements = {}
     for element in style_elements:
         #color_names = [c.name for c in self._style.elements[element]
         name_dict = dict([(k,v.name) for k,v in self._style.elements[element].items()])
         container = ItemButtonBox(name_dict, name=element)
         self.append_page(container, element)
         self._elements[element] = container
         for button in container.vdict.values():
             button.connect('drag_data_received', self.drop_color)
             button.drag_dest_set(DEST_DEFAULT_MOTION |
                                     DEST_DEFAULT_HIGHLIGHT |
                                     DEST_DEFAULT_DROP,
                                     [color_target], ACTION_COPY)
     self.listbox.connect('drag_data_get', self.drag_color)
     self.listbox.drag_source_set(BUTTON1_MASK, [color_target],
                                  ACTION_COPY)
Пример #29
0
 def __init__(self, cfg):
     ListNoteBook.__init__(self)
     self.cfg = cfg
     #self.menu = make_menu
     self.reset_rows()
Пример #30
0
 def __init__(self, name='_DebconfEditor'):
     ListNoteBook.__init__(self)
     self.set_name(name)
     self._debconf = {}
     self.reset_rows()
     self.append_page(TextScroll(''), 'data')
Пример #31
0
 def __init__(self, name='_DebconfEditor'):
     ListNoteBook.__init__(self)
     self.set_name(name)
     self._debconf = {}
     self.reset_rows()
     self.append_page(TextScroll(''), 'data')
Пример #32
0
 def __init__(self, cfg):
     ListNoteBook.__init__(self)
     self.cfg = cfg
     #self.menu = make_menu
     self.reset_rows()