[pybank] Add an override for Gdk and move the overrides package inside bank
- From: Johan Dahlin <johan src gnome org>
- To: svn-commits-list gnome org
- Subject: [pybank] Add an override for Gdk and move the overrides package inside bank
- Date: Tue, 2 Jun 2009 10:45:22 -0400 (EDT)
commit 5c89ee7f6a713b4e0af429524528d9bf33d9e153
Author: Tomeu Vizoso <tomeu sugarlabs org>
Date: Tue May 12 17:02:18 2009 +0200
Add an override for Gdk and move the overrides package inside bank
---
bank/importer.py | 2 +-
bank/overrides/Gdk.py | 14 ++++++++++++++
{overrides => bank/overrides}/Gtk.py | 0
{overrides => bank/overrides}/__init__.py | 0
4 files changed, 15 insertions(+), 1 deletions(-)
diff --git a/bank/importer.py b/bank/importer.py
index 363336a..ed64764 100644
--- a/bank/importer.py
+++ b/bank/importer.py
@@ -35,7 +35,7 @@ class DynamicImporter(object):
def load_module(self, name):
from .module import DynamicModule
- module_name = 'overrides.%s' % (name,)
+ module_name = 'bank.overrides.%s' % (name,)
try:
d = {}
module = __import__(module_name, d, d, ' ', 2)
diff --git a/bank/overrides/Gdk.py b/bank/overrides/Gdk.py
new file mode 100644
index 0000000..e2f05d7
--- /dev/null
+++ b/bank/overrides/Gdk.py
@@ -0,0 +1,14 @@
+from bank.module import DynamicModule
+
+class GdkModule(DynamicModule):
+ def created(self):
+ self.init_check(0, None)
+
+ def rectangle_new(self, x, y, width, height):
+ rectangle = self.Rectangle()
+ rectangle.x = x
+ rectangle.y = y
+ rectangle.width = width
+ rectangle.height = height
+ return rectangle
+
diff --git a/overrides/Gtk.py b/bank/overrides/Gtk.py
similarity index 100%
rename from overrides/Gtk.py
rename to bank/overrides/Gtk.py
diff --git a/overrides/__init__.py b/bank/overrides/__init__.py
similarity index 100%
rename from overrides/__init__.py
rename to bank/overrides/__init__.py
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]