[PATCH] gegl-gtk - Update Python example

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

 



Hi,

here is a patch for gegl-gtk that makes the Python example with
gobject introspection work.

Cheers,

-- 
.. manuq ..
From 25ceebaaaef824d683b8715e42b88d3407feee32 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Manuel=20Qui=C3=B1ones?= <manuel.por.aca@xxxxxxxxx>
Date: Tue, 14 Jan 2014 14:47:06 -0300
Subject: [PATCH] Update Python example

---
 examples/python/gegl-gtk-basic.py | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
 mode change 100644 => 100755 examples/python/gegl-gtk-basic.py

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()
-
-- 
1.8.3.1

_______________________________________________
gegl-developer-list mailing list
List address:    gegl-developer-list@xxxxxxxxx
List membership: https://mail.gnome.org/mailman/listinfo/gegl-developer-list


[Index of Archives]     [Yosemite News]     [Yosemite Photos]     [gtk]     [GIMP Users]     [KDE]     [Gimp's Home]     [Gimp on Windows]     [Steve's Art]

  Powered by Linux