[pygobject] pygi-convert.sh: Fix Gtk.Label handling to be idempotent
- From: Martin Pitt <martinpitt src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pygobject] pygi-convert.sh: Fix Gtk.Label handling to be idempotent
- Date: Tue, 18 Jan 2011 17:10:55 +0000 (UTC)
commit 3aa95011fad67df20370e92bf25236a34d7d08d3
Author: Martin Pitt <martin pitt ubuntu com>
Date: Tue Jan 18 18:09:30 2011 +0100
pygi-convert.sh: Fix Gtk.Label handling to be idempotent
As we are not replacing line by line, but the whole file at once, this is a bit
hackish unfortunately. We can't use a match test or a lookahead/behind
assertion.
pygi-convert.sh | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/pygi-convert.sh b/pygi-convert.sh
index 374b222..4ad1e2a 100644
--- a/pygi-convert.sh
+++ b/pygi-convert.sh
@@ -79,8 +79,9 @@ for f in $FILES_TO_CONVERT; do
-pe "s/pack_start\(([^,]*),(\s*)padding=([A-Za-z0-9._]*)\)/pack_start\(\1,\2True, True,\2\3\)/g;" \
-pe "#s/Gtk.HBox\(\)/Gtk.HBox\(False, 0\)/g;" \
-pe "#s/Gtk.VBox\(\)/Gtk.VBox\(False, 0\)/g;" \
- -pe "s/Gtk.Label\(([^,\)]+)\)/Gtk.Label\(label=\1\)/g;" \
- -pe "s/Gtk.AccelLabel\(([^,\)]+)\)/Gtk.AccelLabel\(label=\1\)/g;" \
+ -pe "s/Gtk.Label\s*\(([^,\)]+)\)/Gtk.Label\(label=\1\)/g;" \
+ -pe "s/Gtk.AccelLabel\s*\(([^,\)]+)\)/Gtk.AccelLabel\(label=\1\)/g;" \
+ -pe "s/Gtk.((?:Accel)?Label)\(label=label=/Gtk.\1\(label=/g;" \
-pe "s/len\(self._content.get_children\(\)\) > 0/self._content.get_children\(\)/g;" \
-pe "s/len\(self.menu.get_children\(\)\) > 0/self.menu.get_children\(\)/g;" \
-pe "s/([^\.^ ]*)\.drag_dest_set\(/Gtk.drag_dest_set\(\1, /g;" \
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]