Ejemplo n.º 1
0
    def load_treeviewInterfaces(self):

        try:
            store = self.ui.treeviewInterfaces.get_model()
            store.clear()

            ifs = localifs()

            for _if in ifs:
                store.append([_if[0], _if[1]])

            self.ui.treeviewInterfaces.set_model(store)

        except AttributeError as e:
            pass
Ejemplo n.º 2
0
    def load_treeviewInterfaces(self):

        try:
            store = self.ui.treeviewInterfaces.get_model()
            store.clear()

            ifs = localifs()

            for _if in ifs:
                store.append([_if[0], _if[1]])

            self.ui.treeviewInterfaces.set_model(store)

        except AttributeError as e:
            pass
Ejemplo n.º 3
0
    def load_treeviewInterfaces(self):

        n_ifaces = 0

        try:
            store = self.ui.treeviewInterfaces.get_model()
            store.clear()

            ifs = localifs()

            for _if in ifs:
                store.append([_if[0], _if[1]])
                if _if[0] != 'lo' and len(_if[1]) > 0:
                    n_ifaces += 1

            self.emit('link-status', n_ifaces > 0)
            self.emit('status-changed', 'network', bool(n_ifaces > 0))
            self.ui.treeviewInterfaces.set_model(store)

        except AttributeError as e:
            pass

        return self.timer_ret