Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#148 Move deleted pictures to Trash / Recycle Bin

v0.9.22
open
nobody
5
2012-10-03
2010-11-01
William Kendrick
No

On platforms/environments that have a temporary storage location for deleted files (Recycle Bin on Windows, Trash on Mac OS X, and freedesktop.org (KDE/Dolphin/Konqueror, GNOME/Nautilus, Xfce/Thunar)), the "Delete" option in Tux Paint's "Open" dialog could move the deleted picture & associated files to the temporary storage (Trash).

Discussion

  • Some notes re: xdg from 'auke' in the #meego IRC channel:

    http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html

    $XDG_DATA_HOME defines the base directory relative to which user specific data files should be stored. If $XDG_DATA_HOME is either not set or empty, a default equal to $HOME/.local/share should be used.

    so, The location of Trash is: ${XDG_DATA_HOME:-$HOME/.local/share}/Trash

     
  • Freedesktop.org version implemented.

    To-do: Windows and Mac OS X.

     
  • dbus-send used to tell KDE when trash:/ needs to be re-reviewed (e.g., update trash icon on panel or desktop).

    To-do:
    * Make sure trash icons in other freedesktop.org-compatible environments (e.g., GNOME; also xcfe? others?) also get updated, somehow.
    * Figure out how to do this in Windows (95 thru 7, if possible!)
    * Figure out how to do this on Mac OS X
    * Figure out how to do this on Haiku
    * Expose and document 'UNLINK_ONLY' #define that can be used to revert Tux Paint back to the unlink() method (rather than only unlink()'ing if all else fails), which may be useful for some platforms (mobile?)