Пример #1
0
 def __init__(self, gladefile=None, toplevel_name=None, domain=None, keyactions=None):
     """
     The keyactions parameter is sent to :class:`kiwi.controllers.BaseController`,
     the rest are sent to :class:`kiwi.ui.views.SlavseView`
     """
     SlaveView.__init__(self, gladefile=gladefile, toplevel_name=toplevel_name, domain=domain)
     BaseController.__init__(self, view=self, keyactions=keyactions)
Пример #2
0
    def __init__(
        self,
        model,
        proxy_widgets=None,
        gladefile=None,
        toplevel=None,
        widgets=(),
        toplevel_name=None,
        domain=None,
        delete_handler=None,
        keyactions=None,
    ):
        """Creates a new Delegate.
        :param model: instance to be attached
        :param proxy_widgets:
        The keyactions parameter is sent to :class:`kiwi.controllers.BaseController`,
        the rest are sent to :class:`kiwi.ui.views.BaseView`
        """

        BaseView.__init__(self, toplevel, widgets, gladefile, toplevel_name, domain, delete_handler)
        self.model = model
        self.proxy = self.add_proxy(model, proxy_widgets)
        self.proxy.proxy_updated = self.proxy_updated

        BaseController.__init__(self, view=self, keyactions=keyactions)
Пример #3
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")
Пример #4
0
 def __init__(self, view):
     keyactions = {
         keysyms.A: self.on_button__clicked,
         keysyms.a: self.on_button__clicked,
         keysyms.B: self.on_foo__button__clicked,
         keysyms.b: self.on_foo__button__clicked,
     }
     BaseController.__init__(self, view, keyactions)
Пример #5
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")
Пример #6
0
 def __init__(self, view):
     keyactions = {
         Gdk.KEY_A: self.on_button__clicked,
         Gdk.KEY_a: self.on_button__clicked,
         Gdk.KEY_B: self.on_foo__button__clicked,
         Gdk.KEY_b: self.on_foo__button__clicked
     }
     BaseController.__init__(self, view, keyactions)
Пример #7
0
 def __init__(self, view):
     keyactions = {
         Gdk.KEY_A: self.on_button__clicked,
         Gdk.KEY_a: self.on_button__clicked,
         Gdk.KEY_B: self.on_foo__button__clicked,
         Gdk.KEY_b: self.on_foo__button__clicked
     }
     BaseController.__init__(self, view, keyactions)
Пример #8
0
 def __init__(self, view):
     keyactions = {
         keysyms.A: self.on_button__clicked,
         keysyms.a: self.on_button__clicked,
         keysyms.B: self.on_foo__button__clicked,
         keysyms.b: self.on_foo__button__clicked
     }
     BaseController.__init__(self, view, keyactions)
Пример #9
0
 def __init__(self, toplevel=None, widgets=None,
              toplevel_name=None, keyactions=None):
     """
     The keyactions parameter is sent to :class:`kiwi.controllers.BaseController`,
     the rest are sent to :class:`kiwi.ui.views.SlaveView`
     """
     widgets = widgets or []
     SlaveView.__init__(self, toplevel, widgets, toplevel_name)
     BaseController.__init__(self, view=self, keyactions=keyactions)
Пример #10
0
 def __init__(self, toplevel=None, widgets=(), gladefile=None, toplevel_name=None, keyactions=None):
     """
     The keyactions parameter is sent to :class:`kiwi.controllers.BaseController`,
     the rest are sent to :class:`kiwi.ui.views.SlaveView`
     """
     if gladefile:
         deprecationwarn("gladefile is deprecated in Delegate, " "use GladeSlaveDelegate instead", stacklevel=3)
     SlaveView.__init__(self, toplevel, widgets, gladefile, toplevel_name)
     BaseController.__init__(self, view=self, keyactions=keyactions)
Пример #11
0
    def __init__(self, gladefile=None, toplevel_name=None, domain=None, delete_handler=None, keyactions=None):
        """Creates a new GladeDelegate.
        The keyactions parameter is sent to :class:`kiwi.controllers.BaseController`,
        the rest are sent to :class:`kiwi.ui.views.BaseView`
        """

        BaseView.__init__(
            self, gladefile=gladefile, toplevel_name=toplevel_name, domain=domain, delete_handler=delete_handler
        )
        BaseController.__init__(self, view=self, keyactions=keyactions)
Пример #12
0
 def __init__(self, toplevel=None, widgets=None, toplevel_name=None,
              delete_handler=None, keyactions=None):
     """Creates a new Delegate.
     The keyactions parameter is sent to :class:`kiwi.controllers.BaseController`,
     the rest are sent to :class:`kiwi.ui.views.BaseView`
     """
     BaseView.__init__(self,
                       toplevel=toplevel,
                       widgets=widgets or [],
                       toplevel_name=toplevel_name,
                       delete_handler=delete_handler)
     BaseController.__init__(self, view=self, keyactions=keyactions)
Пример #13
0
 def __init__(self, gladefile=None,
              toplevel_name=None, domain=None,
              keyactions=None):
     """
     The keyactions parameter is sent to :class:`kiwi.controllers.BaseController`,
     the rest are sent to :class:`kiwi.ui.views.SlavseView`
     """
     SlaveView.__init__(self,
                        gladefile=gladefile,
                        toplevel_name=toplevel_name,
                        domain=domain)
     BaseController.__init__(self, view=self, keyactions=keyactions)
Пример #14
0
    def __init__(self, gladefile=None, toplevel_name=None, domain=None,
                 delete_handler=None, keyactions=None):
        """Creates a new GladeDelegate.
        The keyactions parameter is sent to :class:`kiwi.controllers.BaseController`,
        the rest are sent to :class:`kiwi.ui.views.BaseView`
        """

        BaseView.__init__(self,
                          gladefile=gladefile,
                          toplevel_name=toplevel_name,
                          domain=domain,
                          delete_handler=delete_handler)
        BaseController.__init__(self, view=self, keyactions=keyactions)
Пример #15
0
 def __init__(self,
              toplevel=None,
              widgets=(),
              gladefile=None,
              toplevel_name=None,
              keyactions=None):
     """
     The keyactions parameter is sent to L{kiwi.controllers.BaseController},
     the rest are sent to L{kiwi.ui.views.SlaveView}
     """
     if gladefile:
         deprecationwarn(
             'gladefile is deprecated in Delegate, '
             'use GladeSlaveDelegate instead',
             stacklevel=3)
     SlaveView.__init__(self, toplevel, widgets, gladefile, toplevel_name)
     BaseController.__init__(self, view=self, keyactions=keyactions)
Пример #16
0
    def __init__(self, toplevel=None, widgets=(), gladefile=None,
                 toplevel_name=None,
                 delete_handler=None, keyactions=None):
        """Creates a new Delegate.
        The keyactions parameter is sent to L{kiwi.controllers.BaseController},
        the rest are sent to L{kiwi.ui.views.BaseView}
        """
        if gladefile:
            deprecationwarn(
                'gladefile is deprecated in Delegate, '
                'use GladeDelegate instead',
                stacklevel=3)

        BaseView.__init__(self,
                          toplevel=toplevel,
                          widgets=widgets,
                          gladefile=gladefile,
                          toplevel_name=toplevel_name,
                          delete_handler=delete_handler)
        BaseController.__init__(self, view=self, keyactions=keyactions)
Пример #17
0
    def __init__(self, model, proxy_widgets=None, gladefile=None,
                 toplevel=None, widgets=None,
                 toplevel_name=None, domain=None, delete_handler=None,
                 keyactions=None):
        """Creates a new Delegate.
        :param model: instance to be attached
        :param proxy_widgets:
        The keyactions parameter is sent to :class:`kiwi.controllers.BaseController`,
        the rest are sent to :class:`kiwi.ui.views.BaseView`
        """
        widgets = widgets or []

        BaseView.__init__(self, toplevel, widgets, gladefile,
                          toplevel_name, domain,
                          delete_handler)
        self.model = model
        self.proxy = self.add_proxy(model, proxy_widgets)
        self.proxy.proxy_updated = self.proxy_updated

        BaseController.__init__(self, view=self, keyactions=keyactions)
Пример #18
0
    def __init__(self,
                 toplevel=None,
                 widgets=(),
                 gladefile=None,
                 toplevel_name=None,
                 delete_handler=None,
                 keyactions=None):
        """Creates a new Delegate.
        The keyactions parameter is sent to L{kiwi.controllers.BaseController},
        the rest are sent to L{kiwi.ui.views.BaseView}
        """
        if gladefile:
            deprecationwarn(
                'gladefile is deprecated in Delegate, '
                'use GladeDelegate instead',
                stacklevel=3)

        BaseView.__init__(self,
                          toplevel=toplevel,
                          widgets=widgets,
                          gladefile=gladefile,
                          toplevel_name=toplevel_name,
                          delete_handler=delete_handler)
        BaseController.__init__(self, view=self, keyactions=keyactions)
Пример #19
0
 def __init__(self):
     self.vbox = self.build_ui()
     # It's dumb, and it breaks
     self.noogie = NotWidgetFoo
     FooView.__init__(self)
     BaseController.__init__(self, view=self)
Пример #20
0
 def __init__(self):
     self.win = 0
     BaseView.__init__(self)
     BaseController.__init__(self, view=self)
Пример #21
0
 def __init__(self):
     self.vbox = self.build_ui()
     # It's dumb, and it breaks
     self.noogie = NotWidgetFoo
     FooView.__init__(self)
     BaseController.__init__(self, view=self)
Пример #22
0
 def __init__(self, view):
     keyactions = {gtk.keysyms.Escape: quit_if_last}
     BaseController.__init__(self, view, keyactions)
Пример #23
0
 def __init__(self, view, model):
     BaseController.__init__(self, view)
     self.model = model
     gobject.timeout_add_seconds(1, self.callback)