Ejemplo n.º 1
0
 def __init__(self):
     self.win = Gtk.Window()
     self.label = Gtk.Label(label="foobar!")
     self.win.add(self.label)
     BaseView.__init__(self, toplevel=self.win)
     BaseController.__init__(self, view=self)
     set_foreground(self.label, "#CC99FF")
     set_background(self.win, "#001100")
Ejemplo n.º 2
0
 def __init__(self):
     self.win = gtk.Window()
     self.label = gtk.Label("foobar!")
     self.win.add(self.label)
     BaseView.__init__(self, toplevel=self.win)
     BaseController.__init__(self, view=self)
     set_foreground(self.label, "#CC99FF")
     set_background(self.win, "#001100")
Ejemplo n.º 3
0
    def __init__(self):
        keyactions = {
            Gdk.KEY_a: self.on_ok__clicked,
            Gdk.KEY_b: self.on_cancel__clicked,
        }

        GladeDelegate.__init__(self, gladefile="news_shell.ui",
                               delete_handler=quit_if_last, keyactions=keyactions)

        # paint header and footer; they are eventboxes that hold a
        # label and buttonbox respectively
        set_background(self.header, "white")
        set_background(self.footer, "#A0A0A0")
        set_foreground(self.title, "blue")

        self.slave = ListSlave(self)
        self.attach_slave("placeholder", self.slave)
        self.slave.show()
        self.slave.focus_toplevel()  # Must be done after attach
Ejemplo n.º 4
0
    def __init__(self):
        keyactions = {
            gtk.keysyms.a: self.on_ok__clicked,
            gtk.keysyms.b: self.on_cancel__clicked,
        }

        GladeDelegate.__init__(self, gladefile="news_shell.ui",
                               delete_handler=quit_if_last, keyactions=keyactions)

        # paint header and footer; they are eventboxes that hold a
        # label and buttonbox respectively
        set_background(self.header, "white")
        set_background(self.footer, "#A0A0A0")
        set_foreground(self.title, "blue")

        self.slave = ListSlave(self)
        self.attach_slave("placeholder", self.slave)
        self.slave.show()
        self.slave.focus_toplevel()  # Must be done after attach
Ejemplo n.º 5
0
Archivo: news3.py Proyecto: fuinha/kiwi
    def __init__(self):
        Delegate.__init__(self, gladefile="news_shell.ui",
                          delete_handler=self.quit_if_last)

        # paint header and footer; they are eventboxes that hold a
        # label and buttonbox respectively
        gadgets.set_background(self.header, "white")
        gadgets.set_background(self.footer, "#A0A0A0")
        gadgets.set_foreground(self.title, "blue")

        # Create the delegate and set it up
        objectlist = ObjectList(my_columns, news)
        objectlist.connect('selection-changed', self.news_selected)
        objectlist.connect('double-click', self.double_click)
        slave = SlaveDelegate(toplevel=objectlist)

        self.attach_slave("placeholder", slave)
        slave.focus_toplevel()  # Must be done after attach

        self.slave = slave
Ejemplo n.º 6
0
    def __init__(self):
        Delegate.__init__(self,
                          gladefile="news_shell.ui",
                          delete_handler=self.quit_if_last)

        # paint header and footer; they are eventboxes that hold a
        # label and buttonbox respectively
        gadgets.set_background(self.header, "white")
        gadgets.set_background(self.footer, "#A0A0A0")
        gadgets.set_foreground(self.title, "blue")

        # Create the delegate and set it up
        objectlist = ObjectList(my_columns, news)
        objectlist.connect('selection-changed', self.news_selected)
        objectlist.connect('double-click', self.double_click)
        slave = SlaveDelegate(toplevel=objectlist)

        self.attach_slave("placeholder", slave)
        slave.focus_toplevel()  # Must be done after attach

        self.slave = slave