Goocanvas 0.9.0 API Breakage
- From: "John Stowers" <john stowers gmail com>
- To: Conduit <conduit-list gnome org>
- Subject: Goocanvas 0.9.0 API Breakage
- Date: Mon, 20 Aug 2007 16:44:14 +1200
The attached patch makes conduit work against (py)goocanvas 0.9.0
Im not sure about committing it yet but it may be useful for packagers
John
Index: conduit/Canvas.py
===================================================================
--- conduit/Canvas.py (revision 794)
+++ conduit/Canvas.py (working copy)
@@ -147,8 +147,14 @@
return items
def _canvas_resized(self, widget, allocation):
+
+ w = max(allocation.width,Canvas.CANVAS_WIDTH)
+ h = max(allocation.height,Canvas.CANVAS_HEIGHT)
+
+ self.set_bounds(0,0,w,h)
+
for i in self._get_child_conduit_items():
- i.set_width(allocation.width)
+ i.set_width(w)
def _on_conduit_button_press(self, view, target, event):
"""
@@ -486,33 +492,27 @@
self.model = model
def get_height(self):
- b = goocanvas.Bounds()
- self.get_bounds(b)
+ b = self.get_bounds()
return b.y2-b.y1
def get_width(self):
- b = goocanvas.Bounds()
- self.get_bounds(b)
+ b = self.get_bounds()
return b.x2-b.x1
def get_top(self):
- b = goocanvas.Bounds()
- self.get_bounds(b)
+ b = self.get_bounds()
return b.y1
def get_bottom(self):
- b = goocanvas.Bounds()
- self.get_bounds(b)
+ b = self.get_bounds()
return b.y2
def get_left(self):
- b = goocanvas.Bounds()
- self.get_bounds(b)
+ b = self.get_bounds()
return b.x1
def get_right(self):
- b = goocanvas.Bounds()
- self.get_bounds(b)
+ b = self.get_bounds()
return b.x2
class DataProviderCanvasItem(_CanvasItem):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]