]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Backport of 1.12:
authorJack Jansen <jack.jansen@cwi.nl>
Tue, 26 Mar 2002 12:49:24 +0000 (12:49 +0000)
committerJack Jansen <jack.jansen@cwi.nl>
Tue, 26 Mar 2002 12:49:24 +0000 (12:49 +0000)
Make object browser work in OSX (by rewriting the old browser
LDEF in Python). If at all possible, this should go into 2.2.1.

Mac/Tools/IDE/Wlists.py

index 57e89245ea8a3f8973be54ea978b8aa6319061f9..2be1a9cc4403f13d1cd004ba3fbce3385655c1a2 100644 (file)
@@ -43,6 +43,7 @@ class List(Wbase.SelectableWidget):
                self.SetPort()
                rect = self._bounds
                rect = rect[0]+1, rect[1]+1, rect[2]-16, rect[3]-1
+               self._viewbounds = rect
                self._list = LNew(rect, (0, 0, self._cols, 0), (0, 0), self.LDEF_ID, self._parentwindow.wid,
                                        0, 1, 0, 1)
                if self.drawingmode:
@@ -67,6 +68,8 @@ class List(Wbase.SelectableWidget):
                        l, t, r, b = self._bounds
                        width = r - l - 17
                        height = b - t - 2
+                       vl, vt, vr, vb = self._viewbounds
+                       self._viewbounds = vl, vt, vl + width, vt + height
                        self._list.LSize(width, height)
                        # now *why* doesn't the list manager recalc the cellrect???
                        l, t, r, b = self._list.LRect((0,0))
@@ -383,6 +386,7 @@ class CustomList(List):
                self.SetPort()
                rect = self._bounds
                rect = rect[0]+1, rect[1]+1, rect[2]-16, rect[3]-1
+               self._viewbounds = rect
                self._list = CreateCustomList(
                                rect,
                                (0, 0, 1, 0),