Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/monodevelop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Bockover <abock@microsoft.com>2019-04-08 22:21:38 +0300
committerGitHub <noreply@github.com>2019-04-08 22:21:38 +0300
commit38b86782631f117fdc3dbffde5738c5f58687377 (patch)
tree8dc5a6bcf408b133d8a2407055bb16e2548089e3 /main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor
parent5193c6df368aafae62674fd1973be939f7e44c2b (diff)
parent74afa7f36daa6b3e226eae870900fc5312297a36 (diff)
Merge pull request #531 from xamarin/pr-anvod-editor-default
Changing Configuration To Set New 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.cs12
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.");