[Xfce4-commits] <xfconf:master> Merge xml files in reversed order (bug #6079).
Nick Schermer
noreply at xfce.org
Thu Jan 28 20:46:01 CET 2010
Updating branch refs/heads/master
to 13e913b7683da0d3eb1c9d78ac0908d62368e5d5 (commit)
from cdadb1e4cc22dbf480843482dea3335b3a966534 (commit)
commit 13e913b7683da0d3eb1c9d78ac0908d62368e5d5
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 | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/xfconfd/xfconf-backend-perchannel-xml.c b/xfconfd/xfconf-backend-perchannel-xml.c
index 2df722e..a0d1b38 100644
--- a/xfconfd/xfconf-backend-perchannel-xml.c
+++ b/xfconfd/xfconf-backend-perchannel-xml.c
@@ -1664,7 +1664,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");
@@ -1689,9 +1689,10 @@ 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 */
+ 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