diff options
author | Emmanuele Bassi <ebassi@linux.intel.com> | 2010-10-21 14:06:29 +0100 |
---|---|---|
committer | Emmanuele Bassi <ebassi@linux.intel.com> | 2010-10-22 11:53:09 +0100 |
commit | 06758f1ab5e7a6fd97c6bff6041aca96743a13b6 (patch) | |
tree | 3489f91ae7e1ad1eeccf316b3716a75d5bcdbc89 /gtk | |
parent | 55196a705f00564a44647bfc97981db0a783369a (diff) | |
download | gtk+-06758f1ab5e7a6fd97c6bff6041aca96743a13b6.tar.gz |
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
Diffstat (limited to 'gtk')
-rw-r--r-- | gtk/gtkrecentmanager.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/gtk/gtkrecentmanager.c b/gtk/gtkrecentmanager.c index 19b7cee18e..7e3aff0c9b 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); } |