Change 14932: Various fixes from Thomas Wegner
[email protected] (Chris Nandor) Fri, 1 Mar 2002 14:28:33 -0500
| Newsgroups | perl.perl5.changes.mac |
|---|---|
| Message-ID | <p05100308b8a586d4d3dc@[10.0.1.177]> |
Change 14932 by pudge@pudge-mobile on 2002/03/01 17:32:02
Various fixes from Thomas Wegner
Affected files ...
.... //depot/maint-5.6/macperl/macos/macperl/MPAppleEvents.c#5 edit
.... //depot/maint-5.6/macperl/macos/macperl/MPPreferences.c#4 edit
Differences ...
==== //depot/maint-5.6/macperl/macos/macperl/MPAppleEvents.c#5 (text) ====
Index: perl/macos/macperl/MPAppleEvents.c
--- perl/macos/macperl/MPAppleEvents.c.~1~ Fri Mar 1 10:45:06 2002
+++ perl/macos/macperl/MPAppleEvents.c Fri Mar 1 10:45:06 2002
@@ -9,6 +9,9 @@
Language : MPW C
$Log: MPAppleEvents.c,v $
+Revision 1.6 2002/03/01 04:24:59 pudge
+Various bugfixes from Thomas Wegner
+
Revision 1.5 2002/02/04 07:46:28 neeri
Empty path is ENOENT (MacPerl Bug #512351)
@@ -1790,7 +1793,7 @@
scrap = TEScrapHandle();
HLock(scrap);
theErr = AEStream_WriteDesc(&aes, typeChar, *scrap, GetHandleSize(scrap));
- HLock(scrap);
+ HUnlock(scrap);
if (theErr || (theErr = AEStream_CloseList(&aes)))
goto abortClipboard;
theErr = AEStream_Close(&aes, dataDesc);
==== //depot/maint-5.6/macperl/macos/macperl/MPPreferences.c#4 (text) ====
Index: perl/macos/macperl/MPPreferences.c
--- perl/macos/macperl/MPPreferences.c.~1~ Fri Mar 1 10:45:06 2002
+++ perl/macos/macperl/MPPreferences.c Fri Mar 1 10:45:06 2002
@@ -9,6 +9,9 @@
Language : MPW C
$Log: MPPreferences.c,v $
+Revision 1.11 2002/03/01 04:24:59 pudge
+Various bugfixes from Thomas Wegner
+
Revision 1.10 2002/01/23 05:47:48 pudge
Fix prefs file name
@@ -421,6 +424,9 @@
cell = ev->where;
GlobalToLocal(&cell);
GetDialogItem(dlg, pld_List, &kind, &h, &r);
+ // add scroll bar width to list rectangle
+ r.right = r.right + 15;
+
if (PtInRect(cell, &r)) {
if (LClick(cell, ev->modifiers, PathList))
for (SetPt(&cell, 0, 0); LGetSelect(true, &cell, PathList); ++cell.v) {
@@ -531,13 +537,15 @@
case pld_Remove:
SetPt(&cell, 0, 0);
- if (LGetSelect(true, &cell, PathList) && AppAlert(PrefLibDelID) == 1)
+ if (LGetSelect(true, &cell, PathList) && AppAlert(PrefLibDelID) == 1) {
+ // make sure the list gets redrawn correctly
+ InvalRect(&((**PathList).rView));
do {
LDelRow(1, cell.v, PathList);
--PathCount;
} while (LGetSelect(true, &cell, PathList));
-
+ }
break;
case pld_Add:
GetIndString(msg, PrefDialog, pd_AddPath);
@@ -616,8 +624,12 @@
Str255 contents;
Str63 msg;
char data[256];
+ GrafPtr savePort;
+
+ GetPort(&savePort);
envEdit = GetNewAppDialog(PrefEnvAddID);
+ SetPort(envEdit);
equals = PLstrchr(env, '=');
*equals= *env - (equals - (Ptr) env);
@@ -694,6 +706,8 @@
DisposeDialog(envEdit);
+ SetPort(savePort);
+
return result;
}
@@ -736,6 +750,9 @@
cell = ev->where;
GlobalToLocal(&cell);
GetDialogItem(dlg, pld_List, &kind, &h, &r);
+ // add scroll bar width to list rectangle
+ r.right = r.right + 15;
+
if (PtInRect(cell, &r)) {
if (LClick(cell, ev->modifiers, PathList))
for (SetPt(&cell, 0, 0); LGetSelect(true, &cell, PathList); ++cell.v) {
@@ -827,13 +844,15 @@
case ped_Remove:
SetPt(&cell, 0, 0);
- if (LGetSelect(true, &cell, PathList) && AppAlert(PrefEnvDelID) == 1)
+ if (LGetSelect(true, &cell, PathList) && AppAlert(PrefEnvDelID) == 1) {
+ // make sure the list gets redrawn correctly
+ InvalRect(&((**PathList).rView));
do {
LDelRow(1, cell.v, PathList);
--PathCount;
} while (LGetSelect(true, &cell, PathList));
-
+ }
break;
case ped_Add:
PLstrcpy(contents, "\p=");
@@ -1044,13 +1063,17 @@
Handle h;
DialogPtr prefs;
Rect bounds;
+ GrafPtr savePort;
+
+ GetPort(&savePort);
- resFile = CurResFile();
+ resFile = CurResFile();
OpenPreferences();
-
+
prefs = GetNewAppDialog(PrefDialog);
-
+ SetPort(prefs);
+
GetDialogItem(prefs, pd_LibIcon, &kind, &h, &bounds);
SetDialogItem(prefs, pd_LibIcon, kind, (Handle) &uDrawPrefIcon, &bounds);
@@ -1111,6 +1134,8 @@
DisposeHandle(gCachedLibraries);
gCachedLibraries = nil;
}
+
+ SetPort(savePort);
}
static ListHandle FontList;
@@ -1306,8 +1331,12 @@
Rect dbounds;
Str255 contents;
MenuHandle fonts;
-
+ GrafPtr savePort;
+
+ GetPort(&savePort);
+
format = GetNewAppDialog(FormatDialog);
+ SetPort(format);
GetDialogItem(format, fd_Separator, &kind, &h, &bounds);
SetDialogItem(format, fd_Separator, kind, (Handle) &uSeparator, &bounds);
@@ -1433,5 +1462,7 @@
DisposeDialog(format);
DisposeMenu(fonts);
+ SetPort(savePort);
+
return (item == fd_OK);
}
End of Patch.