aboutsummaryrefslogtreecommitdiffstats
path: root/python
diff options
context:
space:
mode:
authorXavier Claessens <xclaesse@src.gnome.org>2008-03-16 21:55:34 +0800
committerXavier Claessens <xclaesse@src.gnome.org>2008-03-16 21:55:34 +0800
commit1a5366e019901b736c11b469b4f35324fa87fd62 (patch)
tree164efbcb5a5b691d709b0448b23334433a1d50f0 /python
parente0e00a271188b3867f90f35cde92e4142cd475c5 (diff)
downloadgsoc2013-empathy-1a5366e019901b736c11b469b4f35324fa87fd62.tar
gsoc2013-empathy-1a5366e019901b736c11b469b4f35324fa87fd62.tar.gz
gsoc2013-empathy-1a5366e019901b736c11b469b4f35324fa87fd62.tar.bz2
gsoc2013-empathy-1a5366e019901b736c11b469b4f35324fa87fd62.tar.lz
gsoc2013-empathy-1a5366e019901b736c11b469b4f35324fa87fd62.tar.xz
gsoc2013-empathy-1a5366e019901b736c11b469b4f35324fa87fd62.tar.zst
gsoc2013-empathy-1a5366e019901b736c11b469b4f35324fa87fd62.zip
Add python example
svn path=/trunk/; revision=803
Diffstat (limited to 'python')
-rw-r--r--python/example.py31
1 files changed, 31 insertions, 0 deletions
diff --git a/python/example.py b/python/example.py
new file mode 100644
index 000000000..cffd5fffb
--- /dev/null
+++ b/python/example.py
@@ -0,0 +1,31 @@
+#!/usr/bin/env python
+
+import gtk
+import empathy
+import empathygtk
+
+class HelloWorld:
+
+ def destroy(self, widget, data=None):
+ print "destroy signal occurred"
+ gtk.main_quit()
+
+ def __init__(self):
+ self.window = gtk.Window(gtk.WINDOW_TOPLEVEL)
+ self.window.connect("destroy", self.destroy)
+
+ manager = empathy.ContactManager()
+ store = empathygtk.ContactListStore(manager)
+ view = empathygtk.ContactListView(store, 0)
+
+ self.window.add (view)
+ view.show()
+ self.window.show()
+
+ def main(self):
+ gtk.main()
+
+if __name__ == "__main__":
+ hello = HelloWorld()
+ hello.main()
+