Exemplo n.º 1
0
        def _fork():        
            pac = self.database.get_by_name(name)
            if not pac.prop_setted:
                self.database.set_pac_properties(pac)

            self._set_pac_summary(pac)
            file_model = file_list(pac.filelist)
            file_tree.set_model(file_model)
            self._statusbar()
            main_win.window.set_cursor(None)
Exemplo n.º 2
0
    def pacs_changed(self, widget, data=None):
        sum_txt = self.gld.get_widget("summary")
        sum_buf = sum_txt.get_buffer()

        file_tree = self.gld.get_widget("files")
               
        model, t_iter = widget.get_selection().get_selected()
        name = model.get_value(t_iter, 2)

        pac = self.database.get_by_name(name)
        if not pac.prop_setted:
            self.database.set_pac_properties(pac)

        sum_buf.set_text(pac.summary)

        file_model = file_list(pac.filelist)
        file_tree.set_model(file_model)
        return
Exemplo n.º 3
0
    def _refresh_trees_and_queues(self, widget=None, pacs_queues=None):
        self.database.refresh()
        self._refresh_repos_tree()
        
        if pacs_queues:
            for pac in pacs_queues["add"]:
                if not pac.name in self.queues["add"]:
                    self.queues["add"].append(pac.name)

        self._refresh_trees()
        self.queues["add"] = []
        self.queues["remove"] = []
        if pacs_queues:
            for pac in pacs_queues["add"]:
                pac.installed = True
                pac.inst_ver = pac.version
                self.database.set_pac_properties(pac)
                continue
            for pac in pacs_queues["remove"]:
                pac.installed = False
                if pac.repo == 'foreigners':
                    del pac
                    continue
                self.database.set_pac_properties(pac)
                continue
            sum_txt = self.gld.get_widget("summary")
            file_tree = self.gld.get_widget("files")
            sum_buf = sum_txt.get_buffer()
            tree = file_tree.get_model()
            
            try:
                sum_buf.set_text(pac.summary)
                file_model = file_list(pac.filelist)
                file_tree.set_model(file_model)
            except:
                col = file_tree.get_columns()
                tree.clear()
                sum_buf.set_text('')
            
        del(pacs_queues)
	self._statusbar()