wail icon indicating copy to clipboard operation
wail copied to clipboard

Handle drag-and-drop of WARC files onto WAIL gracefully and intuitively

Open machawk1 opened this issue 11 years ago • 7 comments

An example might be to ask the user if they want the WARCs moved/copied to the archives folder, replay immediately in a certain engine, recrawl the URIs in the WARCs, etc.

machawk1 avatar Jul 30 '14 19:07 machawk1

This is looking doubtful with pyinstaller compilation but works via sys.args with other builders. There's an outstanding bug/feature request for getting wxwidgets to forward the data over to pyinstaller to relay to the compiled code. A primary objective ought to be first to get the system to recognize WAIL as droppable.

machawk1 avatar Jul 30 '14 21:07 machawk1

As of version 3.0, Pyinstaller allows direct specification of the Info.plist file ( http://pythonhosted.org/PyInstaller/#adding-files-to-the-bundle ). Within this file, CFBundleDocumentTypes can be specified to include WARC, ARC, and WARC.GZ (any others?) for drag-and-drop support. Hooks within WAIL will need to handle these functions.

machawk1 avatar Oct 05 '15 16:10 machawk1

Drag-and-drop functionality once an application is running is dependent on https://github.com/pyinstaller/pyinstaller/issues/1309 .

machawk1 avatar Dec 01 '15 01:12 machawk1

There are still too many steps required to go from a user having a WARC to get it replayed. Drag-and-drop onto the icon might help the case for this.

screen shot 2017-11-15 at 3 50 04 pm

machawk1 avatar Nov 15 '17 20:11 machawk1

warc file type are draggable on both the dock icon and the Finder icon, however, the WAIL icon is black, so the "highlight" effect is not apparent. Removing the icon in the compilation process causing the default system .app icon makes this apparent.

machawk1 avatar Nov 16 '17 04:11 machawk1

Per https://github.com/pyinstaller/pyinstaller/pull/2219 it looks like the event that should be invoked when the app is running is not done so when a file is drug onto the .app. This is an external dependency on pyinstaller.

We may want to add drop support onto the UI to supplement the drag-when-not-open (which we can read on first-run) and maybe possibly invoke some context menu on the dock icon when it is running to provide the user a more intuitive option than doing nothing.

machawk1 avatar Nov 16 '17 04:11 machawk1

Some pointers in "Making your Application a Drop Target for Files": https://wiki.wxpython.org/Optimizing%20for%20Mac%20OS%20X

Some restructuring, maybe introducing a WAIL class would allow the current initialization code (below) to be able to reuse the methods describe in the above link.

if __name__ == "__main__":
    app = wx.App(redirect=False)
    mainAppWindow = TabController()
    mainAppWindow.ensureCorrectInstallation()
    mainAppWindow.Show()

    app.MainLoop()

machawk1 avatar Jan 21 '19 18:01 machawk1