Skip to content

Commit 91fb756

Browse files
committed
Improve importing a dynamic wallappers and update release notes
1 parent b036cf7 commit 91fb756

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/localization.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
# Set application version, and icon
2121
v = "3.6.1"
2222
icon = "io.github.vikdevelop.SaveDesktop"
23-
rel_notes = "<p>This version brings significant speedup of saving and importing configurations thanks to parallel copying (thanks to @ArthurValadares), change of application name from \"SaveDesktop\" to \"Save Desktop\" and minor user interface improvements along with minor bug fixes.</p>\
23+
rel_notes = "<p>This version brings significant speedup of saving and importing configurations thanks to parallel copying (thanks to @ArthurValadares), change of application name from \"SaveDesktop\" to \"Save Desktop\" and minor user interface improvements along with minor bug fixes. Also the import of dynamic wallpapers in GNOME has been improved.</p>\
2424
<p>3.6-hotfix</p><p>Fixed a \"buffer overflow\" error when creating configuration archives by replacing the ZIP utility with 7-Zip.</p>\
2525
<p>3.6</p><ul>\
2626
<li>Added an option to encrypt the periodic saving files and added support for its usage in the synchronization mode</li>\

src/main_window.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1371,7 +1371,7 @@ def import_folder():
13711371

13721372
try:
13731373
e_o = False
1374-
os.system("echo > import_status")
1374+
os.system("echo > import_status") # Create a txt file to prevent removing the cache's content after the next login by closing the app window
13751375
if self.is_folder == True:
13761376
imp_folder_thread = Thread(target=import_folder)
13771377
imp_folder_thread.start()
@@ -1401,8 +1401,10 @@ def import_folder():
14011401
tar.extract(member, path=f"{CACHE}/import_config")
14021402
except PermissionError as e:
14031403
print(f"Permission denied for {member.name}: {e}")
1404+
os.system("find . -type f -name '*.xml' -exec python3 -c 'import re, sys; p=sys.argv[1]; t=open(p).read(); open(p,\"w\").write(re.sub(\"/home/[^/]+/\", \"%s/\", t))' {} \;" % home) # Replace the old home folder path with the current home folder path in all dynamic wallapers' XML files
1405+
os.system("find . -type f -name '*.ini' -exec python3 -c 'import re, sys; p=sys.argv[1]; t=open(p).read(); open(p,\"w\").write(re.sub(\"/home/[^/]+/\", \"%s/\", t))' {} \;" % home) # Replace the old home folder path with the current home folder path in all INI files (specifically dconf-settings.ini)
14041406
os.system(f"python3 {system_dir}/config.py --import_")
1405-
os.system("rm import_status") if all(not os.path.exists(app_path) for app_path in [f"{CACHE}/import_config/app", f"{CACHE}/import_config/installed_flatpaks.sh", f"{CACHE}/import_config/installed_user_flatpaks.sh"]) else None
1407+
os.system("rm import_status") if all(not os.path.exists(app_path) for app_path in [f"{CACHE}/import_config/app", f"{CACHE}/import_config/installed_flatpaks.sh", f"{CACHE}/import_config/installed_user_flatpaks.sh"]) else None # Remove the import_status file only if the specified files don't exist
14061408
print("Configuration imported successfully.")
14071409
except Exception as e:
14081410
e_o = True

0 commit comments

Comments
 (0)