Patching xfdesktop to add Thunar Trash icon

Gregoire Gentil gregoire at
Fri Aug 4 22:33:54 CEST 2006


I'm trying to patch xfdesktop to add a Trash icon on the desktop. This
trash icon is supposed to be linked to the new Thunar trash feature.

As shown in the attached file, I have written a function called
xfdesktop_file_icon_manager_load_Trash that is doing the following:

path = thunar_vfs_path_get_for_trash();
info = thunar_vfs_info_new_for_path(path, NULL);
info->custom_icon = "emblem-trash";
icon = xfdesktop_file_icon_new(info, fmanager->priv->gscreen);

Unfortunately, the resulting icon launches the root (/) instead of the
trash (trash:///). I have developped the same feature for the Home so I
know that the flow is working fine. Any idea what is wrong with my
implementation or what should I patch?


PS: Note that thunar_vfs_path_dup_uri(thunar_vfs_path_get_for_trash())
returns trash:/// and
thunar_vfs_path_get_name(thunar_vfs_path_get_for_trash()) returns /
which perhaps explains the problem.

PPS: I'm copying thunar-dev as Benedikt could have some ideas.
-------------- next part --------------
A non-text attachment was scrubbed...
Type: application/octet-stream
Size: 4222 bytes
Desc: not available
URL: <>

More information about the Xfce4-dev mailing list