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
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) {
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);
Str255 contents;
Str63 msg;
char data[256];
+ GrafPtr savePort;
+
+ GetPort(&savePort);
envEdit = GetNewAppDialog(PrefEnvAddID);
+ SetPort(envEdit);
equals = PLstrchr(env, '=');
*equals= *env - (equals - (Ptr) env);
DisposeDialog(envEdit);
+ SetPort(savePort);
+
return result;
}
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) {
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=");
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);
DisposeHandle(gCachedLibraries);
gCachedLibraries = nil;
}
+
+ SetPort(savePort);
}
static ListHandle FontList;
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);
DisposeDialog(format);
DisposeMenu(fonts);
+ SetPort(savePort);
+
return (item == fd_OK);
}