mirror of
https://github.com/sheumann/DiskBrowser.git
synced 2024-11-28 22:50:23 +00:00
Only allow disks list to be target when it's active.
This commit is contained in:
parent
44d02d36e1
commit
b3b9eea27e
@ -152,6 +152,8 @@ boolean DoLEEdit (int editAction) {
|
||||
|
||||
/* Do a search */
|
||||
void DoSearch(void) {
|
||||
CtlRecHndl disksListHandle;
|
||||
|
||||
for (int i = 0; i < DISK_LIST_LENGTH; i++) {
|
||||
diskList[i].memPtr = "This is the title of some disk you could mount";
|
||||
diskList[i].memFlag = 0;
|
||||
@ -159,6 +161,19 @@ void DoSearch(void) {
|
||||
|
||||
NewList2(NULL, 1, (Ref) diskList, refIsPointer,
|
||||
DISK_LIST_LENGTH, (Handle) GetCtlHandleFromID(window, disksList));
|
||||
|
||||
disksListHandle = GetCtlHandleFromID(window, disksList);
|
||||
SetCtlMoreFlags(
|
||||
GetCtlMoreFlags(disksListHandle) | fCtlCanBeTarget | fCtlWantEvents,
|
||||
disksListHandle);
|
||||
HiliteControl(noHilite, disksListHandle);
|
||||
HiliteControl(noHilite, GetCtlHandleFromID(window, mountDiskButton));
|
||||
|
||||
ShowControl(GetCtlHandleFromID(window, previousPageButton));
|
||||
ShowControl(GetCtlHandleFromID(window, pageText));
|
||||
ShowControl(GetCtlHandleFromID(window, pageNumberLine));
|
||||
ShowControl(GetCtlHandleFromID(window, ofPagesText));
|
||||
ShowControl(GetCtlHandleFromID(window, nextPageButton));
|
||||
}
|
||||
|
||||
/* Handle an event after TaskMasterDA processing */
|
||||
@ -294,6 +309,15 @@ void ShowBrowserWindow(void) {
|
||||
sysWindRecord.eventMask = 0xFFFF; //0x03FF;
|
||||
sysWindRecord.memoryID = myUserID;
|
||||
auxWindInfo->NDASysWindPtr = (Ptr)&sysWindRecord;
|
||||
|
||||
HiliteControl(inactiveHilite, GetCtlHandleFromID(window, disksList));
|
||||
HiliteControl(inactiveHilite, GetCtlHandleFromID(window, mountDiskButton));
|
||||
|
||||
HideControl(GetCtlHandleFromID(window, previousPageButton));
|
||||
HideControl(GetCtlHandleFromID(window, pageText));
|
||||
HideControl(GetCtlHandleFromID(window, pageNumberLine));
|
||||
HideControl(GetCtlHandleFromID(window, ofPagesText));
|
||||
HideControl(GetCtlHandleFromID(window, nextPageButton));
|
||||
|
||||
cleanup:
|
||||
if (resourceFileOpened && !windowOpened) {
|
||||
|
@ -126,7 +126,7 @@ resource rControlTemplate (disksList) {
|
||||
{45, 10, 147, 410}, /* control rect */
|
||||
ListControl {{
|
||||
$0007, /* flags */
|
||||
$7400, /* more flags */
|
||||
$1400, /* more flags */
|
||||
0, /* refcon */
|
||||
0, /* list size */
|
||||
10, /* List View */
|
||||
|
Loading…
Reference in New Issue
Block a user