aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2020-10-18Add READMEHEADv1.0masterTeddy Wing
Include a quick demo screen recording.
2020-10-17Add license (GNU GPLv3+)Teddy Wing
2020-10-13DropZone.m: Don't start server if more than one item is dragged inTeddy Wing
Forgot to return here to exit when more than one file is dragged onto the drop zone.
2020-10-13AppDelegate.m: Terminate after window is closedTeddy Wing
The application only has one window, and it doesn't really work if that window is closed. Also remove the unused `applicationDidFinishLaunching:` delegate method.
2020-10-11Server: Ensure the process is terminated before starting a new oneTeddy Wing
Just in case. Was getting a runtime exception occasionally and am still not entirely sure why. It happened in the `[Server stop]` call. Also check if the process is running before terminating it. Didn't read about whether we're required to do this, but it seemed logical.
2020-10-11MainMenu.xib: Don't resize the window when path is longTeddy Wing
Previously, when the file path of the folder being served was long, it would resize the window to fit the path. Prevent resizing, and truncate the path label so that it truncates the beginning of the path and keeps the end. Thanks to Stephan (https://stackoverflow.com/users/565336/stephan) on Stack Overflow for the tip about setting > Content Compression Resistance Priority of the NSTextView less than > NSLayoutPriorityWindowSizeStayPut (e.g. 499). Otherwise your > NSTextView will not truncate its content. (https://stackoverflow.com/questions/4171465/truncate-nstextview/13977990#13977990)
2020-10-11Retab filesTeddy Wing
Use consistent indentation. Looks like I've been using tabs here, so change everything to tabs. Some code was generated at the start of the project, or I copied it from Apple reference documents, or it was inserted from an Xcode snippet.
2020-10-11Server(stop): Use `NSTask terminate` instead of `interrupt`Teddy Wing
Noticed that sometimes the server wasn't stopped when it should have been. Thought maybe I should use `terminate` instead of `interrupt` to be sure that the process exits.
2020-10-10Reduce sleep before opening page in browser to 0.5 secondsTeddy Wing
There's a noticeable delay with one second.
2020-10-10Sleep for one second before opening the served page in the browserTeddy Wing
Saw during testing that the browser could try to load the page before the server had started up.
2020-10-10MainMenu.xib: Make folder path label small and boldTeddy Wing
Allow more space for the path.
2020-10-10Server(stop): Deallocate `_process`Teddy Wing
Forgot to free the process after interrupting it.
2020-10-10Open served URL in the default browserTeddy Wing
2020-10-10MainMenu.xib: Remove unused menusTeddy Wing
2020-10-10MainMenu.xib: Make URL label selectableTeddy Wing
2020-10-10StatusView.m: Hide the status section when "Stop" button is clickedTeddy Wing
Provides visual feedback that the server has stopped (or should have stopped).
2020-10-10Add a label to the window to show server statusTeddy Wing
Indicate that the server is running. Show what path it's serving from , what URL it's serving on, and a button to stop the server.
2020-10-10Start a Python SimpleHTTPServer in dropped file directoryTeddy Wing
When a file or directory is dropped on the drop zone, start a Python SimpleHTTPServer from that directory. Ensure the server is terminated when the Drop Serve application quits.
2020-10-10DropZone: Exit drop handler if the dropped file doesn't existTeddy Wing
2020-10-10DropZone.m: If dropped file is not a directory, get dirname of fileTeddy Wing
2020-10-10DropZone: Only accept a single dragged file/folderTeddy Wing
Show an error message in a label in the drop zone if more than one is dropped.
2020-10-10DropZone.m: Require a directory to be draggedTeddy Wing
2020-10-10Add drag and drop areaTeddy Wing
Allow dragging and dropping files. Based on: - https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/DragandDrop/Tasks/acceptingdrags.html#//apple_ref/doc/uid/20000993-BABHHIHC - https://developer.apple.com/library/archive/samplecode/CocoaDragAndDrop/Introduction/Intro.html#//apple_ref/doc/uid/DTS10000384-Intro-DontLinkElementID_2
2020-10-10MainMenu.xib: Prevent resizing on main windowTeddy Wing
2020-10-10MainMenu.xib: Add a drop zone to the main windowTeddy Wing
2020-10-10Change deployment target to 10.6Teddy Wing
2020-10-10New Xcode 4.5.2 projectTeddy Wing