diff options
author | Anže Vodovnik <anvod@microsoft.com> | 2019-04-08 18:02:30 +0300 |
---|---|---|
committer | Anže Vodovnik <anvod@microsoft.com> | 2019-04-08 18:41:44 +0300 |
commit | 74afa7f36daa6b3e226eae870900fc5312297a36 (patch) | |
tree | 3893c5bc34a48eb79a47384c62673fb209dbb20a /main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor | |
parent | f994e69d01388dccdcbf0a87c30583c5f1656a58 (diff) |
Changing configuration value to mark the editor as default.
Diffstat (limited to 'main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor')
-rw-r--r-- | main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor/DefaultSourceEditorOptions.cs | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor/DefaultSourceEditorOptions.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor/DefaultSourceEditorOptions.cs index 165949e0ce..218d7e96b2 100644 --- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor/DefaultSourceEditorOptions.cs +++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor/DefaultSourceEditorOptions.cs @@ -399,18 +399,22 @@ namespace MonoDevelop.Ide.Editor } } - ConfigurationProperty<bool> enableNewEditor = ConfigurationProperty.Create ("EnableNewEditor", false); + ConfigurationProperty<bool> preferLegacyEditor = ConfigurationProperty.Create ("PreferLegacyEditor", false); public bool EnableNewEditor { + // NOTE: as we're making this editor the default, we've switched to a new configuration property, + // and we'll simply flip the value that we're getting from that. The code below might be a bit convoluted, + // but it means we don't have additional changes get { - return enableNewEditor; + return !preferLegacyEditor; } set { - if (!enableNewEditor.Set (value)) + value = !value; //see notes above + if (!preferLegacyEditor.Set (value)) return; string messageText; - if (value) { + if (!value) { messageText = GettextCatalog.GetString ( "The New Editor Preview has been enabled, but already opened files " + "will need to be closed and re-opened for the change to take effect."); |