Re: Empty trash action
- From: Ulrik Sverdrup <ulrik sverdrup gmail com>
- To: J <j49137 gmail com>
- Cc: kupfer-list gnome org
- Subject: Re: Empty trash action
- Date: Wed, 25 Jan 2012 18:25:32 +0100
Thank you!
I didn't know that we could call .delete() on any file/folder in the
trash and have it deleted. It is not documented that way, but it seems
it is the way to do it (Thunar does).
1. try..except StopIteration is not needed.
2. Should it be named 'Empty Trash' and description can be blank
(better than repeating the title)
3. Since it's a destructive action it should have a negative adjust by
our policy (rank_adjust = -1, see MoveToTrash)
4. self._trash_uri is not needed, just use yield EmptyTrash()
5. Since it's a very important action we should handle exceptions from
.delete() and show a user-visible error (raise OperationError with
message from the GLib exception's message).
6. the icon name can be "user-trash-full" (which is in the icon naming
spec) or maybe simply the default action icon (gearwheels) to avoid
repetition.
-ulrik
2012/1/25 J <j49137 gmail com>:
> I've added an 'Empty' action to the Trash plugin. Patch attached.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]