Infocatcher / Download_Panel_Tweaker

Some tweaks for built-in download panel, restartless extension for Firefox
https://addons.mozilla.org/addon/download-panel-tweaker/
Other
9 stars 2 forks source link

Add ability to delete a finished download from disk #15

Closed LoneFenris closed 10 years ago

LoneFenris commented 10 years ago

A feature of the old Download Statusbar I tended to use a lot since I download a lot of files I only use one time. Having a way to delete them from the download panel or history is easier than opening up file manager to do it.

Infocatcher commented 10 years ago

Added Remove File From Disk context menu item. Test version: download_panel_tweaker-0.2.1pre4-fx.xpi (source).

Also see hidden preferences in about:config:

Rikk commented 10 years ago

I've updated the addon from Git, and found this change as a high dangerous thing. It can easily lead to accidental clicks ("Remove from disk" is too close to "Remove from History" and "Open folder" options) and no confirmation is displayed. Also, files are permanently deleted instead of going to Recycle Bin.

LoneFenris commented 10 years ago

It probably should have a confirmation. I see no problem with skipping the recycle bin, though as that's the behavior of the feature in other download add-ons (both the old Download Statusbar and the new).

Rikk commented 10 years ago

A confirmation is important for things doing perma-delete. Also, imo, the 'Remove ...' menu items could be better separated from "Open Cont. Folder" and go bellow it with a separator above.

Infocatcher commented 10 years ago

Also, files are permanently deleted instead of going to Recycle Bin.

Unfortunately there is no API to move files to Recycle Bin. :(

Also, imo, the 'Remove ...' menu items could be better separated from "Open Cont. Folder" and go bellow it with a separator above.

Hmm... sounds reasonable.

Thanks for feedback! I added confirmation dialog and moved menu item:

Remove From History
Open Containing Folder
----------
Remove File From Disk
----------
Go To Download Page
...
Rikk commented 10 years ago

Thanks for the changes, looks very nice.

Although this is what I thought above:

Open Containing Folder
----------
Remove From History
Remove File From Disk
----------
Go To Download Page
...

Ps: I have a suspicion that "deleting" to Recycle Bin (Trash) would be the same as moving to the folder where it is located, which I don't know how to find programmatically on Windows. (Linux should be something like /.trash)

Infocatcher commented 10 years ago
Open Containing Folder
----------
Remove From History
Remove File From Disk
----------

Makes sense... This is also doable (but may be possible issues with restoring after extension disabling/uninstalling).

Ps: I have a suspicion that "deleting" to Recycle Bin (Trash) would be the same as moving to the folder where it is located, which I don't know how to find programmatically on Windows. (Linux should be something like /.trash)

Also should be stored some data (at least original location), on Windows 7 I see D:\$RECYCLE.BIN\$I09U9UG.js // binary data D:\$RECYCLE.BIN\$R09U9UG.js // original file for deleted D:\downloadsActions.js (end even on Windows $RECYCLE.BIN was changed at least once – was something another on XP, so, probably format of additional information was changed too)

This should be possible with js-ctypes (and using native OS API, for each platform), but this is too complicated.

Infocatcher commented 10 years ago
Open Containing Folder
----------
Remove From History
Remove File From Disk
----------

Done.

Rikk commented 10 years ago

Thank you! Here it updated the menu right after updating the extension (didn't need to restart or open new window). Let's close this issue?

Infocatcher commented 10 years ago

Here it updated the menu right after updating the extension (didn't need to restart or open new window).

I mean only effect after changes of removeFile.groupWithRemoveFromHistory preference.

Let's close this issue?

Let's ask @LoneFenris :)

LoneFenris commented 10 years ago

It's cool with me. I thought you were waiting for the next release to close it. 8-)

Infocatcher commented 10 years ago

I thought you were waiting for the next release to close it. 8-)

Oh, yes, sometimes. In general because I don't test in all supported versions after each change (but more carefully test before release). And small (or not) corrections happens. :) Anyway, I planned to make release soon (but I don't like testing and don't have enough time for now).

LoneFenris commented 10 years ago

Alright, then, I'll close it. Thanks @Infocatcher !