diff options
author | Stefano Karapetsas <[email protected]> | 2013-04-06 21:40:17 +0200 |
---|---|---|
committer | Stefano Karapetsas <[email protected]> | 2013-04-06 21:40:17 +0200 |
commit | 83179ec4781cb4afbaaf47b05284d857f3ea76ea (patch) | |
tree | 0216332baa13c93c6d4e9286757733c3f4b3be4f | |
parent | f80040dc275dbb1c1f104a6430f79828b700a487 (diff) | |
download | mate-desktop-83179ec4781cb4afbaaf47b05284d857f3ea76ea.tar.bz2 mate-desktop-83179ec4781cb4afbaaf47b05284d857f3ea76ea.tar.xz |
Add hack for new background path in mate-conf script
-rwxr-xr-x | mate-conf/mate-conf-import | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/mate-conf/mate-conf-import b/mate-conf/mate-conf-import index decce4a..b05700f 100755 --- a/mate-conf/mate-conf-import +++ b/mate-conf/mate-conf-import @@ -145,17 +145,24 @@ for convert_file in convert_files: # string elif child.attrib["type"] == "string": + value = child[0].text # hack for background if gsettings_schema == "org.mate.background" and gsettings_key == "picture-filename": # check if the background exists before apply it - if not os.path.exists(child[0].text): - no_background = True - continue + if not os.path.exists(value): + if "/pixmaps/backgrounds/" in value: + value = value.replace("/pixmaps/backgrounds/", "/backgrounds/") + if not os.path.exists(value): + no_background = True + continue + else: + no_background = True + continue if no_background and gsettings_schema == "org.mate.background": continue - debug_message(gsettings_schema, gsettings_key, child[0].text) - settings.set_string(gsettings_key, child[0].text) + debug_message(gsettings_schema, gsettings_key, value) + settings.set_string(gsettings_key, value) # list elif child.attrib["type"] == "list": |