コード例 #1
0
    def __get_toolbar_pits(self):

        toolbar = gtk.Toolbar()
        toolbar.modify_bg(0, gdk.color_parse("#ffffff"))

        switch = gtk.CheckButton()
        switch.set_active(True)
        switch.show()
        item = gtk.ToolItem()
        item.set_expand(False)
        item.add(switch)
        toolbar.insert(item, -1)

        toolbar.insert(get_separador(draw=False,
            ancho=3, expand=False), -1)

        item = gtk.ToolItem()
        label = gtk.Label("pits")
        label.show()
        item.add(label)
        toolbar.insert(item, -1)

        switch.connect('button-press-event', self.__set_pits)

        return toolbar
コード例 #2
0
    def __get_toolbar_on_off(self):
        """
        En modo 3, se puede desactivar y activar el efecto.
        switch activa y desactiva el efecto si modo == 3.
        """

        toolbar = gtk.Toolbar()

        toolbar.modify_bg(0, gdk.color_parse("#ffffff"))

        #toolbar.insert(get_separador(draw=False,
        #    ancho=0, expand=True), -1)

        item = gtk.ToolItem()
        label = gtk.Label("on:")
        label.show()
        item.add(label)
        toolbar.insert(item, -1)

        toolbar.insert(get_separador(draw=False,
            ancho=3, expand=False), -1)

        self.switch = gtk.CheckButton()
        self.switch.set_active(True)
        self.switch.show()
        item = gtk.ToolItem()
        item.set_expand(False)
        item.add(self.switch)
        toolbar.insert(item, -1)

        self.switch.connect('button-press-event', self.__set_trigger)

        return toolbar
コード例 #3
0
    def __get_toolbar_on_off(self):
        """
        En modo 3, se puede desactivar y activar el efecto.
        switch activa y desactiva el efecto si modo == 3.
        """

        toolbar = Gtk.Toolbar()

        toolbar.modify_bg(0, Gdk.color_parse("#ffffff"))

        #toolbar.insert(get_separador(draw=False,
        #    ancho=0, expand=True), -1)

        item = Gtk.ToolItem()
        label = Gtk.Label("on:")
        label.show()
        item.add(label)
        toolbar.insert(item, -1)

        toolbar.insert(get_separador(draw=False, ancho=3, expand=False), -1)

        self.switch = Gtk.Switch()
        self.switch.set_active(True)
        self.switch.show()
        item = Gtk.ToolItem()
        item.set_expand(False)
        item.add(self.switch)
        toolbar.insert(item, -1)

        self.switch.connect('button-press-event', self.__set_trigger)

        return toolbar
コード例 #4
0
    def __get_toolbar_pits(self):

        toolbar = Gtk.Toolbar()
        toolbar.modify_bg(0, Gdk.color_parse("#ffffff"))

        switch = Gtk.Switch()
        switch.set_active(True)
        switch.show()
        item = Gtk.ToolItem()
        item.set_expand(False)
        item.add(switch)
        toolbar.insert(item, -1)

        toolbar.insert(get_separador(draw=False, ancho=3, expand=False), -1)

        item = Gtk.ToolItem()
        label = Gtk.Label("pits")
        label.show()
        item.add(label)
        toolbar.insert(item, -1)

        switch.connect('button-press-event', self.__set_pits)

        return toolbar