xdg user directory patches on development version

Brian J. Tarricone bjt23 at cornell.edu
Mon Sep 8 07:22:41 CEST 2008

On Mon, 08 Sep 2008 06:03:12 +0200 Andrea Santilli wrote:

> I'm sending you the updated patches that make xfce recognize the xdg
> user directory paths.

Please use the bug tracker for patches; they tend to get lost here.

> I made them on 4.5.0-rev27605
> I *had* to add a function to libxfce4util called
> xfce_get_user_special_dir() which redirects to
> g_get_user_special_dir() in case you're compiling on glib >= 2.14.
> Otherwise it guesses the paths by reading the ~/.config/user-dirs.dirs
> file (as newer glib versions do). It returns ~/Desktop when the
> desktop directory is undefined.

Honestly, I'd rather not add something like this to libutil, given that
we're only one version behind on glib for this one[1].  I'd be ok with
making this feature require glib 2.14 (using #ifdefs, and falling back
to the hardcoded ~/Desktop and ~/Templates for glib 2.12).  I feel like
this is something that (the few) people stuck with glib 2.12 can live

> Another change is that now xfdesktop now considers the right templates
> directory.

Cool!  I've always hated having to have a non-hidden Templates dir
in my homedir.


[1] I know in the past we've used libxfce4util and libxfcegui4 as a
place to backport functionality from newer versions of glib/gtk than
we've wanted to depend on, but I've always hated the necessity.  Back
when we only required gtk 2.2, and 2.6 and 2.8 were out and had cool,
necessary functionality (GtkIconTheme comes to mind), it made sense,
but for little (useful but not critical) features like xdg-user-dirs, it
just bloats the library needlessly.

Right now we have some nice stuff in libutil and libgui that either
glib/gtk doesn't have (like XfceTitledDialog), or has in an inferior
fashion (XfceRc vs. GKeyFile is a good example).  Those are the kinds
of things I'd prefer to see in our libs.

More information about the Xfce4-dev mailing list