public DiffWidget(VersionControlDocumentInfo info, bool viewOnly) { this.info = info; this.Build(); comparisonWidget = new MonoDevelop.VersionControl.Views.ComparisonWidget(viewOnly); fixed1.SetSizeRequest(16, 16); this.buttonNext.Clicked += (sender, args) => ComparisonWidget.GotoNext(); this.buttonPrev.Clicked += (sender, args) => ComparisonWidget.GotoPrev(); notebook1.Page = 0; vboxComparisonView.PackStart(comparisonWidget, true, true, 0); comparisonWidget.Show(); comparisonWidget.DiffChanged += delegate { labelOverview.Markup = LabelText; SetButtonSensitivity(); }; comparisonWidget.SetVersionControlInfo(info); this.buttonDiff.Clicked += HandleButtonDiffhandleClicked; diffTextEditor = new global::Mono.TextEditor.TextEditor(new Mono.TextEditor.Document(), new CommonTextEditorOptions()); diffTextEditor.Document.MimeType = "text/x-diff"; diffTextEditor.Options.ShowFoldMargin = false; diffTextEditor.Options.ShowIconMargin = false; diffTextEditor.Document.ReadOnly = true; scrolledwindow1.Child = diffTextEditor; diffTextEditor.Show(); SetButtonSensitivity(); }
public DiffWidget(VersionControlDocumentInfo info, bool viewOnly) { this.info = info; this.Build(); comparisonWidget = new MonoDevelop.VersionControl.Views.ComparisonWidget(viewOnly); fixed1.SetSizeRequest(16, 16); this.buttonNext.Clicked += (sender, args) => ComparisonWidget.GotoNext(); this.buttonPrev.Clicked += (sender, args) => ComparisonWidget.GotoPrev(); notebook1.Page = 0; vboxComparisonView.PackStart(comparisonWidget, true, true, 0); comparisonWidget.Show(); comparisonWidget.DiffChanged += delegate { labelOverview.Markup = LabelText; SetButtonSensitivity(); }; comparisonWidget.SetVersionControlInfo(info); this.buttonDiff.Clicked += HandleButtonDiffhandleClicked; diffTextEditor = new global::Mono.TextEditor.TextEditor(); diffTextEditor.Document.MimeType = "text/x-diff"; if (info.Document != null) { diffTextEditor.Options.FontName = info.Document.Editor.Options.FontName; diffTextEditor.Options.ColorScheme = info.Document.Editor.Options.ColorScheme; diffTextEditor.Options.ShowTabs = info.Document.Editor.Options.ShowTabs; diffTextEditor.Options.ShowSpaces = info.Document.Editor.Options.ShowSpaces; diffTextEditor.Options.ShowInvalidLines = info.Document.Editor.Options.ShowInvalidLines; diffTextEditor.Options.ShowInvalidLines = info.Document.Editor.Options.ShowInvalidLines; } else { var options = MonoDevelop.SourceEditor.DefaultSourceEditorOptions.Instance; diffTextEditor.Options.FontName = options.FontName; diffTextEditor.Options.ColorScheme = options.ColorScheme; diffTextEditor.Options.ShowTabs = options.ShowTabs; diffTextEditor.Options.ShowSpaces = options.ShowSpaces; diffTextEditor.Options.ShowInvalidLines = options.ShowInvalidLines; diffTextEditor.Options.ShowInvalidLines = options.ShowInvalidLines; } diffTextEditor.Options.ShowFoldMargin = false; diffTextEditor.Options.ShowIconMargin = false; diffTextEditor.Document.ReadOnly = true; scrolledwindow1.Child = diffTextEditor; diffTextEditor.Show(); SetButtonSensitivity(); }
public DiffWidget(VersionControlDocumentInfo info, bool viewOnly = false) { this.info = info; this.Build(); comparisonWidget = new ComparisonWidget(viewOnly); buttonNext = new DocumentToolButton(Gtk.Stock.GoUp, GettextCatalog.GetString("Previous Change")); buttonPrev = new DocumentToolButton(Gtk.Stock.GoDown, GettextCatalog.GetString("Next Change")); labelOverview = new Gtk.Label() { Xalign = 0 }; buttonDiff = new Gtk.Button(GettextCatalog.GetString("Unified Diff")); this.buttonNext.Clicked += (sender, args) => ComparisonWidget.GotoNext(); this.buttonPrev.Clicked += (sender, args) => ComparisonWidget.GotoPrev(); notebook1.Page = 0; vboxComparisonView.PackStart(comparisonWidget, true, true, 0); comparisonWidget.Show(); comparisonWidget.DiffChanged += delegate { labelOverview.Markup = LabelText; SetButtonSensitivity(); }; comparisonWidget.SetVersionControlInfo(info); this.buttonDiff.Clicked += HandleButtonDiffhandleClicked; diffTextEditor = new global::Mono.TextEditor.MonoTextEditor(new Mono.TextEditor.TextDocument(), CommonTextEditorOptions.Instance); diffTextEditor.Document.MimeType = "text/x-diff"; diffTextEditor.Options.ShowFoldMargin = false; diffTextEditor.Options.ShowIconMargin = false; diffTextEditor.Options.DrawIndentationMarkers = PropertyService.Get("DrawIndentationMarkers", false); diffTextEditor.Document.ReadOnly = true; scrolledwindow1.Child = diffTextEditor; diffTextEditor.Show(); SetButtonSensitivity(); }
public void ShowPreviousHandler() { ComparisonWidget.GotoPrev(); }