From 8322de0ca2228f76839f0eeee04947c40a5c6fdb Mon Sep 17 00:00:00 2001 From: Alistair Buxton Date: Sun, 12 Jan 2014 17:27:30 +0000 Subject: [PATCH] Use the new Gtk bookmarks location. --- thunar/thunar-gio-extensions.c | 2 +- thunar/thunar-util.c | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/thunar/thunar-gio-extensions.c b/thunar/thunar-gio-extensions.c index 1b9026a..369c1f4 100644 --- a/thunar/thunar-gio-extensions.c +++ b/thunar/thunar-gio-extensions.c @@ -77,7 +77,7 @@ thunar_g_file_new_for_bookmarks (void) gchar *filename; GFile *bookmarks; - filename = g_build_filename (xfce_get_homedir (), ".gtk-bookmarks", NULL); + filename = g_build_filename (g_get_user_config_dir (), "gtk-3.0", "bookmarks", NULL); bookmarks = g_file_new_for_path (filename); g_free (filename); diff --git a/thunar/thunar-util.c b/thunar/thunar-util.c index 22ffcce..3cb764e 100644 --- a/thunar/thunar-util.c +++ b/thunar/thunar-util.c @@ -196,6 +196,15 @@ thunar_util_load_bookmarks (GFile *bookmarks_file, /* append the GTK+ bookmarks (if any) */ fp = fopen (bookmarks_path, "r"); + g_free (bookmarks_path); + + if (G_UNLIKELY (fp == NULL)) + { + bookmarks_path = g_build_filename (g_get_home_dir (), ".gtk-bookmarks", NULL); + fp = fopen(bookmarks_path, "r"); + g_free(bookmarks_path); + } + if (G_LIKELY (fp != NULL)) { while (fgets (line, sizeof (line), fp) != NULL) @@ -231,7 +240,6 @@ thunar_util_load_bookmarks (GFile *bookmarks_file, fclose (fp); } - g_free (bookmarks_path); } -- 1.8.3.2