Patching xfdesktop to add Thunar Trash icon

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


Hello,


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);
xfdesktop_icon_view_add_item(fmanager->priv->icon_view,
XFDESKTOP_ICON(icon));

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?

Gregoire


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...
Name: patch-xfdesktop.box
Type: application/octet-stream
Size: 4222 bytes
Desc: not available
URL: <http://mail.xfce.org/pipermail/xfce4-dev/attachments/20060804/4668fb14/attachment.obj>


More information about the Xfce4-dev mailing list