mirror of
https://github.com/sheumann/DiskBrowser.git
synced 2024-11-21 22:31:13 +00:00
Indicate if no results are found for a query.
This commit is contained in:
parent
716df24211
commit
d615b32431
@ -46,6 +46,9 @@ Word myUserID;
|
|||||||
/* String for "More Results" (used to identify that list entry) */
|
/* String for "More Results" (used to identify that list entry) */
|
||||||
char moreResultsString[] = " <More Results>";
|
char moreResultsString[] = " <More Results>";
|
||||||
|
|
||||||
|
/* String to indicate no results were found */
|
||||||
|
char noResultsString[] = " No Disks Found";
|
||||||
|
|
||||||
/***/
|
/***/
|
||||||
|
|
||||||
static char menuTitle[] = "\pArchive.org Disk Browser\xC9";
|
static char menuTitle[] = "\pArchive.org Disk Browser\xC9";
|
||||||
|
@ -46,6 +46,9 @@ extern struct diskListEntry *diskList;
|
|||||||
/* String for "More Results" (used to identify that list entry) */
|
/* String for "More Results" (used to identify that list entry) */
|
||||||
extern char moreResultsString[];
|
extern char moreResultsString[];
|
||||||
|
|
||||||
|
/* String to indicate no results were found */
|
||||||
|
extern char noResultsString[];
|
||||||
|
|
||||||
/* Do we want to open a window with disk contents? Counts down until ready. */
|
/* Do we want to open a window with disk contents? Counts down until ready. */
|
||||||
extern int wantToOpenWindow;
|
extern int wantToOpenWindow;
|
||||||
|
|
||||||
|
13
diskmount.c
13
diskmount.c
@ -41,15 +41,18 @@ void DoMount(void) {
|
|||||||
char *filesURL = NULL;
|
char *filesURL = NULL;
|
||||||
enum NetDiskError result = 0;
|
enum NetDiskError result = 0;
|
||||||
json_value *filesJSON = NULL;
|
json_value *filesJSON = NULL;
|
||||||
|
|
||||||
WaitCursor();
|
|
||||||
|
|
||||||
if (itemNumber == 0) {
|
if (itemNumber == 0) {
|
||||||
// shouldn't happen
|
// shouldn't happen
|
||||||
result = 1;
|
return;
|
||||||
goto errorReturn;
|
|
||||||
}
|
}
|
||||||
itemNumber--;
|
itemNumber--;
|
||||||
|
|
||||||
|
if (diskList[itemNumber].memPtr == noResultsString) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
WaitCursor();
|
||||||
|
|
||||||
if (diskList[itemNumber].memPtr == moreResultsString) {
|
if (diskList[itemNumber].memPtr == moreResultsString) {
|
||||||
DoSearch(true);
|
DoSearch(true);
|
||||||
|
@ -40,6 +40,7 @@ static boolean processDoc(json_value *docObj);
|
|||||||
static char *EncodeQueryString(char *queryString);
|
static char *EncodeQueryString(char *queryString);
|
||||||
|
|
||||||
struct diskListEntry moreResultsEntry = {moreResultsString , 0, "", ""};
|
struct diskListEntry moreResultsEntry = {moreResultsString , 0, "", ""};
|
||||||
|
struct diskListEntry noResultsEntry = {noResultsString , 0x60, "", ""};
|
||||||
|
|
||||||
static void InsertDiskListEntry(struct diskListEntry *entry);
|
static void InsertDiskListEntry(struct diskListEntry *entry);
|
||||||
|
|
||||||
@ -154,6 +155,10 @@ void DoSearch(boolean getMore) {
|
|||||||
MakeThisCtlTarget(disksListHandle);
|
MakeThisCtlTarget(disksListHandle);
|
||||||
CallCtlDefProc(disksListHandle, ctlChangeTarget, 0);
|
CallCtlDefProc(disksListHandle, ctlChangeTarget, 0);
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
InsertDiskListEntry(&noResultsEntry);
|
||||||
|
NewList2(NULL, 1, (Ref) diskList, refIsPointer,
|
||||||
|
diskListLength, (Handle)disksListHandle);
|
||||||
}
|
}
|
||||||
|
|
||||||
free(searchURL);
|
free(searchURL);
|
||||||
|
Loading…
Reference in New Issue
Block a user