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

« back to all changes in this revision

Viewing changes to src/core/MonoDevelop.Ide/MonoDevelop.Ide.CodeTemplates/CodeTemplatePanel.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:
46
46
                public CodeTemplatePanelWidget (OptionsDialog parent)
47
47
                {
48
48
                        this.Build();
49
 
                        scrolledwindow1.Child = textEditor;
 
49
                        scrolledwindow1.Add (textEditor);
50
50
                        textEditor.ShowAll ();
51
51
                        
52
52
                        templateStore = new TreeStore (typeof (CodeTemplate), typeof (string), typeof (string));
77
77
                        options.ShowLineNumberMargin = false;
78
78
                        options.ShowFoldMargin = false;
79
79
                        options.ShowIconMargin = false;
80
 
                        options.ShowInvalidLines = false;
81
 
                        options.ShowSpaces = options.ShowTabs = options.ShowEolMarkers = false;
82
80
                        textEditor.Options = options;
83
81
                        textEditor.Document.ReadOnly = true;
84
82
                        this.buttonAdd.Clicked += ButtonAddClicked;
85
83
                        this.buttonEdit.Clicked += ButtonEditClicked;
86
84
                        this.buttonRemove.Clicked += ButtonRemoveClicked;
87
 
                        checkbuttonWhiteSpaces.Toggled += CheckbuttonWhiteSpacesToggled;
88
85
                        this.treeviewCodeTemplates.Selection.Changed += SelectionChanged;
89
86
                        SelectionChanged (null, null);
 
87
                        checkbuttonWhiteSpaces.Hide ();
90
88
                }
91
89
 
92
90
                void SelectionChanged (object sender, EventArgs e)
94
92
                        buttonRemove.Sensitive = buttonEdit.Sensitive = (GetSelectedTemplate () != null);
95
93
                }
96
94
 
97
 
                void CheckbuttonWhiteSpacesToggled (object sender, EventArgs e)
98
 
                {
99
 
                        options.ShowSpaces = options.ShowTabs = options.ShowEolMarkers = checkbuttonWhiteSpaces.Active;
100
 
                        textEditor.QueueDraw ();
101
 
                }
102
 
 
103
95
                void ButtonRemoveClicked (object sender, EventArgs e)
104
96
                {
105
97
                        TreeIter selected;