[ShellGlobal] Change location for user files to XDG_DATA_HOME

While the extension system already uses an XDG location (XDG_CONFIG_HOME),
other components use the deprecated $HOME/.gnome2 directory.
Replace both with XDG_DATA_HOME - the existing data (app usage stats,
looking glass history and extensions) is not migrated to the new location.

https://bugzilla.gnome.org/show_bug.cgi?id=617555
This commit is contained in:
Florian Müllner
2010-05-04 13:24:06 +02:00
parent 39a24b9a6d
commit b1486f54c8
5 changed files with 20 additions and 21 deletions

View File

@ -381,7 +381,7 @@ on_session_status_changed (DBusGProxy *proxy,
static void
shell_app_usage_init (ShellAppUsage *self)
{
char *shell_config_dir, *path;
char *shell_userdata_dir, *path;
DBusGConnection *session_bus;
ShellWindowTracker *tracker;
@ -404,9 +404,9 @@ shell_app_usage_init (ShellAppUsage *self)
self->currently_idle = FALSE;
self->enable_monitoring = FALSE;
g_object_get (shell_global_get(), "configdir", &shell_config_dir, NULL),
path = g_build_filename (shell_config_dir, DATA_FILENAME, NULL);
g_free (shell_config_dir);
g_object_get (shell_global_get(), "userdatadir", &shell_userdata_dir, NULL),
path = g_build_filename (shell_userdata_dir, DATA_FILENAME, NULL);
g_free (shell_userdata_dir);
self->configfile = g_file_new_for_path (path);
g_free (path);
restore_from_file (self);