Claude Marinier wrote:
Greetings,

I have been trying out urwid. So far, it looks useful and solid except for this error. I am running Debian testing on a Compaq DeskPro with Python 2.4.4c0 and libcurses 5.5-2.

Ah, yes. I broke parts of the Padding and Overlay widgets in 0.9.7. Please try the attached patch.

Defence Research & Development Canada (Ottawa)

Hey, hey.. a fellow Ottawa dweller. I hope you find Urwid useful, and if you need any features, I can be bribed with beer. :-)

Ian

Index: urwid/widget.py
===================================================================
RCS file: /home/cvs/urwid/urwid/widget.py,v
retrieving revision 1.131
diff -u -r1.131 widget.py
--- urwid/widget.py	2 Oct 2006 03:08:27 -0000	1.131
+++ urwid/widget.py	3 Oct 2006 18:01:42 -0000
@@ -1176,7 +1176,7 @@
 		"""Send mouse event if position is within self.w."""
 		if not hasattr(self.w,'mouse_event'):
 			return False
-		left, right = self.padding_values(size)
+		left, right = self.padding_values(size, focus)
 		maxcol = size[0]
 		if x < left or x >= maxcol-right: 
 			return False
@@ -1471,7 +1471,7 @@
 		if self.width_type is None:
 			# top_w is a fixed widget
 			return ()
-		maxcol = size[0]
+		maxcol, maxrow = size
 		if self.width_type is not None and self.height_type is None:
 			# top_w is a flow widget
 			return (maxcol-left-right,)
@@ -1497,6 +1497,7 @@
 		
 		left, right, top, bottom = self.calculate_padding_filler(size,
 			focus)
+		maxcol, maxrow = size
 		if ( col<left or col>=maxcol-right or
 			row<top or row>=maxrow-bottom ):
 			return False
_______________________________________________
Urwid mailing list
[email protected]
http://lists.excess.org/mailman/listinfo/urwid

Reply via email to