forked from mia/Aegisub
Make saving transient UI state in the file optional
It significantly increases the amount of noise when tracking subtitle files in source control. Closes #1535.
This commit is contained in:
parent
1cdd461023
commit
7a6fd4bb1e
4 changed files with 6 additions and 1 deletions
|
@ -148,7 +148,8 @@ int AssFile::GetUIStateAsInt(std::string const& key) const {
|
|||
}
|
||||
|
||||
void AssFile::SaveUIState(std::string const& key, std::string const& value) {
|
||||
SetScriptInfo("Aegisub " + key, value);
|
||||
if (OPT_GET("App/Save UI State")->GetBool())
|
||||
SetScriptInfo("Aegisub " + key, value);
|
||||
}
|
||||
|
||||
void AssFile::SetScriptInfo(std::string const& key, std::string const& value) {
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
"Language" : "",
|
||||
"Maximized" : false,
|
||||
"Save Charset" : "UTF-8",
|
||||
"Save UI State" : true,
|
||||
"Show Toolbar" : true,
|
||||
"Toolbar Icon Size" : 16
|
||||
},
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
"Language" : "",
|
||||
"Maximized" : false,
|
||||
"Save Charset" : "UTF-8",
|
||||
"Save UI State" : true,
|
||||
"Show Toolbar" : true,
|
||||
"Toolbar Icon Size" : 16
|
||||
},
|
||||
|
|
|
@ -93,6 +93,8 @@ General::General(wxTreebook *book, Preferences *parent): OptionPage(book, parent
|
|||
wxFlexGridSizer *general = PageSizer(_("General"));
|
||||
OptionAdd(general, _("Check for updates on startup"), "App/Auto/Check For Updates");
|
||||
OptionAdd(general, _("Show main toolbar"), "App/Show Toolbar");
|
||||
OptionAdd(general, _("Save UI state in subtitles files"), "App/Save UI State");
|
||||
CellSkip(general);
|
||||
|
||||
OptionAdd(general, _("Toolbar Icon Size"), "App/Toolbar Icon Size");
|
||||
wxString autoload_modes[] = { _("Never"), _("Always"), _("Ask") };
|
||||
|
|
Loading…
Reference in a new issue