~ubuntu-branches/ubuntu/trusty/monodevelop/trusty-proposed

« back to all changes in this revision

Viewing changes to src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl.Views/BlameWidget.cs

  • Committer: Package Import Robot
  • Author(s): Jo Shields
  • Date: 2013-05-12 09:46:03 UTC
  • mto: This revision was merged to the branch mainline in revision 29.
  • Revision ID: package-import@ubuntu.com-20130512094603-mad323bzcxvmcam0
Tags: upstream-4.0.5+dfsg
ImportĀ upstreamĀ versionĀ 4.0.5+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
85
85
                
86
86
                public Ide.Gui.Document Document {
87
87
                        get {
88
 
                                return info.Document.WorkbenchWindow.Document;
 
88
                                return info.Document.ParentDocument;
89
89
                        }
90
90
                }
91
91
                public VersionControlItem VersionControlItem {
472
472
                                if (highlightAnnotation == null)
473
473
                                        return;
474
474
                                int i = 1;
475
 
                                foreach (var content in widget.info.Document.WorkbenchWindow.SubViewContents) {
476
 
                                        DiffView diffView = content as DiffView;
 
475
                                foreach (var view in widget.info.Document.ParentDocument.Views) {
 
476
                                        DiffView diffView = view.GetContent<DiffView> ();
477
477
                                        if (diffView != null) {
478
 
                                                widget.info.Document.WorkbenchWindow.SwitchView (i);
 
478
                                                view.Select ();
479
479
                                                var rev = widget.info.History.FirstOrDefault (h => h.ToString () == highlightAnnotation.Revision);
480
480
                                                if (rev == null)
481
481
                                                        return;
493
493
                                if (highlightAnnotation == null)
494
494
                                        return;
495
495
                                int i = 1;
496
 
                                foreach (var content in widget.info.Document.WorkbenchWindow.SubViewContents) {
497
 
                                        LogView logView = content as LogView;
 
496
                                foreach (var view in widget.info.Document.ParentDocument.Views) {
 
497
                                        LogView logView = view.GetContent<LogView> ();
498
498
                                        if (logView != null) {
499
 
                                                widget.info.Document.WorkbenchWindow.SwitchView (i);
 
499
                                                view.Select ();
500
500
                                                var rev = widget.info.History.FirstOrDefault (h => h.ToString () == highlightAnnotation.Revision);
501
501
                                                if (rev == null)
502
502
                                                        return;
524
524
                        {
525
525
                                StatusBarContext ctx = IdeApp.Workbench.StatusBar.CreateContext ();
526
526
                                ctx.AutoPulse = true;
527
 
                                ctx.ShowMessage (ImageService.GetImage ("md-version-control", IconSize.Menu), GettextCatalog.GetString ("Retrieving history"));
 
527
                                ctx.ShowMessage ("md-version-control", GettextCatalog.GetString ("Retrieving history"));
528
528
                                
529
529
                                ThreadPool.QueueUserWorkItem (delegate {
530
530
                                        try {
575
575
                                        
576
576
                                        if (lineCount > 0)
577
577
                                                annotations.RemoveRange (startLine - 1, lineCount);
578
 
                                        if (!string.IsNullOrEmpty (e.InsertedText)) {
 
578
                                        if (!string.IsNullOrEmpty (e.InsertedText.Text)) {
579
579
                                                for (int i=0; i<lineCount; ++i)
580
580
                                                        annotations.Insert (startLine - 1, locallyModified);
581
581
                                        }
582
582
                                        return;
583
583
                                } else if (0 == e.RemovalLength) {
584
584
                                        // insert
585
 
                                        tokens = e.InsertedText.Split (new string[]{Environment.NewLine}, StringSplitOptions.None);
 
585
                                        tokens = e.InsertedText.Text.Split (new string[]{Environment.NewLine}, StringSplitOptions.None);
586
586
                                                lineCount = tokens.Length - 1;
587
587
                                                for (int i=0; i<lineCount; ++i) {
588
588
                                                        annotations.Insert (Math.Min (startLine, annotations.Count), locallyModified);