[gtk+] recent-manager: Move the file under XDG_USER_DATA
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] recent-manager: Move the file under XDG_USER_DATA
- Date: Fri, 22 Oct 2010 11:09:18 +0000 (UTC)
commit 06758f1ab5e7a6fd97c6bff6041aca96743a13b6
Author: Emmanuele Bassi <ebassi linux intel com>
Date: Thu Oct 21 14:06:29 2010 +0100
recent-manager: Move the file under XDG_USER_DATA
Do not use $HOME/.recently-used.xbel any more. No migration path is
included: we're breaking API anyway.
https://bugzilla.gnome.org/show_bug.cgi?id=524304
gtk/gtkrecentmanager.c | 14 ++++++++++----
1 files changed, 10 insertions(+), 4 deletions(-)
---
diff --git a/gtk/gtkrecentmanager.c b/gtk/gtkrecentmanager.c
index 19b7cee..7e3aff0 100644
--- a/gtk/gtkrecentmanager.c
+++ b/gtk/gtkrecentmanager.c
@@ -111,7 +111,7 @@
#include "gtkmarshalers.h"
/* the file where we store the recently used items */
-#define GTK_RECENTLY_USED_FILE ".recently-used.xbel"
+#define GTK_RECENTLY_USED_FILE "recently-used.xbel"
/* return all items by default */
#define DEFAULT_LIMIT -1
@@ -520,6 +520,14 @@ gtk_recent_manager_monitor_changed (GFileMonitor *monitor,
}
}
+static gchar *
+get_default_filename (void)
+{
+ return g_build_filename (g_get_user_data_dir (),
+ GTK_RECENTLY_USED_FILE,
+ NULL);
+}
+
static void
gtk_recent_manager_set_filename (GtkRecentManager *manager,
const gchar *filename)
@@ -560,9 +568,7 @@ gtk_recent_manager_set_filename (GtkRecentManager *manager,
else
{
if (!filename || *filename == '\0')
- priv->filename = g_build_filename (g_get_home_dir (),
- GTK_RECENTLY_USED_FILE,
- NULL);
+ priv->filename = get_default_filename ();
else
priv->filename = g_strdup (filename);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]