diff --git a/plugins/bookerly/patch.py b/plugins/bookerly/patch.py index 24a4667..09ed7cf 100644 --- a/plugins/bookerly/patch.py +++ b/plugins/bookerly/patch.py @@ -238,7 +238,7 @@ def patch_settings_list_h(repo_dir): path = find_first("SettingsList.h", repo_dir) content = read_file(path) - if "Bookerly" in content or "bookerlyStyle" in content: + if 'STR_NONE_OPT}, "fontFamily"' in content: print(" SettingsList.h already patched, skipping.") return @@ -247,16 +247,6 @@ def patch_settings_list_h(repo_dir): '{StrId::STR_NOTO_SERIF, StrId::STR_NOTO_SANS, StrId::STR_OPEN_DYSLEXIC, StrId::STR_NONE_OPT}, "fontFamily"' ) - entry = ( - ' SettingInfo::Enum(StrId::STR_NONE_OPT, &CrossPointSettings::bookerlyStyle,\n' - ' {StrId::STR_NONE_OPT, StrId::STR_NONE_OPT, StrId::STR_NONE_OPT, StrId::STR_NONE_OPT}, "bookerlyStyle"),\n' - ) - - content = content.replace( - ' };\n return list;\n}\n', - entry + ' };\n return list;\n}\n' - ) - write_file(path, content) print(" SettingsList.h patched.")