コード例 #1
0
ファイル: LogWidget.cs プロジェクト: paulkeast/monodevelop
        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);
                }
            }
        }
コード例 #2
0
 protected override Control OnGetViewControl(DocumentViewContent view)
 {
     if (widget == null)
     {
         widget = new BlameWidget(info);
     }
     return(widget);
 }
コード例 #3
0
ファイル: BlameView.cs プロジェクト: vonchenplus/monodevelop
        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));
            }
        }
コード例 #4
0
        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;
            }
        }
コード例 #5
0
ファイル: BlameWidget.cs プロジェクト: yunjongha/monodevelop
            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();
            }
コード例 #6
0
ファイル: BlameView.cs プロジェクト: vonchenplus/monodevelop
        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);
            }
        }
コード例 #7
0
            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();
            }
コード例 #8
0
            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();
            }
コード例 #9
0
ファイル: BlameWidget.cs プロジェクト: yunjongha/monodevelop
            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;
                }
            }
コード例 #10
0
ファイル: BlameView.cs プロジェクト: wzq0621/monodevelop
        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);
                }
            }
        }
コード例 #11
0
ファイル: BlameWidget.cs プロジェクト: trustme/monodevelop
			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 ();
			}
コード例 #12
0
		public BlameView (VersionControlDocumentInfo info) : base ("Blame")
		{
			this.info = info;
			widget = new BlameWidget (info);
		}
コード例 #13
0
 public BlameView(VersionControlDocumentInfo info) : base("Blame")
 {
     this.info = info;
     widget    = new BlameWidget(info);
 }
コード例 #14
0
ファイル: BlameWidget.cs プロジェクト: zenek-y/monodevelop
			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;
				}
			}
コード例 #15
0
ファイル: BlameWidget.cs プロジェクト: zenek-y/monodevelop
			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 ();
			}