small change in "gconftool-2 --dump" behaviour



Hey,
	I've just committed (to gnome-2-6 and HEAD) the tiny patch below which
changes the behaviour of --dump slightly.

	With this change, if the value of the key is the schema default (i.e.
its unset), we don't dump the actual value. Because the schema name is
included in the dump of the key no information is lost and now dumping
an unset key and then loading the dump should give you exactly what you
had before.

Cheers,
Mark.

Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/gconf/ChangeLog,v
retrieving revision 1.502
diff -u -p -r1.502 ChangeLog
--- ChangeLog	1 Apr 2004 13:40:29 -0000	1.502
+++ ChangeLog	1 Apr 2004 14:42:26 -0000
@@ -0,0 +1,5 @@
+2004-04-01  Mark McLoughlin  <mark skynet ie>
+
+	* gconf/gconftool.c: (dump_entries_in_dir): don't dump
+	the value if its the schema default.
+
Index: gconf/gconftool.c
===================================================================
RCS file: /cvs/gnome/gconf/gconf/gconftool.c,v
retrieving revision 1.88
diff -u -p -r1.88 gconftool.c
--- gconf/gconftool.c	30 Mar 2004 15:19:08 -0000	1.88
+++ gconf/gconftool.c	1 Apr 2004 14:42:30 -0000
@@ -1497,7 +1497,8 @@ dump_entries_in_dir(GConfEngine* conf, c
         g_print ("      <schema_key>%s</schema_key>\n",
 		 get_key_relative(gconf_entry_get_schema_name(entry), base_dir));
 
-      if (entry->value)
+      /* don't print the value if its just the schema default */
+      if (entry->value && !gconf_entry_get_is_default(entry))
         print_value_in_xml(entry->value, 6);
 
       g_print ("    </entry>\n");





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]