From edc7d0a133558b3f048779d8a2a81c9e8cd3d10a Mon Sep 17 00:00:00 2001 From: Lyes Saadi <33597258+LyesSaadi@users.noreply.github.com> Date: Fri, 23 Sep 2022 21:18:34 +0200 Subject: [PATCH 1/4] Solve the no such file or directory issue Signed-off-by: Lyes Saadi <33597258+LyesSaadi@users.noreply.github.com> --- gradience/main.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gradience/main.py b/gradience/main.py index 6b2b8cc6f..2d6abc387 100644 --- a/gradience/main.py +++ b/gradience/main.py @@ -190,6 +190,9 @@ def reload_user_defined_presets(self): buglog("file") # keep compatiblity with old presets if repo.name.endswith(".json"): + if not os.path.isdir(os.path.join(PRESET_DIR, "user")): + os.mkdir(os.path.join(PRESET_DIR, "user")) + os.rename(repo, os.path.join( PRESET_DIR, "user", repo.name)) From f89a1d38fbf92eb2a2c19c638fbf8abc20fcfcf0 Mon Sep 17 00:00:00 2001 From: Lyes Saadi <33597258+LyesSaadi@users.noreply.github.com> Date: Fri, 23 Sep 2022 21:30:37 +0200 Subject: [PATCH 2/4] Fix another missing mkdir --- gradience/presets_manager_window.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gradience/presets_manager_window.py b/gradience/presets_manager_window.py index 99b7d39ef..7f8f820aa 100644 --- a/gradience/presets_manager_window.py +++ b/gradience/presets_manager_window.py @@ -343,6 +343,9 @@ def reload_pref_group(self): buglog("file") # keep compatiblity with old presets if repo.name.endswith(".json"): + if not os.path.isdir(os.path.join(PRESET_DIR, "user")): + os.mkdir(os.path.join(PRESET_DIR, "user")) + os.rename(repo, os.path.join( preset_directory, "user", repo.name)) From 94a4eb495dd51133c6a0955f47da312af142021b Mon Sep 17 00:00:00 2001 From: Lyes Saadi <33597258+LyesSaadi@users.noreply.github.com> Date: Fri, 23 Sep 2022 21:31:41 +0200 Subject: [PATCH 3/4] Oopsy, wrong variable --- gradience/presets_manager_window.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gradience/presets_manager_window.py b/gradience/presets_manager_window.py index 7f8f820aa..25cdb1b17 100644 --- a/gradience/presets_manager_window.py +++ b/gradience/presets_manager_window.py @@ -343,8 +343,8 @@ def reload_pref_group(self): buglog("file") # keep compatiblity with old presets if repo.name.endswith(".json"): - if not os.path.isdir(os.path.join(PRESET_DIR, "user")): - os.mkdir(os.path.join(PRESET_DIR, "user")) + if not os.path.isdir(os.path.join(preset_directory, "user")): + os.mkdir(os.path.join(preset_directory, "user")) os.rename(repo, os.path.join( preset_directory, "user", repo.name)) From 8a3fa04bfe3e776601cae5b5877ceacf64534200 Mon Sep 17 00:00:00 2001 From: Lyes Saadi <33597258+LyesSaadi@users.noreply.github.com> Date: Fri, 23 Sep 2022 21:40:52 +0200 Subject: [PATCH 4/4] Breaking translations temporarily to solve a bigger bug --- gradience/presets_manager_window.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/gradience/presets_manager_window.py b/gradience/presets_manager_window.py index 25cdb1b17..9816232cc 100644 --- a/gradience/presets_manager_window.py +++ b/gradience/presets_manager_window.py @@ -62,12 +62,8 @@ class GradiencePresetWindow(Adw.Window): custom_presets = {} official_repositories = { - _( - "Official" - ): "https://github.com/GradienceTeam/Community/raw/next/official.json", - _( - "Curated" - ): "https://github.com/GradienceTeam/Community/raw/next/curated.json", + "Official": "https://github.com/GradienceTeam/Community/raw/next/official.json", + "Curated": "https://github.com/GradienceTeam/Community/raw/next/curated.json", } search_results_list = []