Commit Graph

45 Commits

Author SHA1 Message Date
Stephen Heumann
87cf5483a3 Recognize some disk image types based on extension.
This eliminates any possibility of mounting "do" or "po" images with the opposite segment order from what the extension specifies (although that was pretty unlikely anyway).

We also now give an error message for the unsupported "woz" and "nib" formats.
2019-07-15 02:25:59 -05:00
Stephen Heumann
31ef70e9c1 Add LICENSE file. 2019-07-05 23:02:06 -05:00
Stephen Heumann
7779776e80 Properly highlight the window when bringing it to the front.
This can happen if our extras menu item is selected when the window is already open but not at the front. Previously, it would come to the front but the highlighting would not update to make it look active.
2019-04-20 18:45:28 -05:00
Stephen Heumann
d615b32431 Indicate if no results are found for a query. 2019-04-19 21:37:58 -05:00
Stephen Heumann
716df24211 Restore ability to use a blank query to show all disks.
This was broken by the change to parenthesize the query. Now that is done only when the query is not blank.
2019-04-19 21:32:20 -05:00
Stephen Heumann
c7968ecb69 Bump up page size to 50.
This seems like a reasonable trade-off between speed of retrieving one page and number of pages needed to see lots of results. Many specific searches will return fewer results than this anyway.
2019-04-19 21:16:49 -05:00
Stephen Heumann
c963529943 Automatically connect to the network before doing a search. 2019-04-19 18:22:57 -05:00
Stephen Heumann
d25ac1395b Add rVersion resource. 2019-04-19 17:54:58 -05:00
Stephen Heumann
e2b2305b10 Improved clean-up code.
This shouldn't ordinarily make any difference, but it may help to ensure things are correctly handled in some corner cases.
2019-04-19 17:17:09 -05:00
Stephen Heumann
36e9f1ab0d Parenthesize user-entered search term.
This seems to avoid some strange behavior for OR queries.
2019-04-19 17:15:32 -05:00
Stephen Heumann
7d6d432ff1 Always allow any disk image format. 2019-04-19 17:14:01 -05:00
Stephen Heumann
c3de6f0588 Give more meaningful error messages. 2019-04-19 00:58:39 -05:00
Stephen Heumann
dcb6aa4d6b 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.
2019-04-18 23:50:57 -05:00
Stephen Heumann
ea2f3794ca Use regular "titleSorter" rather than "titleSorterRaw".
As far as I can tell, the difference is that this way will sort titles starting with a given letter together, regardless of case.
2019-04-18 23:36:53 -05:00
Stephen Heumann
5ba69db3f2 Fix issues resulting in memory trashing if over ~2500 entries were loaded.
This resulted from indexing off a pointer with signed int index values, which in some cases causes ORCA/C to generate code that only works within 32k bytes of the pointer base. The fix is to use unsigned index values, which results in indexing working correctly up to 64k bytes.
2019-04-18 23:20:51 -05:00
Stephen Heumann
ef301fd7fc Add support for fetching more results. 2019-04-18 22:58:57 -05:00
Stephen Heumann
567c60040e Allow double-clicking on disks in the list to mount them. 2019-04-18 18:03:17 -05:00
Stephen Heumann
b24c43f97b Use a lined title bar. 2019-04-18 13:27:30 -05:00
Stephen Heumann
999b6130a4 Rearrange/refactor DiskBrowser code into smaller, more focused files.
There are only a few minor code changes, and nothing that should have an effect on functionality. This is basically just rearranging the code.
2019-04-18 13:24:43 -05:00
Stephen Heumann
28e1125207 Open up the Finder window for the new disk after it has been mounted.
We have to wait through two cycles of the Finder's event loop before asking for it to be opened. Doing it earlier may cause the Finder to crash, presumably because it hasn't registered that a new disk has been inserted and updated its internal data structures accordingly.
2019-04-17 22:17:19 -05:00
Stephen Heumann
d9186312ce Initial working support for mounting disks. 2019-04-17 20:11:49 -05:00
Stephen Heumann
15931f20a2 Switch back to using single buttons, and draw our own outlines around them.
This provides a less flickery display, and arguably cleaner code. The outlines should perfectly match the look of the stock "default" buttons, although obviously this wouldn't work right if their design was ever changed.
2019-04-17 16:55:36 -05:00
Stephen Heumann
ec309557b5 Switch the default button based on the target control.
This currently works by actually having two different controls for each button.
2019-04-16 22:58:46 -05:00
Stephen Heumann
048f421af2 Remove controls for paging through disks.
The plan is to allow loading more results into the list instead.
2019-04-16 14:35:07 -05:00
Stephen Heumann
aea01b7721 Ask archive.org to sort the results by title.
This should give more consistent results if queried multiple times (which will be useful once we allow loading more results), and cause multi-disk series to appear together. It should also make the keyboard binding for the list control work more sensibly.
2019-04-16 14:26:24 -05:00
Stephen Heumann
89fc68783f Add .gitignore file. 2019-04-15 19:52:25 -05:00
Stephen Heumann
37b26592d0 Work around Marinetti bug 57.
This could cause Marinetti to return more data than it should, starting with valid data but then including corrupt data.

The workaround I'm using is to have Marinetti return a new handle and then copy the data out of it, using the size of the handle as the true size of the data that was read. Because of details of how Marinetti works, that size is correct.
2019-04-15 19:50:36 -05:00
Stephen Heumann
5d59a9d032 Percent-encode query string. Also, display basic error messages. 2019-04-14 19:36:01 -05:00
Stephen Heumann
827dc6fefe Search for disks based on the query string. 2019-04-14 13:15:29 -05:00
Stephen Heumann
19b00980c9 Add some clean-up code. 2019-04-14 01:46:16 -05:00
Stephen Heumann
990ea5fe97 Ignore garbage data after the json object.
This should work around an issue (possible Marinetti bug?) where a portion of the beginning of the response could be erroneously repeated at the end of it.
2019-04-14 01:34:06 -05:00
Stephen Heumann
9f245a3f79 Parse and display the list of disks. 2019-04-13 23:25:02 -05:00
Stephen Heumann
72411079f9 Initial code for fetching a JSON disk list from archive.org. 2019-04-13 15:32:13 -05:00
Stephen Heumann
1e1977bc0f HTTP tweaks and test program.
I switched to using HTTP/1.0 for now to prevent the server from sending chunked transfer-encoding, which this code currently doesn't support.
2019-04-13 12:57:35 -05:00
Stephen Heumann
c0949b2efb Rename test to jsontest. 2019-04-13 00:32:40 -05:00
Stephen Heumann
c237bd661f Add utility code for HTTP connections, URLs, and networking.
This is adapted from NetDisk with minor changes.
2019-04-12 23:23:39 -05:00
Stephen Heumann
eaff2fdc42 Add Makefile (for use with Golden Gate). 2019-04-12 19:39:22 -05:00
Stephen Heumann
8c7ef2e331 Check for presence of NetDisk and Marinetti, and bail out if they're missing. 2019-04-12 19:38:46 -05:00
Stephen Heumann
b3b9eea27e Only allow disks list to be target when it's active. 2019-04-11 18:28:05 -05:00
Stephen Heumann
44d02d36e1 More event processing and tweaks to controls. 2019-04-11 14:40:12 -05:00
Stephen Heumann
f862c2bef8 Cut/copy/paste support and small tweaks to controls. 2019-04-11 00:50:38 -05:00
Stephen Heumann
5a7e0de0d1 Set things up so that events on the window are handled similarly to an NDA.
At this point, the controls in the window are active (but do nothing), and the window can be closed.
2019-04-10 22:07:37 -05:00
Stephen Heumann
93dcee6313 Initial version of disk browser FExt, with basic UI. 2019-04-10 18:20:57 -05:00
Stephen Heumann
07472f7391 Utility functions and test program for JSON processing. 2019-04-10 15:30:40 -05:00
Stephen Heumann
20345b436d JSON parsing code.
This is code from https://github.com/udp/json-parser (by James McLaughlin et al.), with some small modifications.
2019-04-10 15:29:15 -05:00