Created attachment 1877 patch for places plugin I opened this bug report some time ago, proposing a solution for thunar and xfdesktop: http://bugzilla.xfce.org/show_bug.cgi?id=4365 The patches are about having xfce support the xdg user directories. Right now the xfdesktop patch has already been committed to svn. We need the places plugin to be compatible too and I guess this is just about changing the directory for the desktop menu entry. Here is the patch
(In reply to comment #0) > Created an attachment (id=1877) [details] > patch for places plugin > > I opened this bug report some time ago, proposing a solution for thunar and > xfdesktop: http://bugzilla.xfce.org/show_bug.cgi?id=4365 > > The patches are about having xfce support the xdg user directories. Right now > the xfdesktop patch has already been committed to svn. > > We need the places plugin to be compatible too and I guess this is just about > changing the directory for the desktop menu entry. > > Here is the patch Please also make it not display the Desktop if it's set to the user's home.
Created attachment 1895 patch for places plugin #2 Now the plugin hides the desktop when it points to $HOME. Anyway the plugin segfaults for other unknown reasons when you take it off the panel (got it from dmesg output)
Created attachment 1989 Based on att1895 Thanks, Andrea. I've iterated on your patch a bit. Let me know what you think. I tried to get it so that the plugin would notice any xdg configuration changes immediately, but it seems that g_get_user_special_dir doesn't work that way. Oh well. -Diego
Hi Diego, I've just changed the patch and looks fine apart for a detail: according to the specifications, when the desktop directory isnt set it should default to ~/Desktop. Can you fix that please? :) About the xdg configuration changes, unfortunately g_get_user_special_dir () reads the configuration only once, and the read values are owned by glib. So the changes never reflect on the returned values. Your change might be useful anyway if in the future we provide some kind of monitoring on changes on ~/.config/user-dirs.dirs (that could be done without polling by using GIO) and so provide a function in libxfce4util that improves and replaces g_get_user_special_dir () completely.
> according to the specifications, when the desktop directory isnt set it should > default to ~/Desktop. Can you fix that please? :) I thought I retained that behavior. See the comment /* fall back to ~/Desktop */. > Your change might be useful anyway if in the future we provide some kind of > monitoring on changes on ~/.config/user-dirs.dirs (that could be done without > polling by using GIO) and so provide a function in libxfce4util that improves > and replaces g_get_user_special_dir () completely. Maybe g_get_user_special_dir will eventually do that, also.
> I thought I retained that behavior. See the comment /* fall back to ~/Desktop */. Oh sorry. I was trying to figure out with it wouldn't show the desktop but the code seemed ok. Well the directory simply wasn't there (d'oh) > Maybe g_get_user_special_dir will eventually do that, also. Yeah I guess you're right. It would be better to file a bug report against glib directly. Ok so the patch is perfect to me.
Committed attachment 1989 as svn r6153.