From 048f421af2142fc10d141462b4f4b5cd8046d5ea Mon Sep 17 00:00:00 2001 From: Stephen Heumann Date: Tue, 16 Apr 2019 14:35:07 -0500 Subject: [PATCH] Remove controls for paging through disks. The plan is to allow loading more results into the list instead. --- diskbrowser.c | 32 +++--------------- diskbrowser.rez | 86 +------------------------------------------------ 2 files changed, 5 insertions(+), 113 deletions(-) diff --git a/diskbrowser.c b/diskbrowser.c index 4e91d90..329864e 100644 --- a/diskbrowser.c +++ b/diskbrowser.c @@ -42,12 +42,7 @@ char finderRequestName[] = "\pApple~Finder~"; #define forIIGSRadio 1005 #define forAnyAppleIIRadio 1006 #define disksList 1007 -#define previousPageButton 1008 -#define pageText 1009 -#define pageNumberLine 1010 -#define ofPagesText 1011 -#define nextPageButton 1012 -#define mountDiskButton 1013 +#define mountDiskButton 1008 #define searchErrorAlert 3000 @@ -168,7 +163,7 @@ boolean DoLEEdit (int editAction) { SetPort(window); ctl = FindTargetCtl(); id = GetCtlID(ctl); - if ((id == searchLine) || (id == pageNumberLine)) { + if (id == searchLine) { LEFromScrap(); switch (editAction) { case cutAction: @@ -188,7 +183,7 @@ boolean DoLEEdit (int editAction) { }; }; SetPort(port); - return ((id == searchLine) || (id == pageNumberLine)); + return (id == searchLine); } boolean processDoc(json_value *docObj) { @@ -356,12 +351,6 @@ void DoSearch(void) { disksListHandle); HiliteCtlByID(noHilite, window, mountDiskButton); - ShowControl(GetCtlHandleFromID(window, previousPageButton)); - ShowControl(GetCtlHandleFromID(window, pageText)); - ShowControl(GetCtlHandleFromID(window, pageNumberLine)); - ShowControl(GetCtlHandleFromID(window, ofPagesText)); - ShowControl(GetCtlHandleFromID(window, nextPageButton)); - free(searchURL); EndTCPConnection(&sess); InitCursor(); @@ -392,14 +381,7 @@ void HandleEvent(int eventCode, WmTaskRec *taskRec) { case forAnyAppleIIRadio: gsDisksOnly = false; break; - - case previousPageButton: - //TODO - break; - case nextPageButton: - //TODO - break; - + case mountDiskButton: // TODO break; @@ -513,12 +495,6 @@ void ShowBrowserWindow(void) { HiliteCtlByID(inactiveHilite, window, disksList); HiliteCtlByID(inactiveHilite, 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) { diff --git a/diskbrowser.rez b/diskbrowser.rez index 6abcd79..cb7a1ba 100644 --- a/diskbrowser.rez +++ b/diskbrowser.rez @@ -8,12 +8,7 @@ #define forIIGSRadio 1005 #define forAnyAppleIIRadio 1006 #define disksList 1007 -#define previousPageButton 1008 -#define pageText 1009 -#define pageNumberLine 1010 -#define ofPagesText 1011 -#define nextPageButton 1012 -#define mountDiskButton 1013 +#define mountDiskButton 1008 resource rWindParam1 (winDiskBrowser) { fTitle+fClose+fFlex+fMove+fVis, /* wFrameBits */ @@ -36,11 +31,6 @@ resource rWindParam1 (winDiskBrowser) { resource rControlList (winDiskBrowser) {{ mountDiskButton, - previousPageButton, - pageText, - pageNumberLine, - ofPagesText, - nextPageButton, disksList, findDisksForText, forIIGSRadio, @@ -139,80 +129,6 @@ resource rControlTemplate (disksList) { }}; }; -resource rControlTemplate (previousPageButton) { - previousPageButton, - {150, 10, 161, 34}, - SimpleButtonControl {{ - 0, - $1000+RefIsResource, - 0, - previousPageButton, - 0, /* color table ref */ - {"","",0,0} /* key equivalent */ - }}; -}; - -resource rPString(previousPageButton) { "<" }; - -resource rControlTemplate (pageText) { - pageText, /* control ID */ - {151, 38, 163, 90}, /* control rect */ - statTextControl {{ - fBlastText, /* flags */ - $1000+RefIsResource, /* moreFlags */ - 0, /* refCon */ - pageText /* title ref */ - }}; -}; - -resource rTextForLETextBox2 (pageText) { - "Page" -}; - -resource rControlTemplate (pageNumberLine) { - pageNumberLine, - {149, 72, 162, 116}, - editLineControl {{ - 0, - $7000+RefIsResource, - 0, - 4, /* max size */ - pageNumberLine /* text ref */ - }}; -}; - -resource rPString (pageNumberLine) { "" }; - -resource rControlTemplate (ofPagesText) { - ofPagesText, /* control ID */ - {151, 119, 163, 170}, /* control rect */ - statTextControl {{ - fBlastText, /* flags */ - $1000+RefIsResource, /* moreFlags */ - 0, /* refCon */ - ofPagesText /* title ref */ - }}; -}; - -resource rTextForLETextBox2 (ofPagesText) { - " " -}; - -resource rControlTemplate (nextPageButton) { - nextPageButton, - {150, 168, 161, 192}, - SimpleButtonControl {{ - 0, - $1000+RefIsResource, - 0, - nextPageButton, - 0, /* color table ref */ - {"","",0,0} /* key equivalent */ - }}; -}; - -resource rPString(nextPageButton) { ">" }; - resource rControlTemplate (mountDiskButton) { mountDiskButton, {152, 305, 0, 0},