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:
Diffstat (limited to 'main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor.OptionPanels/GeneralOptionsPanel.cs')
-rw-r--r--main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor.OptionPanels/GeneralOptionsPanel.cs37
1 files changed, 14 insertions, 23 deletions
diff --git a/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor.OptionPanels/GeneralOptionsPanel.cs b/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor.OptionPanels/GeneralOptionsPanel.cs
index 00ffe30273..e847ad4a65 100644
--- a/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor.OptionPanels/GeneralOptionsPanel.cs
+++ b/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor.OptionPanels/GeneralOptionsPanel.cs
@@ -39,7 +39,7 @@ namespace MonoDevelop.SourceEditor.OptionPanels
{
partial class GeneralOptionsPanel : Gtk.Bin, IOptionsPanel
{
- readonly Xwt.CheckBox newEditorCheckBox;
+ readonly Xwt.CheckBox legacyEditorCheckBox;
readonly Xwt.CheckBox wordWrapCheckBox;
readonly Xwt.CheckBox wordWrapVisualGlyphsCheckBox;
@@ -54,31 +54,22 @@ namespace MonoDevelop.SourceEditor.OptionPanels
var newEditorOptionsBox = new Xwt.VBox ();
- var newEditorLearnMoreLink = new Xwt.LinkLabel {
- MarginBottom = 6,
- MarginTop = 6,
- Text = GettextCatalog.GetString ("Learn more about the New Editor"),
- Uri = new Uri ("https://aka.ms/vs/mac/editor/learn-more")
- };
- newEditorOptionsBox.PackStart (newEditorLearnMoreLink);
-
- newEditorCheckBox = new Xwt.CheckBox (GettextCatalog.GetString ("Open C# files in the New Editor"));
- newEditorCheckBox.Active = DefaultSourceEditorOptions.Instance.EnableNewEditor;
- newEditorCheckBox.Toggled += HandleNewEditorOptionToggled;
- newEditorOptionsBox.PackStart (newEditorCheckBox);
-
wordWrapCheckBox = new Xwt.CheckBox (GettextCatalog.GetString ("_Word wrap"));
- wordWrapCheckBox.MarginLeft = 18;
wordWrapCheckBox.Active = DefaultSourceEditorOptions.Instance.WordWrapStyle.HasFlag (WordWrapStyles.WordWrap);
wordWrapCheckBox.Toggled += HandleNewEditorOptionToggled;
newEditorOptionsBox.PackStart (wordWrapCheckBox);
wordWrapVisualGlyphsCheckBox = new Xwt.CheckBox (GettextCatalog.GetString ("Show visible glyphs for word wrap"));
- wordWrapVisualGlyphsCheckBox.MarginLeft = 36;
+ wordWrapVisualGlyphsCheckBox.MarginLeft = 18;
wordWrapVisualGlyphsCheckBox.Active = DefaultSourceEditorOptions.Instance.WordWrapStyle.HasFlag (WordWrapStyles.VisibleGlyphs);
wordWrapVisualGlyphsCheckBox.Toggled += HandleNewEditorOptionToggled;
newEditorOptionsBox.PackStart (wordWrapVisualGlyphsCheckBox);
+ legacyEditorCheckBox = new Xwt.CheckBox (GettextCatalog.GetString ("Use the legacy text editor where available (not recommended)"));
+ legacyEditorCheckBox.Active = !DefaultSourceEditorOptions.Instance.EnableNewEditor;
+ legacyEditorCheckBox.Toggled += HandleNewEditorOptionToggled;
+ newEditorOptionsBox.PackStart (legacyEditorCheckBox);
+
if (Xwt.Toolkit.CurrentEngine.Type == Xwt.ToolkitType.Gtk)
experimentalSection.PackStart ((Gtk.Widget)Xwt.Toolkit.CurrentEngine.GetNativeWidget (newEditorOptionsBox), false, false, 0);
else
@@ -99,12 +90,12 @@ namespace MonoDevelop.SourceEditor.OptionPanels
GettextCatalog.GetString ("Check to fold regions by default"));
foldCommentsCheckbutton.SetCommonAccessibilityAttributes ("SourceEditorGeneral.commens", "",
GettextCatalog.GetString ("Check to fold comments by default"));
- newEditorCheckBox.SetCommonAccessibilityAttributes ("SourceEditorGeneral.newEditor", "",
- GettextCatalog.GetString ("Check to enable experimental new editor"));
+ legacyEditorCheckBox.SetCommonAccessibilityAttributes ("SourceEditorGeneral.legacyEditor", "",
+ GettextCatalog.GetString ("Check to enable legacy text editor"));
wordWrapCheckBox.SetCommonAccessibilityAttributes ("SourceEditorGeneral.newEditor.wordWrap", "",
- GettextCatalog.GetString ("Check to enable word wrap in the experimental new editor"));
+ GettextCatalog.GetString ("Check to enable word wrap in the modern editor"));
wordWrapVisualGlyphsCheckBox.SetCommonAccessibilityAttributes ("SourceEditorGeneral.newEditor.wordWrap.enableVisualGlyphs", "",
- GettextCatalog.GetString ("Check to enable visual word wrap glyphs in the experimental new editor"));
+ GettextCatalog.GetString ("Check to enable visual word wrap glyphs in the modern editor"));
}
public virtual Control CreatePanelWidget ()
@@ -130,13 +121,13 @@ namespace MonoDevelop.SourceEditor.OptionPanels
HighlightingPanel.UpdateActiveDocument ();
}
- DefaultSourceEditorOptions.Instance.EnableNewEditor = this.newEditorCheckBox.Active;
+ DefaultSourceEditorOptions.Instance.EnableNewEditor = !this.legacyEditorCheckBox.Active;
}
void HandleNewEditorOptionToggled (object sender, EventArgs e)
{
- wordWrapCheckBox.Sensitive = newEditorCheckBox.Active;
- wordWrapVisualGlyphsCheckBox.Sensitive = newEditorCheckBox.Active && wordWrapCheckBox.Active;
+ wordWrapCheckBox.Sensitive = !legacyEditorCheckBox.Active;
+ wordWrapVisualGlyphsCheckBox.Sensitive = !legacyEditorCheckBox.Active && wordWrapCheckBox.Active;
var wrap = DefaultSourceEditorOptions.Instance.WordWrapStyle;