
On Mon, 5 Jan 2015 06:25:01 +1000 Nick Coghlan <ncoghlan@gmail.com> wrote:
On 5 Jan 2015 05:25, <random832@fastmail.us> wrote:
On Fri, Jan 2, 2015, at 20:50, Steven D'Aprano wrote:
You have a choice of desktop environments, which may or may not provide a move-to-trash API, including no desktop environment at all. Gnome provides an API for moving to trash, but I don't know how well it supports the freedesktop standard; KDE supports the freedesktop standard, but I don't know if it provides an API that can be called. XFCE has partial support.
I don't see why you need to call an API to the desktop enviroment. The entire point of the spec is to provide compatibility _between_ implementations on the same filesystem - you can quit gnome and log into KDE and see the same trash.
That compatibility is implemented *by* the desktop environments. Yes, you could write your own, but why would you, when the whole point of providing a standard API would be to integrate more cleanly with the underlying OS.
For the same reason that we ship a HTTP server while we could integrate more cleanly with Apache? :-) When there's a well-defined spec, it can be simpler to implement the spec yourself rather than pull third-party dependencies, especially when those happen to be huge as may be the case with desktop environments. Regards Antoine.