[pygobject] pygi-convert: Support new-style constructors for Gio.File



commit 7a92ade7ee5fe2f9eb8de2626c34650e2e5c06df
Author: Kai Willadsen <kai willadsen gmail com>
Date:   Sun Apr 14 10:54:04 2013 +1000

    pygi-convert: Support new-style constructors for Gio.File
    
    https://bugzilla.gnome.org/show_bug.cgi?id=698477

 pygi-convert.sh | 2 ++
 1 file changed, 2 insertions(+)
---
diff --git a/pygi-convert.sh b/pygi-convert.sh
index 3823592..58467a5 100755
--- a/pygi-convert.sh
+++ b/pygi-convert.sh
@@ -194,6 +194,8 @@ for f in $FILES_TO_CONVERT; do
 \
     -pe "s/import gio\n/from gi.repository import Gio\n/g;" \
     -pe "s/gio\./Gio\./g;" \
+    -pe "s/Gio\.File\(uri=/Gio\.File\.new_for_uri\(/g;" \
+    -pe "s/Gio\.File\(path=/Gio\.File\.new_for_path\(/g;" \
     -pe "s/Gio.FILE_COPY_/Gio.FileCopyFlags./g;" \
     -pe "s/Gio.FILE_CREATE_/Gio.FileCreateFlags./g;" \
     -pe "s/Gio.FILE_MONITOR_EVENT_/Gio.FileMonitorEvent./g;" \


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