~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/DiffWidget.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:
36
36
                VersionControlDocumentInfo info;
37
37
                Mono.TextEditor.TextEditor diffTextEditor;
38
38
                MonoDevelop.VersionControl.Views.ComparisonWidget comparisonWidget;
 
39
                Gtk.Button buttonNext;
 
40
                Gtk.Button buttonPrev;
 
41
                Gtk.Button buttonDiff;
 
42
                Gtk.Label labelOverview;
39
43
 
40
44
                internal ComparisonWidget ComparisonWidget {
41
45
                        get {
75
79
                        this.info = info;
76
80
                        this.Build ();
77
81
                        comparisonWidget = new MonoDevelop.VersionControl.Views.ComparisonWidget (viewOnly);
 
82
                        buttonNext = new DocumentToolButton (Gtk.Stock.GoUp, GettextCatalog.GetString ("Previous Change"));
 
83
                        buttonPrev = new DocumentToolButton (Gtk.Stock.GoDown, GettextCatalog.GetString ("Next Change"));
 
84
                        labelOverview = new Gtk.Label () { Xalign = 0 };
 
85
                        buttonDiff = new Gtk.Button (GettextCatalog.GetString ("Unified Diff"));
78
86
                        
79
 
                        fixed1.SetSizeRequest (16, 16);
80
87
                        this.buttonNext.Clicked += (sender, args) => ComparisonWidget.GotoNext ();
81
88
                        this.buttonPrev.Clicked += (sender, args) => ComparisonWidget.GotoPrev ();
82
89
                        notebook1.Page = 0;
94
101
                        
95
102
                        diffTextEditor.Options.ShowFoldMargin = false;
96
103
                        diffTextEditor.Options.ShowIconMargin = false;
 
104
                        diffTextEditor.Options.DrawIndentationMarkers = PropertyService.Get ("DrawIndentationMarkers", false);
97
105
                        diffTextEditor.Document.ReadOnly = true;
98
106
                        scrolledwindow1.Child = diffTextEditor;
99
107
                        diffTextEditor.Show ();
100
108
                        SetButtonSensitivity ();
101
109
                }
 
110
 
 
111
                internal void SetToolbar (DocumentToolbar toolbar)
 
112
                {
 
113
                        toolbar.Add (labelOverview, true);
 
114
                        toolbar.Add (buttonDiff);
 
115
                        toolbar.Add (buttonPrev);
 
116
                        toolbar.Add (buttonNext);
 
117
                        toolbar.ShowAll ();
 
118
                }
102
119
                
103
120
                void SetButtonSensitivity ()
104
121
                {