diff options
author | James Henstridge <james@daa.com.au> | 2002-08-18 09:52:39 +0000 |
---|---|---|
committer | James Henstridge <jamesh@src.gnome.org> | 2002-08-18 09:52:39 +0000 |
commit | 54689c950f853e4da9bd048af193a19adb39b3b9 (patch) | |
tree | e068f65d1cc8d07ccc2b42aa94177b0e751e552d /examples/properties.py | |
parent | 2582e5f02b58a806d405e8cf299c8b775b19e9d4 (diff) | |
download | pygobject-PYGTK_0_6_11.tar.gz pygobject-PYGTK_0_6_11.tar.xz pygobject-PYGTK_0_6_11.zip |
fix up spec file to reflect new locations of files.PYGTK_0_6_11PYGTK_0_6_10GNOME_PYTHON_1_4_4GNOME_PYTHON_1_4_3
2002-08-18 James Henstridge <james@daa.com.au>
* pygtk.spec: fix up spec file to reflect new locations of files.
* pygtk.py: helper script for parallel installs.
* Makefile.am: fix up makefile for parallel install.
2002-08-18 James Henstridge <james@daa.com.au>
* gnome-python.spec: update to take into account new locations.
* pygnome/gnome/Makefile.am: same here.
* pygnome/Makefile.am: fix up for parallel install with pygtk-2.0.
Diffstat (limited to 'examples/properties.py')
-rw-r--r-- | examples/properties.py | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/examples/properties.py b/examples/properties.py deleted file mode 100644 index 2d36afc..0000000 --- a/examples/properties.py +++ /dev/null @@ -1,43 +0,0 @@ -import gobject - -class MyObject(gobject.GObject): - __gproperties__ = { - 'foo': (gobject.TYPE_STRING, 'foo property', 'the foo of the object', - 'bar', gobject.PARAM_READWRITE), - 'boolprop': (gobject.TYPE_BOOLEAN, 'bool prop', 'a test boolean prop', - 0, gobject.PARAM_READABLE), - } - - def __init__(self): - self.__gobject_init__() - self.foo = 'bar' - def do_set_property(self, pspec, value): - print ' do_set_property called for %s=%r' % (pspec.name, value) - if pspec.name == 'foo': - self.foo = value - else: - raise AttributeError, 'unknown property %s' % pspec.name - def do_get_property(self, pspec): - print ' do_get_property called for %s' % pspec.name - if pspec.name == 'foo': - return self.foo - elif pspec.name == 'boolprop': - return 1 - else: - raise AttributeError, 'unknown property %s' % pspec.name -gobject.type_register(MyObject) - -print "MyObject properties: ", gobject.list_properties(MyObject) -obj = MyObject() - -val = obj.get_property('foo') -print "obj.get_property('foo') == ", val - -obj.set_property('foo', 'spam') -print "obj.set_property('foo', 'spam')" - -val = obj.get_property('foo') -print "obj.get_property('foo') == ", val - -val = obj.get_property('boolprop') -print "obj.get_property('boolprop') == ", val |