"Projects" plugin has misleading delete functions

Report Bugs Here

"Projects" plugin has misleading delete functions

Postby fberger » Thu Dec 13, 2012 4:31 pm

I just wanted to remove a project from the list of projects of the "Projects" plugin.

So I right-clicked, reviewed the menu, and chose "Move to Trash".

That deleted the whole project from my hard drive. Without a backup, I'd been very lost.

There are three problems with the delete options of the projects plugin:

  1. Clicking "Move to Trash", a 2012 computer user expects the item to actually be moved into some sort of trash, with the possibility to recover the files. This is obviously not the case. The menu item should be renamed to "Delete permanently from hard drive".
  2. With such a destructive opertation, there absolutely should be a dialog: "Dou you really want to permanently delete the project folder and all its contents from the hard drive?" Users make mistakes.
  3. The right-click menu has the option "Move to Trash". An icon at the Projects plugin window says "Remove project". It is totally ambiguous which of these will remove the project from the list, and which one will remove it from the hard drive.

Thanks for considering.

-fberger

EDIT: numbered list
Last edited by fberger on Fri Dec 14, 2012 7:56 am, edited 1 time in total.
fberger
User
 
Posts: 27
Joined: Mon Jul 05, 2010 9:53 am
Location: Germany

Re: "Projects" plugin has misleading delete functions

Postby cody » Fri Dec 14, 2012 1:14 am

What operating system are you using?

The "Move to Trash" option uses the system api to move it to the Recycling Bin on Windows, Trash Can on OSX, and equivalent function on Linux so not sure how it could have gotten completely deleted on you computer.
User avatar
cody
Site Admin
 
Posts: 1315
Joined: Mon Oct 09, 2006 2:49 am
Location: United States

Re: "Projects" plugin has misleading delete functions

Postby fberger » Fri Dec 14, 2012 8:03 am

cody wrote:What operating system are you using?

The "Move to Trash" option uses the system api to move it to the Recycling Bin on Windows, Trash Can on OSX, and equivalent function on Linux so not sure how it could have gotten completely deleted on you computer.


I am using Gentoo Linux with a minimal XFCE desktop environment.

What API call of what library are you using?

On plain Linux, there is no such thing as an equivalent to a recycle bin. Environments such as KDE or Gnome might have an API for that, but that's nothing that can be assumed beforehand. I suspect that as a fallback, the thing is actually being deleted. I'll investigate once I know the API call Projects is using. (I might dig it up in the source, but you are probably quicker. :-) )

Still the 3rd point holds: the labels "Move to Trash" and "Remove Project" could use some cleaner language. I suggest "Remove from list" for the latter, or something that clarifies that only the entry is being removed, not the actual project.
fberger
User
 
Posts: 27
Joined: Mon Jul 05, 2010 9:53 am
Location: Germany

Re: "Projects" plugin has misleading delete functions

Postby cody » Fri Dec 14, 2012 1:54 pm

I am not the original author of this plugin/code. The trash code had been moved into editra core library some years back and this code has been used unmodified for about the last 5 years.

Looks like on Linux/Unix it does a file move command to move the files to the standard freedesktop trash folder. So it definitely should not be actually deleting the files. They are likely just been moved to the assumed trash folder based on the freedesktop standard.

It looks at the environment variable XDG_DATA_HOME and if that is not set it creates a trash folder under "~/.local/share" and moves the file(s) there.
User avatar
cody
Site Admin
 
Posts: 1315
Joined: Mon Oct 09, 2006 2:49 am
Location: United States

Re: "Projects" plugin has misleading delete functions

Postby fberger » Fri Dec 14, 2012 4:18 pm

cody wrote:I am not the original author of this plugin/code.


Oh, ok. Who do I direct the bug to? :-) I'd love to see these labels fixed.

cody wrote:Looks like on Linux/Unix it does a file move command to move the files to the standard freedesktop trash folder. So it definitely should not be actually deleting the files. They are likely just been moved to the assumed trash folder based on the freedesktop standard.

It looks at the environment variable XDG_DATA_HOME and if that is not set it creates a trash folder under "~/.local/share" and moves the file(s) there.


Confirmed, they actually ended up under ~/.local/share/Trash , as demanded by the specification. Ah, this is still not really portable behaviour, as the Trash is tightly coupled to using Freedesktop compatible programs.

I've just found trash-cli to handle the Trash from the command line, to that's that.

1. and 2. can be closed as WONTFIX. :-) 3. I'd still like to see improved.

Thanks,

fberger
fberger
User
 
Posts: 27
Joined: Mon Jul 05, 2010 9:53 am
Location: Germany

Re: "Projects" plugin has misleading delete functions

Postby cody » Fri Dec 14, 2012 6:15 pm

Original author has been gone for a long time. I have made maintenance releases and some enhancements to the plugin over the years. So will review these issues next time I spend some time on that plugin.

Its unfortunately difficult to provide a fully portable rich client experience for many things on Linux due to the large amount of variation and constantly changing standards. The freedesktop standard on this appears to the best option to follow at this point in time. Also based on some quick web browsing it looks like some platforms use a ~/.Trash directory as well now so may need to make some slight changes to support this path when possible.

This trash-cli application is good to see as well since it seems to be fairly common place on many main distributions now. Will also plan to update the trash function to use this program to interface with the trash when its available.
User avatar
cody
Site Admin
 
Posts: 1315
Joined: Mon Oct 09, 2006 2:49 am
Location: United States


Return to Bug Reports

Who is online

Users browsing this forum: No registered users and 1 guest

cron