[Xfce4-commits] <xfconf:xfce-4.6> Merge xml files in reversed order (bug #6079).

Nick Schermer noreply at xfce.org
Thu May 13 21:18:01 CEST 2010


Updating branch refs/heads/xfce-4.6
         to b686270b38b6199eec080a7faee6b1e4758f28c0 (commit)
       from 8c6f3e23de11b9d46acc7f3db4937c026455e6af (commit)

commit b686270b38b6199eec080a7faee6b1e4758f28c0
Author: Nick Schermer <nick at xfce.org>
Date:   Thu Jan 28 20:42:23 2010 +0100

    Merge xml files in reversed order (bug #6079).

 xfconfd/xfconf-backend-perchannel-xml.c |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/xfconfd/xfconf-backend-perchannel-xml.c b/xfconfd/xfconf-backend-perchannel-xml.c
index d764e58..98fa0c3 100644
--- a/xfconfd/xfconf-backend-perchannel-xml.c
+++ b/xfconfd/xfconf-backend-perchannel-xml.c
@@ -1644,7 +1644,7 @@ xfconf_backend_perchannel_xml_load_channel(XfconfBackendPerchannelXml *xbpx,
 {
     XfconfChannel *channel = NULL;
     gchar *filename_stem, **filenames, *user_file;
-    gint i;
+    gint i, length;
     XfconfProperty *prop;
 
     TRACE("entering");
@@ -1669,9 +1669,11 @@ xfconf_backend_perchannel_xml_load_channel(XfconfBackendPerchannelXml *xbpx,
     prop->name = g_strdup("/");
     channel->properties = g_node_new(prop);
 
-    /* read in system files */
-    for(i = 0; filenames[i]; ++i) {
-        if(user_file && !strcmp(filenames[i], user_file))
+    /* read in system files, we do this in reversed order to properly 
+     * follow the xdg spec, see bug #6079 for more information */
+    length = g_strv_length(filenames);
+    for(i = length - 1; i >= 0; --i) {
+        if(!g_strcmp0(user_file, filenames[i]))
             continue;
         xfconf_backend_perchannel_xml_merge_file(xbpx, filenames[i], TRUE,
                                                  channel, NULL);



More information about the Xfce4-commits mailing list