~ubuntu-branches/ubuntu/oneiric/monodevelop/oneiric-updates

« back to all changes in this revision

Viewing changes to src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads/DefaultMonitorPad.cs

  • Committer: Bazaar Package Importer
  • Author(s): Jo Shields
  • Date: 2009-02-18 08:40:51 UTC
  • mfrom: (1.2.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20090218084051-gh8m6ukvokbwj7cf
Tags: 1.9.2+dfsg-1ubuntu1
* Merge from Debian Experimental (LP: #330519), remaining Ubuntu changes:
  + debian/control:
    - Update for Gnome# 2.24
    - Add libmono-cairo1.0-cil to build-deps to fool pkg-config check

Show diffs side-by-side

added added

removed removed

Lines of Context:
52
52
                ToolButton buttonStop;
53
53
                ToggleToolButton buttonPin;
54
54
                TextMark endMark;
 
55
                bool progressStarted;
55
56
 
56
57
                private static Gtk.Tooltips tips = new Gtk.Tooltips ();
57
58
                
58
59
                TextTag tag;
59
60
                TextTag bold;
60
61
                TextTag errorTag;
 
62
                TextTag consoleLogTag;
61
63
                int ident = 0;
62
64
                ArrayList tags = new ArrayList ();
63
65
                Stack indents = new Stack ();
125
127
                        errorTag.Weight = Pango.Weight.Bold;
126
128
                        buffer.TagTable.Add (errorTag);
127
129
                        
 
130
                        consoleLogTag = new TextTag ("consoleLog");
 
131
                        consoleLogTag.Foreground = "darkgrey";
 
132
                        buffer.TagTable.Add (consoleLogTag);
 
133
                        
128
134
                        tag = new TextTag ("0");
129
135
                        tag.LeftMargin = 10;
130
136
                        buffer.TagTable.Add (tag);
132
138
                        
133
139
                        endMark = buffer.CreateMark ("end-mark", buffer.EndIter, false);
134
140
 
135
 
                        IdeApp.ProjectOperations.CombineOpened += (CombineEventHandler) DispatchService.GuiDispatch (new CombineEventHandler (OnCombineOpen));
136
 
                        IdeApp.ProjectOperations.CombineClosed += (CombineEventHandler) DispatchService.GuiDispatch (new CombineEventHandler (OnCombineClosed));
 
141
                        IdeApp.Workspace.FirstWorkspaceItemOpened += OnCombineOpen;
 
142
                        IdeApp.Workspace.LastWorkspaceItemClosed += OnCombineClosed;
137
143
 
138
144
                        Control.ShowAll ();
139
145
                        
187
193
                        asyncOperation.Cancel ();
188
194
                }
189
195
 
190
 
                void OnCombineOpen (object sender, CombineEventArgs e)
 
196
                void OnCombineOpen (object sender, EventArgs e)
191
197
                {
192
198
                        lock (updates.SyncRoot) outputDispatcherRunning = false;
193
199
                        buffer.Clear ();
194
200
                }
195
201
 
196
 
                void OnCombineClosed (object sender, CombineEventArgs e)
 
202
                void OnCombineClosed (object sender, EventArgs e)
197
203
                {
198
204
                        lock (updates.SyncRoot) outputDispatcherRunning = false;
199
205
                        buffer.Clear ();
208
214
                }
209
215
                
210
216
                public bool AllowReuse {
211
 
                        get { return !buttonStop.Sensitive && !buttonPin.Active; }
 
217
                        get { return !progressStarted && !buttonPin.Active; }
212
218
                }
213
219
                
214
220
                void addQueuedUpdate (QueuedUpdate update)
228
234
                        lock (updates.SyncRoot) {
229
235
                                updates.Clear ();
230
236
                                lastTextWrite = null;
 
237
                                progressStarted = true;
231
238
                        }
232
239
                        
233
240
                        Gtk.Application.Invoke (delegate {
284
291
                        addQueuedUpdate (qtw);
285
292
                }
286
293
                
 
294
                public void WriteConsoleLogText (string text)
 
295
                {
 
296
                        if (lastTextWrite != null)
 
297
                                text = "\n" + text;
 
298
                        QueuedTextWrite w = new QueuedTextWrite (text, consoleLogTag);
 
299
                        addQueuedUpdate (w);
 
300
                }
 
301
                
287
302
                public void WriteError (string text)
288
303
                {
289
304
                        QueuedTextWrite w = new QueuedTextWrite (text, errorTag);
290
305
                        addQueuedUpdate (w);
291
306
                }
292
307
                
293
 
                void WriteText (string text, TextTag extraTag)
294
 
                {
295
 
                        QueuedTextWrite w = new QueuedTextWrite (text, extraTag);
296
 
                        addQueuedUpdate (w);
297
 
                }
298
 
                
299
308
                public virtual Gtk.Widget Control {
300
309
                        get { return hbox; }
301
310
                }
326
335
                        Gtk.Application.Invoke (delegate {
327
336
                                window.Title = originalTitle;
328
337
                                buttonStop.Sensitive = false;
 
338
                                progressStarted = false;
329
339
                        });
330
340
                }
331
341