void MessageFunc(Gtk.TreeViewColumn tree_column, Gtk.CellRenderer cell, Gtk.TreeModel model, Gtk.TreeIter iter) { CellRendererText renderer = (CellRendererText)cell; var rev = (Revision)model.GetValue(iter, 0); if (string.IsNullOrEmpty(rev.Message)) { renderer.Text = GettextCatalog.GetString("(No message)"); } else { string message = BlameWidget.FormatMessage(rev.Message); int idx = message.IndexOf('\n'); if (idx > 0) { message = message.Substring(0, idx); } if (string.IsNullOrEmpty(currentFilter)) { renderer.Text = message; } else { renderer.Markup = EscapeWithFilterMarker(message); } } }
protected override Control OnGetViewControl(DocumentViewContent view) { if (widget == null) { widget = new BlameWidget(info); } return(widget); }
protected override void OnDeselected() { var buffer = info.Document.GetContent <MonoDevelop.Ide.Editor.TextEditor> (); if (buffer != null) { BlameWidget widget = Control.GetNativeWidget <BlameWidget> (); buffer.SetCaretLocation(widget.Editor.Caret.Line, widget.Editor.Caret.Column, usePulseAnimation: false, centerCaret: false); buffer.ScrollTo(new Ide.Editor.DocumentLocation(widget.Editor.YToLine(widget.Editor.VAdjustment.Value), 1)); } }
protected override void OnSelected() { info.Start(); BlameWidget widget = Control.GetNativeWidget <BlameWidget> (); widget.Reset(); var sourceEditor = info.Document.GetContent <MonoDevelop.SourceEditor.SourceEditorView> (); if (sourceEditor != null) { widget.Editor.Caret.Location = sourceEditor.TextEditor.Caret.Location; widget.Editor.VAdjustment.Value = sourceEditor.TextEditor.VAdjustment.Value; } }
public BlameRenderer(BlameWidget widget) { this.widget = widget; widget.info.Updated += OnWidgetChanged; annotations = new List <Annotation> (); UpdateAnnotations(); // widget.Document.Saved += UpdateAnnotations; document = widget.Editor.Document; widget.vScrollBar.ValueChanged += OnWidgetChanged; layout = new Pango.Layout(PangoContext); Events |= EventMask.ButtonPressMask | EventMask.ButtonReleaseMask | EventMask.PointerMotionMask | EventMask.LeaveNotifyMask; OptionsChanged(); Show(); }
protected override void OnSelected() { info.Start(); BlameWidget widget = Control.GetNativeWidget <BlameWidget> (); widget.Reset(); var buffer = info.Document.GetContent <MonoDevelop.Ide.Editor.TextEditor> (); if (buffer != null) { var loc = buffer.CaretLocation; int line = loc.Line < 1 ? 1 : loc.Line; int column = loc.Column < 1 ? 1 : loc.Column; widget.Editor.SetCaretTo(line, column, highlight: false, centerCaret: false); } }
public BlameRenderer(BlameWidget widget) { this.widget = widget; widget.info.Updated += delegate { QueueDraw(); }; annotations = new List <Annotation> (); UpdateAnnotations(null, null); // widget.Document.Saved += UpdateAnnotations; widget.Editor.Document.TextReplacing += EditorDocumentTextReplacing; widget.Editor.Document.LineChanged += EditorDocumentLineChanged; widget.vScrollBar.ValueChanged += delegate { QueueDraw(); }; layout = new Pango.Layout(PangoContext); Events |= EventMask.ButtonPressMask | EventMask.ButtonReleaseMask | EventMask.PointerMotionMask | EventMask.LeaveNotifyMask; OptionsChanged(); Show(); }
public BlameRenderer(BlameWidget widget) { this.widget = widget; widget.info.Updated += OnWidgetChanged; annotations = new List <Annotation> (); UpdateAnnotations(); // widget.Document.Saved += UpdateAnnotations; document = widget.Editor.Document; widget.vScrollBar.ValueChanged += OnWidgetChanged; layout = new Pango.Layout(PangoContext); Events |= EventMask.ButtonPressMask | EventMask.ButtonReleaseMask | EventMask.PointerMotionMask | EventMask.LeaveNotifyMask; OptionsChanged(); Accessible?.SetRole(AtkCocoa.Roles.AXGroup); Accessible?.SetTitle(GettextCatalog.GetString("Authors Overview")); Show(); }
protected override void OnDestroyed() { base.OnDestroyed(); // widget.Document.Saved -= UpdateAnnotations; if (document != null) { document = null; } if (layout != null) { layout.Dispose(); layout = null; } if (widget != null && widget.info != null) { widget.info.Updated -= OnWidgetChanged; widget.vScrollBar.ValueChanged -= OnWidgetChanged; widget = null; } }
protected override void OnSelected() { info.Start(); BlameWidget blameWidget = Control.GetNativeWidget <BlameWidget> (); blameWidget.Reset(); var buffer = info.Document.GetContent <MonoDevelop.Ide.Editor.TextEditor> (); if (buffer != null) { if (!(buffer.TextView is MonoTextEditor)) { //compatibility for other not MonoTextEditor editors var loc = buffer.CaretLocation; int line = loc.Line < 1 ? 1 : loc.Line; int column = loc.Column < 1 ? 1 : loc.Column; blameWidget.Editor.SetCaretTo(line, column, highlight: false, centerCaret: false); } } }
public BlameRenderer (BlameWidget widget) { this.widget = widget; widget.info.Updated += delegate { QueueDraw (); }; annotations = new List<Annotation> (); UpdateAnnotations (null, null); // widget.Document.Saved += UpdateAnnotations; widget.Editor.Document.TextReplacing += EditorDocumentTextReplacing; widget.Editor.Document.LineChanged += EditorDocumentLineChanged; widget.vScrollBar.ValueChanged += delegate { QueueDraw (); }; layout = new Pango.Layout (PangoContext); Events |= EventMask.ButtonPressMask | EventMask.ButtonReleaseMask | EventMask.ButtonMotionMask | EventMask.LeaveNotifyMask; OptionsChanged (); Show (); }
public BlameView (VersionControlDocumentInfo info) : base ("Blame") { this.info = info; widget = new BlameWidget (info); }
public BlameView(VersionControlDocumentInfo info) : base("Blame") { this.info = info; widget = new BlameWidget(info); }
protected override void OnDestroyed () { base.OnDestroyed (); // widget.Document.Saved -= UpdateAnnotations; if (document != null) { document = null; } if (layout != null) { layout.Dispose (); layout = null; } if (widget != null && widget.info != null) { widget.info.Updated -= OnWidgetChanged; widget.vScrollBar.ValueChanged -= OnWidgetChanged; widget = null; } }
public BlameRenderer (BlameWidget widget) { this.widget = widget; widget.info.Updated += OnWidgetChanged; annotations = new List<Annotation> (); UpdateAnnotations (); // widget.Document.Saved += UpdateAnnotations; document = widget.Editor.Document; widget.vScrollBar.ValueChanged += OnWidgetChanged; layout = new Pango.Layout (PangoContext); Events |= EventMask.ButtonPressMask | EventMask.ButtonReleaseMask | EventMask.PointerMotionMask | EventMask.LeaveNotifyMask; OptionsChanged (); Show (); }