NOTE: This is based on the ideas discussed in #9 to implement a
migration path to fix issues in the theme definitions of existing themes.
It implements:
23 added name validation for new themes. This change is for migrating
the existing themes. This change doesn't add the changes repo field as
discussed in #9 but prepares for the structure to implement it.
This introduces a public method apply_changes() on the Theme type
to apply various changes to an existing theme. The theme changes
field will be added later in the Theme struct. This is a preparation
for the theme changes feature.
The first type of change implemented here is the directory rename
change as Theme::apply_change_rename_dir(). It takes an old theme name
and a new theme name and renames the theme directory if found. This is
called by Theme.apply_changes() when the theme name is not the same
after applying the rename change.
Theme.get_name() returns the effectual name of the theme after
applying any rename change. The implementation will change once the
changes fields are added in Theme struct.
NOTE: This is based on the ideas discussed in #9 to implement a migration path to fix issues in the theme definitions of existing themes. It implements:
23 added name validation for new themes. This change is for migrating
the existing themes. This change doesn't add the
changes
repo field as discussed in #9 but prepares for the structure to implement it.This introduces a public method
apply_changes()
on the Theme type to apply various changes to an existing theme. The theme changes field will be added later in the Theme struct. This is a preparation for the theme changes feature.The first type of change implemented here is the directory rename change as
Theme::apply_change_rename_dir()
. It takes an old theme name and a new theme name and renames the theme directory if found. This is called byTheme.apply_changes()
when the theme name is not the same after applying the rename change.Theme.get_name()
returns the effectual name of the theme after applying any rename change. The implementation will change once the changes fields are added in Theme struct.