Gtk bookmarks location
Alistair Buxton
a.j.buxton at gmail.com
Mon Jan 13 15:28:55 CET 2014
I've put patches for both apps on bugzilla:
https://bugzilla.xfce.org/show_bug.cgi?id=10626
https://bugzilla.xfce.org/show_bug.cgi?id=10627
For reference here's the patches in gtk2 and gtk3:
https://git.gnome.org/browse/gtk+/commit/?id=ceb3fecd117293387547c284e8294e4cddaa8f17
https://git.gnome.org/browse/gtk+/commit/?h=gtk-2-24&id=de89546e30db83e6e10f72062b3b5c38814bb64d
Should we handle the case where someone builds xfce against a really
old (2+ years) version of gtk2?
Also, while doing this I noticed that libxfce4util has this function
xfce_get_homefile() to get the user's homedir. That seems to be a
duplicate of of g_get_home_dir(). Also I couldn't see an xfce
equivalent of g_get_user_config_dir (). Is there any reason why xfce
has a function just for getting the user's homedir, rather than just
using glib?
On 8 January 2014 18:27, Nick Schermer <nick at xfce.org> wrote:
> Since we're not going to change the gtk settings dialog, its better to mimic
> its behavior.
>
> Nick
>
>
> On Sun, Jan 5, 2014 at 10:19 AM, Foresight <mark at foresightlinux.org> wrote:
>>
>> On Sun Jan 5 00:25:25 2014 Alistair Buxton <a.j.buxton at gmail.com> wrote:
>> > It's come to my attention that recent versions of both gtk2 and gtk3
>> > use a different file for gtk bookmarks.
>> >
>> > First this file is checked:
>> > filename = g_build_filename (g_get_user_config_dir (), "gtk-3.0",
>> > "bookmarks", NULL);
>> >
>> > If it doesn't exist or some other problem, the old file location is
>> > checked: filename = g_build_filename (g_get_home_dir (),
>> > ".gtk-bookmarks", NULL);
>> >
>> > If the bookmarks are loaded from the legacy file, they should be
>> > written to the new file.
>> >
>> > This is the reason why thunar bookmarks don't show up in file
>> > requesters "sometimes".
>> >
>> > I intend to fix this in thunar and places plugin. Does anything else
>> > xfce-related use these bookmarks?
>> >
>> > I intend to fix this in the following way:
>> >
>> > 1. Update all apps to behave exactly like they do now, except to use
>> > the new file instead of the legacy one.
>> > 2. Add an extra check to load from the legacy file if the new file is
>> > missing, but not change anything else, so that the new file is still
>> > what is watched for changes, and where bookmarks are saved to.
>> >
>> > This means the user's bookmarks will get copied into the new location
>> > when one of the following happens:
>> >
>> > 1. Open a Gtk file requester.
>> > 2. Add or delete a bookmark in thunar.
>>
>> But that would mean that if zyou already used something that created the
>> new file without checking for the old one all your old bookmarks won't be
>> migrated, because some stupid gtk3 program already created the new file.
>> I don't have a better idea though.
>>
>> > --
>> > Alistair Buxton
>> > a.j.buxton at gmail.com
>> > _______________________________________________
>> > Xfce4-dev mailing list
>> > Xfce4-dev at xfce.org
>> > https://mail.xfce.org/mailman/listinfo/xfce4-dev
>>
>>
>> _______________________________________________
>> Xfce4-dev mailing list
>> Xfce4-dev at xfce.org
>> https://mail.xfce.org/mailman/listinfo/xfce4-dev
>
>
>
> _______________________________________________
> Xfce4-dev mailing list
> Xfce4-dev at xfce.org
> https://mail.xfce.org/mailman/listinfo/xfce4-dev
--
Alistair Buxton
a.j.buxton at gmail.com
More information about the Xfce4-dev
mailing list