[nautilus-actions] Global configuration file goes to /etc/xdg
- From: Pierre Wieser <pwieser src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus-actions] Global configuration file goes to /etc/xdg
- Date: Wed, 19 Jan 2011 21:49:48 +0000 (UTC)
commit 40803b432a8589372883c317abcea74939b7a2ea
Author: Pierre Wieser <pwieser trychlos org>
Date: Mon Jan 10 05:39:41 2011 +0100
Global configuration file goes to /etc/xdg
ChangeLog | 3 +++
src/core/na-settings.c | 9 +++++++--
src/utils/na-gconf2key.sh.in | 4 ++--
3 files changed, 12 insertions(+), 4 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 31f1602..1069292 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -35,6 +35,9 @@
2011-01-10 Pierre Wieser <pwieser trychlos org>
+ * src/core/na-settings.c (na_settings_new):
+ * src/utils/na-gconf2key.sh.in: Global configuration file goes to /etc/xdg.
+
* src/core/na-pivot.c:
* src/core/na-pivot.h (na_pivot_register):
* src/core/na-settings.c:
diff --git a/src/core/na-settings.c b/src/core/na-settings.c
index 2657606..2bdd55c 100644
--- a/src/core/na-settings.c
+++ b/src/core/na-settings.c
@@ -246,18 +246,23 @@ NASettings *
na_settings_new( void )
{
NASettings *settings;
+ gchar *dir;
settings = g_object_new( NA_SETTINGS_TYPE, NULL );
+ dir = g_build_filename( SYSCONFDIR, "xdg", NULL );
settings->private->global_conf = initialize_settings(
- settings, SYSCONFDIR,
+ settings, dir,
&settings->private->global_monitor,
&settings->private->global_handler );
+ g_free( dir );
+ dir = g_build_filename( g_get_home_dir(), ".config", NULL );
settings->private->user_conf = initialize_settings(
- settings, g_get_home_dir(),
+ settings, dir,
&settings->private->user_monitor,
&settings->private->user_handler );
+ g_free( dir );
return( settings );
}
diff --git a/src/utils/na-gconf2key.sh.in b/src/utils/na-gconf2key.sh.in
index 6ad509f..c8db9d1 100644
--- a/src/utils/na-gconf2key.sh.in
+++ b/src/utils/na-gconf2key.sh.in
@@ -426,11 +426,11 @@ done
msg "${count} migrated items"
# we are using this same script to migrate preferences to .conf files
-# mandatory preferences go to SYSCONFDIR/nautilus-actions.conf
+# mandatory preferences go to SYSCONFDIR/xdg/nautilus-actions.conf
# while user preferences go to HOME/.config/nautilus-actions.conf
# Note also that the GConf I/O provider is disabled both for reading
# and writing
-[ $(id -u) -eq 0 ] && destdir= sysconfdir@ || destdir=${HOME}/.config
+[ $(id -u) -eq 0 ] && destdir= sysconfdir@/xdg || destdir=${HOME}/.config
command "mkdir -p ${destdir}"
destconf=${destdir}/@PACKAGE conf
rm -f ${my_tmproot}.nact
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]