~ubuntu-branches/ubuntu/raring/kiwi/raring

« back to all changes in this revision

Viewing changes to examples/framework/person/person.py

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Holbach
  • Date: 2007-01-30 09:52:28 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20070130095228-n0mkqlt82e74twqc
Tags: 1.9.12-0ubuntu1
* New upstream release.
* debian/patches/03_epyrun_use_local_modules.patch:
  - updated.
* debian/control:
  - moved python-support from Build-Depends to Build-Depends-Indep.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/env python
 
2
import gtk
 
3
from kiwi.model import PickledModel
 
4
from kiwi.ui.delegates import ProxyDelegate
 
5
 
 
6
# define the class that holds our application data
 
7
class Person(PickledModel):
 
8
    pass
 
9
person = Person.unpickle()
 
10
 
 
11
# create and run a proxy interface attached to person
 
12
view = ProxyDelegate(person, gladefile="Person",
 
13
                     widgets=["address", 'name', 'phone'],
 
14
                     delete_handler=gtk.main_quit)
 
15
view.focus_topmost()
 
16
view.show_and_loop()
 
17
 
 
18
# save changes done to the instance
 
19
person.save()