Rockbox

  • Status Closed
  • Percent Complete
    100%
  • Task Type Patches
  • Category Plugins
  • Assigned To No-one
  • Operating System All players
  • Severity Low
  • Priority Very Low
  • Reported Version Daily build (which?)
  • Due in Version Undecided
  • Due Date Undecided
  • Votes
  • Private
Attached to Project: Rockbox
Opened by x - 2008-02-24
Last edited by Jonathan Gordon - 2008-05-18

FS#8637 - make disktidy files configurable

This patch makes disktidy plugin read the files/directories to clean from a configuration file.

Closed by  Jonathan Gordon
2008-05-18 07:27
Reason for closing:  Accepted
Additional comments about closing:  

any volanteers to fix the manual?

x commented on 2008-02-25 07:58

update:
- clean up
- move configuration file into the patch file

Rosso Maltese commented on 2008-02-28 16:50

Using the DAP from Gnome, there is also “/.Trash*”.

x commented on 2008-02-28 21:28

The intention for this patch is to make disktidy easily extensible. I just included the files to clean in the config file which are already in the actual disktidy.

In your case, you can just add the following lines into the ‘disktidy.cfg’ file:
<Linux>
.Trash/

Here are some explanations:
- directories are marked with an ending ‘/’ (I assume .Trash is a directory)
- all the entries have wildcards (e.g. ‘.Trash’ has the meaning of ‘.Trash*’)

x commented on 2008-03-15 22:59

update:
disktidy will create a sample cfg file if none can be found. This way the cfg doesn’t need to be included in the standard build and the user’s cfg file won’t get overwritten on every update.

Alexander Papst commented on 2008-04-21 21:29

Sync to SVN (r17210)
* Now follows the coding guidelines better
* Added the Linux introduced r17210 (and .Trash-username)

Alexander Papst commented on 2008-04-22 02:16

Sync to r17211

Use explicit Wildcards (*) instead of implicit ones.
To delete all files of the type “._random.bla” you have to add “._*” to the config file. Same goes for directories. In order to delete all gnome trash dirs add “.Trash*/”.

Updated build in config file to use explicit wildcards.

Alexander Papst commented on 2008-04-22 10:01

Oops, i misunderstood something… minor change to configuration file to remove .Trash-username/ folders and not files ;-)

Alexander Papst commented on 2008-04-22 16:19

Add “Reset Configuration File” menu point.

Robert Menes commented on 2008-04-22 17:11

Fixes warnings in compiler.

Jonathan Gordon commented on 2008-04-24 13:23

I’ve taken your customization part and made it a nicer UI (I hope :p )… so, this patch is against svn, although I really like your wildcard matching so that should get dumped into this…

disctidy is now a viewer for .dtdy files which are in the format <string>: <yes/no> where string is the filename or directory (or special type where it starts with a <). if its a directory it needs to end in /
yes/no means it should be removed.
the “Files to Clean” item now opens up a list of all the types from either the hard coded defaults, or the .dtdy. selecting any will toggle it (I’ve used the cursor icon, but not sure thats the best one).
choosing < ALL > selects all, < NONE > selects none. any of the other special ones toggles all the items untill the next header.
to exit that screen press the usual list cancel button (left arrow/previous on 99% of targets)

if that screen is changed at all you will be prompted to save the changes before exiting…

thoughts?

x commented on 2008-04-24 18:25

Nice UI!

Some remarks:
- I don’t have a MAC but without wildcard a file with the name ._ makes no sense.
- Default should be <All> selected, not none (I don’t think an ordinary user want to fuss about configuration)
- Don’t like it as a “viewer” - viewer.config is missing in your patch
- What’s the purpose of <Other>?

Jonathan Gordon commented on 2008-04-25 00:35

- I dont use mac enough to know about the ._… and the wildcard stuff will be merged in if we decide to go with this
- debatable
- why?
- its the first hunk of the patch
- to put other files under

Alexander Papst commented on 2008-04-25 03:32

Added wildcards back.

Further suggestions:
* Add a trailing “/” to directories in the “Files To Clean” menu
* Select all files by default (done in this patch too)
* Add icon infront of the < OS > items (maybe the folder one as you suggested)

Jonathan Gordon commented on 2008-05-09 02:26

SO I think the only thing holding this back is because some people dont like it acting as a viewer (which I dont undertsand?)
it never does anything automatically, the viewer part is just to load the defaults, having it show up in the open with menu isnt great, but unless we add a way to exclude plugins from that I think its fine.

Admin
Linus Nielsen Feltzing commented on 2008-05-09 08:18

I must say that I don’t really understand why it is a viewer. Could you explain?

Jonathan Gordon commented on 2008-05-10 08:46

the point of the viewer was that users could setup their windows removal file, or their mac file and then just run the plugin and not worry about making sure the correct files are removed.

this attached patch removes the viewer part and adds Desktop.ini
I think all files should default to being removed

x commented on 2008-05-12 08:28

You removed too many code lines in the last patch (disktidy.3.patch). It’s not configurable anymore (”Files to Clean” is empty → tidy_type_count is always 0) …

Eddy commented on 2008-05-13 14:45

This patch is what I’ve been waiting for, as I currently patch my disktidy to delete all the standard Sansa OF directories.

I’ve just patched with the last ‘viewer-enabled’ version (disktidy_2.patch) and I think the UI for selecting the required files is excellent. Bring back the viewer!

The only bit I don’t understand is how to have *my* hand-crafted *.dtdy file used as the default. I can browse to the file and ‘play’ it, thus starting disktidy with my settings present. However, this is in /.rockbox and therefore not intended to be browsed to by users. If I just start disktidy from the [Main] > Plugins > Applications menu, is uses the hard-coded defaults…

Jonathan Gordon commented on 2008-05-13 14:58

seems you cant… that can be put back in if the viewer part comes back

Eddy commented on 2008-05-13 15:42

I’m confused. I *was* using the viewer-enabled version (disktidy_2.patch) :P

Or were you referring to Vuong Minh’s comment about not being able to configure it at all now…?

Admin
Linus Nielsen Feltzing commented on 2008-05-14 09:22

So the viewer was there to solve the problem that the config files are located in .rockbox?

Jonathan Gordon commented on 2008-05-14 11:48

the viewer was done for 2 reasons.
1) it means that you could have different setups for different OS’ (although I’ve changed my mind and thihng thats pointless now)
2) so we can hardcode a default list which would stay updated in new builds, and would not overwrite users’ setups (the alternative was disktidy.conf and disktidy_user.conf, which may be better anyway)

Eddy commented on 2008-05-15 08:58

Despite my comments above about the viewer, the simple solution of disktidy.config and disktidy_custom.config (or whatever) would be fine. Certainly it would fit better into the existing Rockbox user interface practices.


Jonathan Gordon commented on 2008-05-15 09:53

new version..
this one loads disktidy.config (which will be part of the zip, and have every item set to not be removed), then it loads disktidy_custom.config which will add and overwrite the first config. (this way when the default one is updated the user will definatly get the new types)

any volanteers for the manual/wiki fixing?

Alexander Papst commented on 2008-05-15 19:23

changes:
* Show the tailing slashes for directories that the user knows what a dir is and what not (made sure it doesn’t save with two slashes in the end :-P)
* Some changes to the config file (one entry was a dir and one was not, added $RECYCLE.BIN/ and desktop.ini)

While adding the 2 new entries i noticed that they didn’t show up in the menu. I like the idea however. Maybe it’s easier to implement it this way that if disktidy_custom.config doesn’t exist create an empty file. When the user adds stuff to it show it under the < Other > section.

Jonathan Gordon commented on 2008-05-16 01:15

DerPapsts’ changes without breaking directory searching.
also fixed the problem with new files not being added (the actual problem was the 2nd file was overwriting the first)..

the last thing that I think is needed is for the files from the user config get merged into the defaults, not just appended which is happening now (i mean, < Windows > items from the user one should be put in the < Windows > group.

any takers?

Eddy commented on 2008-05-17 08:48

Yep, works a treat now. The only problem I found during compilation, was that the default disktidy.config was created in /rockbox, rather than /rockbox/apps/plugins which is where *make zip* was expecting to find it.

Jonathan Gordon commented on 2008-05-17 08:48

new version (hopefuly final)

items from _custom are inserted into the correct groups

Eddy commented on 2008-05-17 09:12

Has this also fixed the ?bug? that even though all files are set to ‘: no’, they get cleaned anyway?
Haven’t got time to try the latest version, but will do soon.

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing