Exemple #1
0
    def __init__(self):
        StandardWindow.__init__(self, "efl-dbus-spy",
                                "EFL DBus Spy - Espionage")

        self.autodel_set(True)
        self.callback_delete_request_add(lambda o: elm.exit())

        bg = Background(self)
        self.resize_object_add(bg)
        bg.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
        bg.show()

        box = Box(self)
        self.resize_object_add(box)
        box.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
        box.show()

        flip = FlipSelector(self)
        flip.item_append("Session Bus", self.flip_selected_cb, session_bus)
        flip.item_append("System Bus", self.flip_selected_cb, system_bus)
        box.pack_end(flip)
        flip.show()

        panes = Panes(self)
        panes.size_hint_weight = (evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
        panes.size_hint_align = (evas.EVAS_HINT_FILL, evas.EVAS_HINT_FILL)
        # panes.content_left_size = 0.333
        # panes.fixed = True
        box.pack_end(panes)
        panes.show()

        self.names_list = NamesList(self)
        panes.part_content_set("left", self.names_list)
        self.names_list.show()

        self.detail_list = DetailList(self)
        panes.part_content_set("right", self.detail_list)
        self.detail_list.show()

        self.resize(700, 500)
        self.show()
    def __init__(self):
        StandardWindow.__init__(self, "efl-dbus-spy", "EFL DBus Spy - Espionage")

        self.autodel_set(True)
        self.callback_delete_request_add(lambda o: elm.exit())

        bg = Background(self)
        self.resize_object_add(bg)
        bg.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
        bg.show()

        box = Box(self)
        self.resize_object_add(box)
        box.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
        box.show()
        
        flip = FlipSelector(self)
        flip.item_append("Session Bus", self.flip_selected_cb, session_bus)
        flip.item_append("System Bus", self.flip_selected_cb, system_bus)
        box.pack_end(flip)
        flip.show()
        
        panes = Panes(self)
        panes.size_hint_weight = (evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
        panes.size_hint_align = (evas.EVAS_HINT_FILL, evas.EVAS_HINT_FILL)
        # panes.content_left_size = 0.333
        # panes.fixed = True
        box.pack_end(panes)
        panes.show()

        self.names_list = NamesList(self)
        panes.part_content_set("left", self.names_list)
        self.names_list.show()

        self.detail_list = DetailList(self)
        panes.part_content_set("right", self.detail_list)
        self.detail_list.show()

        self.resize(700, 500)
        self.show()
    def __init__(self):
        StandardWindow.__init__(self, "espionage", "EFL DBus Spy - Espionage")

        self.autodel_set(True)
        self.callback_delete_request_add(lambda o: elm.exit())

        box = Box(self)
        self.resize_object_add(box)
        box.size_hint_weight = EVAS_HINT_EXPAND, EVAS_HINT_EXPAND
        box.show()

        tb = Table(self)
        box.pack_end(tb)
        tb.show()

        lb = Label(self, text="Connect to:", scale=1.3)
        tb.pack(lb, 0, 0, 1, 2)
        lb.show()

        flip = FlipSelector(self, scale=1.3)
        flip.item_append("Session Bus", self.flip_selected_cb, session_bus)
        flip.item_append("System Bus", self.flip_selected_cb, system_bus)
        tb.pack(flip, 1, 0, 1, 2)
        flip.show()

        chk = Check(self, text="Show private services")
        chk.size_hint_align = 0.0, 1.0
        chk.state = options.show_private_stuff
        chk.callback_changed_add(self.show_private_cb)
        tb.pack(chk, 2, 0, 1, 1)
        chk.show()

        chk = Check(self, text="Show DBus introspectables")
        chk.size_hint_align = 0.0, 0.0
        chk.state = options.show_introspect_stuff
        chk.callback_changed_add(self.show_introspectables_cb)
        tb.pack(chk, 2, 1, 1, 1)
        chk.show()

        vpanes = Panes(self, horizontal=True)
        vpanes.size_hint_weight = EVAS_HINT_EXPAND, EVAS_HINT_EXPAND
        vpanes.size_hint_align = EVAS_HINT_FILL, EVAS_HINT_FILL
        vpanes.content_left_size = 2.0 / 3
        box.pack_end(vpanes)
        vpanes.show()

        hpanes = Panes(self)
        hpanes.size_hint_weight = EVAS_HINT_EXPAND, EVAS_HINT_EXPAND
        hpanes.size_hint_align = EVAS_HINT_FILL, EVAS_HINT_FILL
        hpanes.content_left_size = 1.0 / 3
        vpanes.part_content_set("left", hpanes)
        self.panes = hpanes
        hpanes.show()

        self.names_list = NamesList(self)
        hpanes.part_content_set("left", self.names_list)

        self.detail_list = DetailList(self)
        hpanes.part_content_set("right", self.detail_list)

        self.sigs_receiver = SignalReceiver(self)
        vpanes.part_content_set("right", self.sigs_receiver)

        self.resize(700, 500)
        self.show()