mirror of
https://github.com/sheumann/DiskBrowser.git
synced 2024-11-21 22:31:13 +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 */
|
/* Task record used for TaskMasterDA */
|
||||||
static WmTaskRec taskRec;
|
static WmTaskRec taskRec;
|
||||||
|
|
||||||
|
/* Search line control */
|
||||||
|
static CtlRecHndl searchLineHandle;
|
||||||
|
|
||||||
static void HandleEvent(int eventCode, WmTaskRec *taskRec);
|
static void HandleEvent(int eventCode, WmTaskRec *taskRec);
|
||||||
static boolean DoLEEdit (int editAction);
|
static boolean DoLEEdit (int editAction);
|
||||||
|
|
||||||
@ -91,6 +94,13 @@ static void HandleEvent(int eventCode, WmTaskRec *taskRec) {
|
|||||||
DoMount();
|
DoMount();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case forIIGSRadio:
|
||||||
|
case forAnyAppleIIRadio:
|
||||||
|
if (FindTargetCtl() != searchLineHandle) {
|
||||||
|
MakeThisCtlTarget(searchLineHandle);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
case disksList:
|
case disksList:
|
||||||
if (taskRec->what == mouseDownEvt) {
|
if (taskRec->what == mouseDownEvt) {
|
||||||
if (taskRec->wmClickCount == 2) {
|
if (taskRec->wmClickCount == 2) {
|
||||||
@ -160,5 +170,6 @@ static boolean DoLEEdit (int editAction) {
|
|||||||
|
|
||||||
void InitEventState(void) {
|
void InitEventState(void) {
|
||||||
memset(&taskRec, sizeof(taskRec), 0);
|
memset(&taskRec, sizeof(taskRec), 0);
|
||||||
|
searchLineHandle = GetCtlHandleFromID(window, searchLine);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -103,7 +103,9 @@ void ShowBrowserWindow(void) {
|
|||||||
sysWindRecord.eventMask = 0xFFFF; //0x03FF;
|
sysWindRecord.eventMask = 0xFFFF; //0x03FF;
|
||||||
sysWindRecord.memoryID = myUserID;
|
sysWindRecord.memoryID = myUserID;
|
||||||
auxWindInfo->NDASysWindPtr = (Ptr)&sysWindRecord;
|
auxWindInfo->NDASysWindPtr = (Ptr)&sysWindRecord;
|
||||||
|
|
||||||
|
InitEventState();
|
||||||
|
|
||||||
disksListHandle = GetCtlHandleFromID(window, disksList);
|
disksListHandle = GetCtlHandleFromID(window, disksList);
|
||||||
mountButtonHandle = GetCtlHandleFromID(window, mountDiskButton);
|
mountButtonHandle = GetCtlHandleFromID(window, mountDiskButton);
|
||||||
searchButtonHandle = GetCtlHandleFromID(window, searchButton);
|
searchButtonHandle = GetCtlHandleFromID(window, searchButton);
|
||||||
@ -118,8 +120,6 @@ void ShowBrowserWindow(void) {
|
|||||||
|
|
||||||
moreResultsSelected = false;
|
moreResultsSelected = false;
|
||||||
|
|
||||||
InitEventState();
|
|
||||||
|
|
||||||
diskList = malloc(DISK_LIST_MAX_LENGTH * sizeof(*diskList));
|
diskList = malloc(DISK_LIST_MAX_LENGTH * sizeof(*diskList));
|
||||||
if (diskList == NULL) {
|
if (diskList == NULL) {
|
||||||
CloseWindow(window);
|
CloseWindow(window);
|
||||||
|
@ -41,7 +41,7 @@ enum NetDiskError {
|
|||||||
NOT_MULTIPLE_OF_BLOCK_SIZE,
|
NOT_MULTIPLE_OF_BLOCK_SIZE,
|
||||||
NOT_SPECIFIED_IMAGE_TYPE,
|
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,
|
JSON_PARSING_ERROR = 900,
|
||||||
NOT_EXPECTED_CONTENTS,
|
NOT_EXPECTED_CONTENTS,
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user