[POS-commit] r70 - in Kiwi2: . Kiwi2
Lorenzo Gil Sanchez
lgs at async.com.br
Sat Mar 5 18:01:18 BRT 2005
Author: lgs
Date: 2005-03-05 18:01:17 -0300 (Sat, 05 Mar 2005)
New Revision: 70
Modified:
Kiwi2/ChangeLog
Kiwi2/Kiwi2/Delegates.py
Log:
* Kiwi2/Delegates.py: add a keyactions argument to all the Delegates
so we can use it for the Controller
Modified: Kiwi2/ChangeLog
===================================================================
--- Kiwi2/ChangeLog 2005-03-05 21:00:09 UTC (rev 69)
+++ Kiwi2/ChangeLog 2005-03-05 21:01:17 UTC (rev 70)
@@ -1,5 +1,8 @@
2005-03-05 Lorenzo Gil Sanchez <lgs at sicem.biz>
+ * Kiwi2/Delegates.py: add a keyactions argument to all the Delegates
+ so we can use it for the Controller
+
* examples/News/news4.py (Shell.__init__): provide an example of
keyactions
Modified: Kiwi2/Kiwi2/Delegates.py
===================================================================
--- Kiwi2/Kiwi2/Delegates.py 2005-03-05 21:00:09 UTC (rev 69)
+++ Kiwi2/Kiwi2/Delegates.py 2005-03-05 21:01:17 UTC (rev 70)
@@ -36,45 +36,47 @@
single package. It does not possess a top-level window, but is instead
intended to be plugged in to a View or Delegate using attach_slave().
"""
- def __init__(self, toplevel=None, widgets=[]):
+ def __init__(self, toplevel=None, widgets=[], keyactions=None):
"""Create new SlaveDelegate. toplevel is the toplevel widget,
defaults to the value of the class' toplevel attribute, and if not
present, raises AttributeError.
"""
SlaveView.__init__(self, toplevel, widgets)
- BaseController.__init__(self, view=self)
+ BaseController.__init__(self, view=self, keyactions=keyactions)
class GladeSlaveDelegate(GladeSlaveView, BaseController):
"""A class that combines a controller and a GladeSlaveView. It is
intended to be plugged into a View or Delegate using attach_slave().
"""
- def __init__(self, gladefile=None, container_name=None, widgets=[]):
+ def __init__(self, gladefile=None, container_name=None, widgets=[],
+ keyactions=None):
"""Creates a new GladeSlaveDelegate. gladefile is the name of
the Glade XML file, and container_name is the name of the toplevel
GtkWindow that holds the slave.
"""
GladeSlaveView.__init__(self, gladefile, container_name, widgets)
- BaseController.__init__(self, view=self)
+ BaseController.__init__(self, view=self, keyactions=keyactions)
class Delegate(BaseView, BaseController):
"""A class that combines view and controller functionality into a
single package. The Delegate class possesses a top-level window.
"""
- def __init__(self, toplevel=None, delete_handler=None, widgets=[]):
+ def __init__(self, toplevel=None, delete_handler=None, widgets=[],
+ keyactions=None):
"""Creates a new Delegate. For parameters , see BaseView.__init__"""
BaseView.__init__(self, toplevel, delete_handler, widgets)
- BaseController.__init__(self, view=self)
+ BaseController.__init__(self, view=self, keyactions=keyactions)
class GladeDelegate(GladeView, BaseController):
"""A Delegate that uses a Glade file to specify its UI."""
def __init__(self, gladefile=None, toplevel_name=None,
- delete_handler=None, widgets=[]):
+ delete_handler=None, widgets=[], keyactions=None):
"""Creates a new GladeDelegate. For parameters,
see GladeView.__init__
"""
GladeView.__init__(self, gladefile, toplevel_name, delete_handler,
widgets)
- BaseController.__init__(self, view=self)
+ BaseController.__init__(self, view=self, keyactions=keyactions)
class ListDelegate(SlaveDelegate):
"""A View that builds a List around a specification for a class,
More information about the POS-commit
mailing list