[pygobject] [pygi-convert.sh] Handle the import of pygtk and require Gtk 3.0



commit 735f98d83c1c19df7457aa32a378e8c80cf2831f
Author: Timo Vanwynsberghe <timovwb gmail com>
Date:   Mon Aug 15 18:58:31 2011 +0200

    [pygi-convert.sh] Handle the import of pygtk and require Gtk 3.0
    
    https://bugzilla.gnome.org/show_bug.cgi?id=654001

 pygi-convert.sh |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/pygi-convert.sh b/pygi-convert.sh
index 311b031..83c31b1 100644
--- a/pygi-convert.sh
+++ b/pygi-convert.sh
@@ -15,6 +15,8 @@ for f in $FILES_TO_CONVERT; do
     -pe "s/GConf\.VALUE_/GConf.ValueType./g;" \
     -pe "s/gconf_client.notify_add\('\/desktop\/sugar\/collaboration\/publish_gadget',/return;gconf_client.notify_add\('\/desktop\/sugar\/collaboration\/publish_gadget',/g;" \
 \
+    -pe "s/import pygtk/import gi/g;" \
+    -pe "s/pygtk.require\('2.0'\)/gi.require_version\('Gtk', '3.0'\)/g;" \
     -pe "s/import gtk\n/from gi.repository import Gtk\n/g;" \
     -pe "s/(?<!\.)gtk\./Gtk\./g;" \
     -pe "s/Gtk.ARROW_/Gtk.ArrowType./g;" \



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