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.

Attachment: patch-xfdesktop.box
Description: Binary data

_______________________________________________
Thunar-dev mailing list
[email protected]
http://foo-projects.org/mailman/listinfo/thunar-dev

Reply via email to