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:
Thomas Goyne 2013-10-07 17:43:53 -07:00
parent 1cdd461023
commit 7a6fd4bb1e
4 changed files with 6 additions and 1 deletions

View File

@ -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) {

View File

@ -14,6 +14,7 @@
"Language" : "",
"Maximized" : false,
"Save Charset" : "UTF-8",
"Save UI State" : true,
"Show Toolbar" : true,
"Toolbar Icon Size" : 16
},

View File

@ -14,6 +14,7 @@
"Language" : "",
"Maximized" : false,
"Save Charset" : "UTF-8",
"Save UI State" : true,
"Show Toolbar" : true,
"Toolbar Icon Size" : 16
},

View File

@ -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") };