mirror of
https://github.com/sheumann/DiskBrowser.git
synced 2024-12-21 20:29:17 +00:00
Make clicking the radio buttons switch focus back to the search line.
This means that pressing return will do a new search with the new settings.
This commit is contained in:
parent
ea2f3794ca
commit
dcb6aa4d6b
@ -27,6 +27,9 @@
|
||||
/* Task record used for TaskMasterDA */
|
||||
static WmTaskRec taskRec;
|
||||
|
||||
/* Search line control */
|
||||
static CtlRecHndl searchLineHandle;
|
||||
|
||||
static void HandleEvent(int eventCode, WmTaskRec *taskRec);
|
||||
static boolean DoLEEdit (int editAction);
|
||||
|
||||
@ -91,6 +94,13 @@ static void HandleEvent(int eventCode, WmTaskRec *taskRec) {
|
||||
DoMount();
|
||||
break;
|
||||
|
||||
case forIIGSRadio:
|
||||
case forAnyAppleIIRadio:
|
||||
if (FindTargetCtl() != searchLineHandle) {
|
||||
MakeThisCtlTarget(searchLineHandle);
|
||||
}
|
||||
break;
|
||||
|
||||
case disksList:
|
||||
if (taskRec->what == mouseDownEvt) {
|
||||
if (taskRec->wmClickCount == 2) {
|
||||
@ -160,5 +170,6 @@ static boolean DoLEEdit (int editAction) {
|
||||
|
||||
void InitEventState(void) {
|
||||
memset(&taskRec, sizeof(taskRec), 0);
|
||||
searchLineHandle = GetCtlHandleFromID(window, searchLine);
|
||||
}
|
||||
|
||||
|
@ -104,6 +104,8 @@ void ShowBrowserWindow(void) {
|
||||
sysWindRecord.memoryID = myUserID;
|
||||
auxWindInfo->NDASysWindPtr = (Ptr)&sysWindRecord;
|
||||
|
||||
InitEventState();
|
||||
|
||||
disksListHandle = GetCtlHandleFromID(window, disksList);
|
||||
mountButtonHandle = GetCtlHandleFromID(window, mountDiskButton);
|
||||
searchButtonHandle = GetCtlHandleFromID(window, searchButton);
|
||||
@ -118,8 +120,6 @@ void ShowBrowserWindow(void) {
|
||||
|
||||
moreResultsSelected = false;
|
||||
|
||||
InitEventState();
|
||||
|
||||
diskList = malloc(DISK_LIST_MAX_LENGTH * sizeof(*diskList));
|
||||
if (diskList == NULL) {
|
||||
CloseWindow(window);
|
||||
|
@ -41,7 +41,7 @@ enum NetDiskError {
|
||||
NOT_MULTIPLE_OF_BLOCK_SIZE,
|
||||
NOT_SPECIFIED_IMAGE_TYPE,
|
||||
|
||||
/* Errors related to proccessing JSON result in the disk browser */
|
||||
/* Errors related to processing JSON result in the disk browser */
|
||||
JSON_PARSING_ERROR = 900,
|
||||
NOT_EXPECTED_CONTENTS,
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user