Trash Roxapp - Discussion Document

What features/apps/bugfixes needed in a future Puppy
Message
Author
User avatar
HairyWill
Posts: 2928
Joined: Fri 26 May 2006, 23:29
Location: Southampton, UK

#31 Post by HairyWill »

disciple wrote: How much space would you actually save by archiving trashed items anyway?
I may misunderstand how the multisession system works, but I don't think if you trash a 25MB file it will take up an extra 25MB in your latest session. I think the filesystem will refer to the file in its original location in an old session. So it would only be taking up extra space when you move to a new disc. Can anyone confirm this? I think that's what you were saying Flash?
Multisession does not refer to the files stored inside the sessions, if it did it would not be possible to use the CD drive for anything else. The contents of the session directories are copied into ram. The rationale behind /archive in multisession is that files in it are not loaded into ram when puppy boots. Files stored inside /root are. If I am running multisession and I put lots of files into the trash they are all loaded into ram next boot. This is unlikely to be what the hypothetical user wants. If I edit a 25 MB video file 10 times reversioning it with a new name and dumping the old ones in the trash they will all still be stored in ram even when I reboot.

There is a reasonable amount of work involved but it would be more efficient if the trash was multisession aware. It would be nice to have an app that could search through archive in all the sessions. Even better would be a more sophisticated tool that could show which sessions any file had been revised in, nice(connected to diff?). That said, I'm still not sure how many users multisession really has so this may be unimportant.
Will
contribute: [url=http://www.puppylinux.org]community website[/url], [url=http://tinyurl.com/6c3nm6]screenshots[/url], [url=http://tinyurl.com/6j2gbz]puplets[/url], [url=http://tinyurl.com/57gykn]wiki[/url], [url=http://tinyurl.com/5dgr83]rss[/url]

disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

#32 Post by disciple »

OK, thanks for the clarification.

So we modify whatever script saves sessions so that it moves anything in the trash to the archive. Then the problem is finding what you have trashed, and we can either:
  • - move the roxapp folders for the trashed items to the archive folder, but keep some sort of index of them, so we can mount an old session to recover them, or

    - move the roxapp folders for the trashed items to the archive folder, and search the old sessions to find trashed items. This approach would mean you couldn't permanently delete an item from the trash - so if you trash a lot of things, you would have to sort through them all if you want to find something. The advantage would be that it would be simpler when you move to a new multisession disc, as you wouldn't have an index of trashed items in sessions that aren't on the current disc.
Or we could
  • - leave the roxapp folders in the trash, but archive the actual trashed items, and record in the roxapp which session they were archived in. Modify the trashed item roxapps so they know how to restore the file.
Do you know a good gtkdialog program? Please post a link here

Classic Puppy quotes

ROOT FOREVER
GTK2 FOREVER

disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

#33 Post by disciple »

I think the second of the three options would be best.
Do you know a good gtkdialog program? Please post a link here

Classic Puppy quotes

ROOT FOREVER
GTK2 FOREVER

User avatar
HairyWill
Posts: 2928
Joined: Fri 26 May 2006, 23:29
Location: Southampton, UK

#34 Post by HairyWill »

I think you are right. I don't think that you can retain a link or reference to the trashed items because you don't know until shutdown what the name of the session will be. If you tried to do that you would need to modify rc.shutdown or more likely functions4puppy to do some sort of fix when the name of the session is decided.

An additional complication is that the boot CD may not be inserted when someone tries to access the trash. You would need to take account of this.

I notice that no-one that currently uses multisession has posted here saying "yes please I really need this".
Will
contribute: [url=http://www.puppylinux.org]community website[/url], [url=http://tinyurl.com/6c3nm6]screenshots[/url], [url=http://tinyurl.com/6j2gbz]puplets[/url], [url=http://tinyurl.com/57gykn]wiki[/url], [url=http://tinyurl.com/5dgr83]rss[/url]

disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

#35 Post by disciple »

You'd just need a window that says "please insert your Puppy CD and press OK" or something.
I notice that no-one that currently uses multisession has posted here saying "yes please I really need this".
Yes, but even if there are lots of people who actually use multisession, Flash may well be the only one that knows about this conversation.

I guess nothing will happen unless someone takes it on - I'm not going to be doing anything about it anyway.
Do you know a good gtkdialog program? Please post a link here

Classic Puppy quotes

ROOT FOREVER
GTK2 FOREVER

disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

New version

#36 Post by disciple »

OK, in this version the "View summary" sorts the items in the trash by size.
I also updated the help file and made it html.

We should probably change it so the help option just opens the help file.

We still get people asking why they can't see their deleted files in the trash. I wonder if it would help to add the trash help into Puppy's main help system?... I guess it wasn't clear in the trash help before though, so hopefully the update will help :)
Attachments
Trash.tar.gz
(17.13 KiB) Downloaded 985 times
Do you know a good gtkdialog program? Please post a link here

Classic Puppy quotes

ROOT FOREVER
GTK2 FOREVER

disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

#37 Post by disciple »

There was a bug in the summary feature - it didn't display files with spaces in the path.
I've fixed that (Thanks for the help HW!), edited the help file a bit more (I made a mistake in it too), and updated the version numbering so it isn't still claiming to be version 0.1.0 from 2005 :)
Attachments
Trash-0.3.2.tar.gz
(17.41 KiB) Downloaded 989 times
Do you know a good gtkdialog program? Please post a link here

Classic Puppy quotes

ROOT FOREVER
GTK2 FOREVER

User avatar
HairyWill
Posts: 2928
Joined: Fri 26 May 2006, 23:29
Location: Southampton, UK

#38 Post by HairyWill »

I have been trying to use the Trash app symlinked from a path with spaces in it. This has identified that the $APPDIR variable is used unquoted in a few places. There were also a couple of places where the $HOME variable was preceded by a /. Here is the diff

Code: Select all

# diff Trash/AppRun AppRun 
34c34
<  aplay $APPDIR/systemmsg.wav
---
>  aplay "$APPDIR/systemmsg.wav"
44c44
< rox -x $APPDIR
---
> rox -x "$APPDIR"
52c52
< rox -x $APPDIR
---
> rox -x "$APPDIR"
101c101
< mkdir "/$HOME/.Trash/$FileName-$$"
---
> mkdir "$HOME/.Trash/$FileName-$$"
123c123
< mv "$m" "/$HOME/.Trash/$FileName-$$/Files"
---
> mv "$m" "$HOME/.Trash/$FileName-$$/Files"
134c134
< {sub("TRASH", trash); print}' $APPDIR/template/temp-AppRun > "/$HOME/.Trash/$FileName-$$/AppRun"
---
> {sub("TRASH", trash); print}' "$APPDIR/template/temp-AppRun" > "/$HOME/.Trash/$FileName-$$/AppRun"
# 

a replacement is attached
Attachments
AppRun.gz
(3 KiB) Downloaded 922 times
Will
contribute: [url=http://www.puppylinux.org]community website[/url], [url=http://tinyurl.com/6c3nm6]screenshots[/url], [url=http://tinyurl.com/6j2gbz]puplets[/url], [url=http://tinyurl.com/57gykn]wiki[/url], [url=http://tinyurl.com/5dgr83]rss[/url]

disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

#39 Post by disciple »

Ah - sorry about that :oops:
That probably came about because when I first worked on the Trash to make it work with files with spaces I didn't really know what I was doing so I quoted everything, but later on I didn't because I didn't expect anyone to put it somewhere with spaces. The space isn't in the phrase "Recycle Bin" by any chance? :)
Do you know a good gtkdialog program? Please post a link here

Classic Puppy quotes

ROOT FOREVER
GTK2 FOREVER

User avatar
HairyWill
Posts: 2928
Joined: Fri 26 May 2006, 23:29
Location: Southampton, UK

#40 Post by HairyWill »

no worries, it is easy to do, I think that apprun I posted should solve the problem
Will
contribute: [url=http://www.puppylinux.org]community website[/url], [url=http://tinyurl.com/6c3nm6]screenshots[/url], [url=http://tinyurl.com/6j2gbz]puplets[/url], [url=http://tinyurl.com/57gykn]wiki[/url], [url=http://tinyurl.com/5dgr83]rss[/url]

User avatar
HairyWill
Posts: 2928
Joined: Fri 26 May 2006, 23:29
Location: Southampton, UK

#41 Post by HairyWill »

This is a minor bug fix that patches the space problem noted above.
I have released it as a pet to make it easy to install. I will be releasing a new version of Rox_Right_Clicks soon which will depend on this.
Attachments
Trash-0.3.3.pet
(17.74 KiB) Downloaded 2396 times
Will
contribute: [url=http://www.puppylinux.org]community website[/url], [url=http://tinyurl.com/6c3nm6]screenshots[/url], [url=http://tinyurl.com/6j2gbz]puplets[/url], [url=http://tinyurl.com/57gykn]wiki[/url], [url=http://tinyurl.com/5dgr83]rss[/url]

User avatar
ttuuxxx
Posts: 11171
Joined: Sat 05 May 2007, 10:00
Location: Ontario Canada,Sydney Australia
Contact:

#42 Post by ttuuxxx »

Can't wait sounds like a plan :)
ttuuxxx
http://audio.online-convert.com/ <-- excellent site
http://samples.mplayerhq.hu/A-codecs/ <-- Codec Test Files
http://html5games.com/ <-- excellent HTML5 games :)

User avatar
L18L
Posts: 3479
Joined: Sat 19 Jun 2010, 18:56
Location: www.eussenheim.de/

bug

#43 Post by L18L »


Post Reply