[pygobject] pygi-convert.sh: Don't change the name of "gtk" submodules
- From: Martin Pitt <martinpitt src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pygobject] pygi-convert.sh: Don't change the name of "gtk" submodules
- Date: Sat, 15 Jan 2011 17:25:14 +0000 (UTC)
commit 6aaa6a38198e84a189ca1e8d26b1871d5b6bb711
Author: Martin Pitt <martin pitt ubuntu com>
Date: Sat Jan 15 11:17:09 2011 -0600
pygi-convert.sh: Don't change the name of "gtk" submodules
Some projects have local modules like "myproject.ui.gtk". Avoid changing those,
just change module names which start with "gtk" or "gdk".
pygi-convert.sh | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/pygi-convert.sh b/pygi-convert.sh
index 643dc55..5a1c56a 100644
--- a/pygi-convert.sh
+++ b/pygi-convert.sh
@@ -16,7 +16,7 @@ for f in $FILES_TO_CONVERT; do
-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 gtk\n/from gi.repository import Gtk\n/g;" \
- -pe "s/gtk\./Gtk\./g;" \
+ -pe "s/(?<!\.)gtk\./Gtk\./g;" \
-pe "s/Gtk.ARROW_/Gtk.ArrowType./g;" \
-pe "s/Gtk.ASSISTANT_PAGE_/Gtk.AssistantPageType./g;" \
-pe "s/Gtk.BUTTONBOX_/Gtk.ButtonBoxStyle./g;" \
@@ -87,7 +87,7 @@ for f in $FILES_TO_CONVERT; do
-pe "s/from gtk import gdk\n/from gi.repository import Gdk\n/g;" \
-pe "s/Gtk.gdk.x11_/GdkX11\./g;" \
-pe "s/Gtk.gdk\./Gdk\./g;" \
- -pe "s/gdk\./Gdk\./g;" \
+ -pe "s/(?<!\.)gdk\./Gdk\./g;" \
-pe "s/Gdk.screen_width/Gdk.Screen.width/g;" \
-pe "s/Gdk.screen_height/Gdk.Screen.height/g;" \
-pe "s/Gdk.screen_get_default/Gdk.Screen.get_default/g;" \
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]