[gegl-gtk] Update Python example



commit 21dcaa2790bb3e3f486c764db72feaa2b8b4f290
Author: Manuel QuiƱones <manuel por aca gmail com>
Date:   Tue Jan 14 14:47:06 2014 -0300

    Update Python example

 examples/python/gegl-gtk-basic.py |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/examples/python/gegl-gtk-basic.py b/examples/python/gegl-gtk-basic.py
old mode 100644
new mode 100755
index dc6fa4d..66183c1
--- a/examples/python/gegl-gtk-basic.py
+++ b/examples/python/gegl-gtk-basic.py
@@ -1,8 +1,8 @@
-
+#!/usr/bin/env python
 import sys, os.path
 
 import gi
-from gi.repository import Gegl, GeglGtk2, Gtk
+from gi.repository import Gegl, GeglGtk3, Gtk
 
 graph_xml = """
 <gegl>
@@ -26,13 +26,13 @@ if __name__ == '__main__':
 
     file_path = os.path.abspath(sys.argv[1])
 
-    Gegl.init(0,"")
+    Gegl.init([])
     node = Gegl.Node.new_from_xml(graph_xml % file_path, "/");
-    view_widget = GeglGtk2.View()
+    view_widget = GeglGtk3.View()
     view_widget.set_property('node', node.get_children()[-1])
 
     window = Gtk.Window()
+    window.connect("destroy", Gtk.main_quit)
     window.add(view_widget)
     window.show_all()
     Gtk.main()
-


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]