예제 #1
0
        protected override void OnFocused()
        {
            info.Start();
            if (ComparisonWidget.originalComboBox.Text == GettextCatalog.GetString("Local"))
            {
                ComparisonWidget.UpdateLocalText();
            }
            var textView = info.Controller.GetContent <ITextView> ();

            if (textView != null)
            {
                var(line, column) = textView.Caret.Position.BufferPosition.GetLineAndColumn1Based();
                ComparisonWidget.OriginalEditor.SetCaretTo(line, column);
            }

            if (ComparisonWidget.Allocation.Height == 1 && ComparisonWidget.Allocation.Width == 1)
            {
                ComparisonWidget.SizeAllocated += HandleComparisonWidgetSizeAllocated;
            }
            else
            {
                HandleComparisonWidgetSizeAllocated(null, new Gtk.SizeAllocatedArgs());
            }

            widget.UpdatePatchView();
        }
예제 #2
0
        protected override void OnSelected()
        {
            info.Start();
            ComparisonWidget.UpdateLocalText();
            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;
                ComparisonWidget.OriginalEditor.SetCaretTo(line, column);
            }

            if (ComparisonWidget.Allocation.Height == 1 && ComparisonWidget.Allocation.Width == 1)
            {
                ComparisonWidget.SizeAllocated += HandleComparisonWidgetSizeAllocated;
            }
            else
            {
                HandleComparisonWidgetSizeAllocated(null, new Gtk.SizeAllocatedArgs());
            }

            widget.UpdatePatchView();
        }
예제 #3
0
 public void Selected()
 {
     info.Start();
     ComparisonWidget.UpdateLocalText();
     ComparisonWidget.OriginalEditor.Document.IgnoreFoldings = true;
     ComparisonWidget.OriginalEditor.Caret.Location          = info.Document.Editor.Caret.Location;
     ComparisonWidget.OriginalEditor.VAdjustment.Value       = info.Document.Editor.VAdjustment.Value;
     ComparisonWidget.OriginalEditor.GrabFocus();
 }
예제 #4
0
 public void Selected()
 {
     info.Start();
     ComparisonWidget.UpdateLocalText();
     ComparisonWidget.OriginalEditor.Document.IgnoreFoldings = true;
     ComparisonWidget.OriginalEditor.Caret.Location          = info.Document.Editor.Caret.Location;
     if (ComparisonWidget.Allocation.Height == 1 && ComparisonWidget.Allocation.Width == 1)
     {
         ComparisonWidget.SizeAllocated += HandleComparisonWidgetSizeAllocated;
     }
     else
     {
         HandleComparisonWidgetSizeAllocated(null, new Gtk.SizeAllocatedArgs());
     }
 }
예제 #5
0
        public void Selected()
        {
            info.Start();
            ComparisonWidget.UpdateLocalText();
            var buffer = info.Document.GetContent <ITextBuffer> ();

            if (buffer != null)
            {
                int line, col;
                buffer.GetLineColumnFromPosition(buffer.CursorPosition, out line, out col);
                ComparisonWidget.OriginalEditor.SetCaretTo(line, col);
            }

            if (ComparisonWidget.Allocation.Height == 1 && ComparisonWidget.Allocation.Width == 1)
            {
                ComparisonWidget.SizeAllocated += HandleComparisonWidgetSizeAllocated;
            }
            else
            {
                HandleComparisonWidgetSizeAllocated(null, new Gtk.SizeAllocatedArgs());
            }
        }