diff options
author | Jack Jansen <jack.jansen@cwi.nl> | 2001-08-03 13:31:36 (GMT) |
---|---|---|
committer | Jack Jansen <jack.jansen@cwi.nl> | 2001-08-03 13:31:36 (GMT) |
commit | cbed91b4db6817b7bbbb12ede40bfb5d26a9bf14 (patch) | |
tree | 1995f01bd8828ae9647ad407e40dd8584ca843da /Mac/Demo | |
parent | cb60dae6a1a7841138421866ea15870f6297cf8b (diff) | |
download | cpython-cbed91b4db6817b7bbbb12ede40bfb5d26a9bf14.zip cpython-cbed91b4db6817b7bbbb12ede40bfb5d26a9bf14.tar.gz cpython-cbed91b4db6817b7bbbb12ede40bfb5d26a9bf14.tar.bz2 |
Merging appropriate 2.1.1 fixes back into the main trunk.
Diffstat (limited to 'Mac/Demo')
-rw-r--r-- | Mac/Demo/PICTbrowse/ICONbrowse.py | 4 | ||||
-rw-r--r-- | Mac/Demo/PICTbrowse/PICTbrowse.py | 4 | ||||
-rw-r--r-- | Mac/Demo/PICTbrowse/PICTbrowse2.py | 6 | ||||
-rw-r--r-- | Mac/Demo/PICTbrowse/oldPICTbrowse.py | 6 | ||||
-rw-r--r-- | Mac/Demo/mlte/mlted.py | 4 | ||||
-rw-r--r-- | Mac/Demo/textedit/ped.py | 4 | ||||
-rw-r--r-- | Mac/Demo/waste/htmled.py | 7 | ||||
-rw-r--r-- | Mac/Demo/waste/swed.py | 4 | ||||
-rw-r--r-- | Mac/Demo/waste/wed.py | 4 |
9 files changed, 26 insertions, 17 deletions
diff --git a/Mac/Demo/PICTbrowse/ICONbrowse.py b/Mac/Demo/PICTbrowse/ICONbrowse.py index c827fac..865ff9e 100644 --- a/Mac/Demo/PICTbrowse/ICONbrowse.py +++ b/Mac/Demo/PICTbrowse/ICONbrowse.py @@ -119,9 +119,9 @@ class MyDialog(FrameWork.DialogWindow): def open(self, id, contents): self.id = id FrameWork.DialogWindow.open(self, ID_MAIN) - self.wid.SetDialogDefaultItem(MAIN_SHOW) + self.dlg.SetDialogDefaultItem(MAIN_SHOW) self.contents = contents - self.ctl = self.wid.GetDialogItemAsControl(MAIN_LIST) + self.ctl = self.dlg.GetDialogItemAsControl(MAIN_LIST) h = self.ctl.GetControlData_Handle(Controls.kControlListBoxPart, Controls.kControlListBoxListHandleTag) self.list = List.as_List(h) diff --git a/Mac/Demo/PICTbrowse/PICTbrowse.py b/Mac/Demo/PICTbrowse/PICTbrowse.py index 04d321c..da32b50 100644 --- a/Mac/Demo/PICTbrowse/PICTbrowse.py +++ b/Mac/Demo/PICTbrowse/PICTbrowse.py @@ -97,9 +97,9 @@ class MyDialog(FrameWork.DialogWindow): def open(self, id, contents): self.id = id FrameWork.DialogWindow.open(self, ID_MAIN) - self.wid.SetDialogDefaultItem(MAIN_SHOW) + self.dlg.SetDialogDefaultItem(MAIN_SHOW) self.contents = contents - self.ctl = self.wid.GetDialogItemAsControl(MAIN_LIST) + self.ctl = self.dlg.GetDialogItemAsControl(MAIN_LIST) h = self.ctl.GetControlData_Handle(Controls.kControlListBoxPart, Controls.kControlListBoxListHandleTag) self.list = List.as_List(h) diff --git a/Mac/Demo/PICTbrowse/PICTbrowse2.py b/Mac/Demo/PICTbrowse/PICTbrowse2.py index 903fd9b..56440f2 100644 --- a/Mac/Demo/PICTbrowse/PICTbrowse2.py +++ b/Mac/Demo/PICTbrowse/PICTbrowse2.py @@ -98,7 +98,7 @@ class PICTwindow(FrameWork.Window): def fitrect(self): """Return self.pictrect scaled to fit in window""" - graf = self.wid.GetWindowPort() + graf = self.dlg.GetWindowPort() screenrect = graf.portRect picwidth = self.pictrect[2] - self.pictrect[0] picheight = self.pictrect[3] - self.pictrect[1] @@ -119,9 +119,9 @@ class MyDialog(FrameWork.DialogWindow): def open(self, id, contents): self.id = id FrameWork.DialogWindow.open(self, ID_MAIN) - self.wid.SetDialogDefaultItem(MAIN_SHOW) + self.dlg.SetDialogDefaultItem(MAIN_SHOW) self.contents = contents - self.ctl = self.wid.GetDialogItemAsControl(MAIN_LIST) + self.ctl = self.dlg.GetDialogItemAsControl(MAIN_LIST) h = self.ctl.GetControlData_Handle(Controls.kControlListBoxPart, Controls.kControlListBoxListHandleTag) self.list = List.as_List(h) diff --git a/Mac/Demo/PICTbrowse/oldPICTbrowse.py b/Mac/Demo/PICTbrowse/oldPICTbrowse.py index 72a29de..0012958 100644 --- a/Mac/Demo/PICTbrowse/oldPICTbrowse.py +++ b/Mac/Demo/PICTbrowse/oldPICTbrowse.py @@ -96,8 +96,8 @@ class MyDialog(FrameWork.DialogWindow): def open(self, id, contents): self.id = id FrameWork.DialogWindow.open(self, ID_MAIN) - self.wid.SetDialogDefaultItem(MAIN_SHOW) - tp, h, rect = self.wid.GetDialogItem(MAIN_LIST) + self.dlg.SetDialogDefaultItem(MAIN_SHOW) + tp, h, rect = self.dlg.GetDialogItem(MAIN_LIST) rect2 = rect[0]+1, rect[1]+1, rect[2]-17, rect[3]-17 # Scroll bar space self.list = List.LNew(rect2, (0, 0, 1, len(contents)), (0,0), 0, self.wid, 0, 1, 1, 1) @@ -145,7 +145,7 @@ class MyDialog(FrameWork.DialogWindow): self.parent.showPICT(resid) def do_rawupdate(self, window, event): - tp, h, rect = self.wid.GetDialogItem(MAIN_LIST) + tp, h, rect = self.dlg.GetDialogItem(MAIN_LIST) Qd.SetPort(self.wid) Qd.FrameRect(rect) self.list.LUpdate(self.wid.GetWindowPort().visRgn) diff --git a/Mac/Demo/mlte/mlted.py b/Mac/Demo/mlte/mlted.py index 0f78693..10d5698 100644 --- a/Mac/Demo/mlte/mlted.py +++ b/Mac/Demo/mlte/mlted.py @@ -24,7 +24,7 @@ class MlteWindow(Window): self.path = path self.name = name r = windowbounds(400, 400) - w = Win.NewWindow(r, name, 1, 0, -1, 1, 0x55555555) + w = Win.NewWindow(r, name, 1, 0, -1, 1, 0) self.wid = w flags = MacTextEditor.kTXNDrawGrowIconMask|MacTextEditor.kTXNWantHScrollBarMask| \ MacTextEditor.kTXNWantVScrollBarMask @@ -361,6 +361,8 @@ class Mlted(Application): def idle(self, event): if self.active: self.active.do_idle(event) + else: + Qd.SetCursor(Qd.qd.arrow) def main(): Mlte.TXNInitTextension(0) diff --git a/Mac/Demo/textedit/ped.py b/Mac/Demo/textedit/ped.py index 9b222a3..529ac12 100644 --- a/Mac/Demo/textedit/ped.py +++ b/Mac/Demo/textedit/ped.py @@ -19,7 +19,7 @@ class TEWindow(ScrolledWindow): self.path = path self.name = name r = windowbounds(400, 400) - w = Win.NewWindow(r, name, 1, 0, -1, 1, 0x55555555) + w = Win.NewWindow(r, name, 1, 0, -1, 1, 0) self.wid = w x0, y0, x1, y1 = self.wid.GetWindowPort().portRect x0 = x0 + 4 @@ -338,6 +338,8 @@ class Ped(Application): def idle(self, *args): if self.active: self.active.do_idle() + else: + Qd.SetCursor(Qd.qd.arrow) def main(): App = Ped() diff --git a/Mac/Demo/waste/htmled.py b/Mac/Demo/waste/htmled.py index 7643947..4d29e1e 100644 --- a/Mac/Demo/waste/htmled.py +++ b/Mac/Demo/waste/htmled.py @@ -15,7 +15,6 @@ import Scrap import os import macfs import MACFS -import regsub import string import htmllib @@ -47,7 +46,7 @@ class WasteWindow(ScrolledWindow): self.path = path self.name = name r = windowbounds(400, 400) - w = Win.NewWindow(r, name, 1, 0, -1, 1, 0x55555555) + w = Win.NewWindow(r, name, 1, 0, -1, 1, 0) self.wid = w vr = LEFTMARGIN, 0, r[2]-r[0]-15, r[3]-r[1]-15 dr = (0, 0, vr[2], 0) @@ -445,7 +444,7 @@ class WasteWindow(ScrolledWindow): self.ted.WEInsert(data, None, None) def send_literal_data(self, data): - data = regsub.gsub('\n', '\r', data) + data = string.replace(data, '\n', '\r') data = string.expandtabs(data) self.ted.WEInsert(data, None, None) @@ -775,6 +774,8 @@ class Wed(Application): def idle(self, event): if self.active: self.active.do_idle(event) + else: + Qd.SetCursor(Qd.qd.arrow) def newRuler(self, obj): """Insert a new ruler. Make it as wide as the window minus 2 pxls""" diff --git a/Mac/Demo/waste/swed.py b/Mac/Demo/waste/swed.py index b62fd9a..e4622da 100644 --- a/Mac/Demo/waste/swed.py +++ b/Mac/Demo/waste/swed.py @@ -34,7 +34,7 @@ class WasteWindow(ScrolledWindow): self.path = path self.name = name r = windowbounds(400, 400) - w = Win.NewWindow(r, name, 1, 0, -1, 1, 0x55555555) + w = Win.NewWindow(r, name, 1, 0, -1, 1, 0) self.wid = w vr = 0, 0, r[2]-r[0]-15, r[3]-r[1]-15 dr = (0, 0, 10240, 0) @@ -603,6 +603,8 @@ class Wed(Application): def idle(self, event): if self.active: self.active.do_idle(event) + else: + Qd.SetCursor(Qd.qd.arrow) def getfontnames(): names = [] diff --git a/Mac/Demo/waste/wed.py b/Mac/Demo/waste/wed.py index 7b40864..342d52e 100644 --- a/Mac/Demo/waste/wed.py +++ b/Mac/Demo/waste/wed.py @@ -25,7 +25,7 @@ class WasteWindow(ScrolledWindow): self.path = path self.name = name r = windowbounds(400, 400) - w = Win.NewWindow(r, name, 1, 0, -1, 1, 0x55555555) + w = Win.NewWindow(r, name, 1, 0, -1, 1, 0) self.wid = w vr = 0, 0, r[2]-r[0]-15, r[3]-r[1]-15 dr = (0, 0, 10240, 0) @@ -411,6 +411,8 @@ class Wed(Application): def idle(self, event): if self.active: self.active.do_idle(event) + else: + Qd.SetCursor(Qd.qd.arrow) def main(): App = Wed() |