[gnome-control-center] background: Allow load background file relative to XML file



commit 70fb75eb2712933701fa55b01236771d6dc885e2
Author: Damián Nohales <damiannohales gmail com>
Date:   Wed Dec 19 19:37:20 2018 -0300

    background: Allow load background file relative to XML file

 panels/background/cc-background-xml.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/panels/background/cc-background-xml.c b/panels/background/cc-background-xml.c
index 10823afb8..3caba6f8c 100644
--- a/panels/background/cc-background-xml.c
+++ b/panels/background/cc-background-xml.c
@@ -200,7 +200,10 @@ cc_background_xml_load_xml_internal (CcBackgroundXml *xml,
              bg_uri = NULL;
            } else {
              g_autoptr(GFile) file = NULL;
-             file = g_file_new_for_commandline_arg (content);
+             g_autofree gchar *dirname = NULL;
+
+             dirname = g_path_get_dirname (filename);
+             file = g_file_new_for_commandline_arg_and_cwd (content, dirname);
              bg_uri = g_file_get_uri (file);
            }
            SET_FLAG(CC_BACKGROUND_ITEM_HAS_URI);


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