~ubuntu-branches/ubuntu/saucy/monodevelop/saucy-proposed

« back to all changes in this revision

Viewing changes to src/core/MonoDevelop.Ide/MonoDevelop.Ide/MessageService.cs

  • Committer: Package Import Robot
  • Author(s): Jo Shields, 1840cc1
  • Date: 2012-02-05 10:49:36 UTC
  • mfrom: (10.2.12)
  • Revision ID: package-import@ubuntu.com-20120205104936-f3dutq6lnseokb6d
Tags: 2.8.6.3+dfsg-1
[1840cc1] Imported Upstream version 2.8.6.3+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
138
138
                }
139
139
                
140
140
                #region ShowException
141
 
                public static void ShowException (Exception e, string primaryText)
142
 
                {
143
 
                        ShowException (RootWindow, e, primaryText);
144
 
                }
145
141
                
146
142
                public static void ShowException (Exception e)
147
143
                {
148
144
                        ShowException (RootWindow, e);
149
145
                }
150
146
                
 
147
                public static void ShowException (Exception e, string message)
 
148
                {
 
149
                        ShowException (RootWindow, e, message);
 
150
                }
 
151
                
 
152
                public static void ShowException (Exception e, string message, string title)
 
153
                {
 
154
                        ShowException (RootWindow, e, message, title);
 
155
                }
 
156
                
 
157
                public static AlertButton ShowException (Exception e, string message, string title, params AlertButton[] buttons)
 
158
                {
 
159
                        return ShowException (RootWindow, e, message, title, buttons);
 
160
                }
 
161
 
151
162
                public static void ShowException (Gtk.Window parent, Exception e)
152
163
                {
153
164
                        ShowException (RootWindow, e, e.Message);
154
165
                }
155
166
                
156
 
                public static void ShowException (Gtk.Window parent, Exception e, string primaryText)
157
 
                {
158
 
                        messageService.ShowException (parent, e, primaryText);
 
167
                public static void ShowException (Gtk.Window parent, Exception e, string message)
 
168
                {
 
169
                        ShowException (parent, e, message, null);
 
170
                }
 
171
                
 
172
                public static void ShowException (Gtk.Window parent, Exception e, string message, string title)
 
173
                {
 
174
                        ShowException (parent, e, message, title, null);
 
175
                }
 
176
 
 
177
                public static AlertButton ShowException (Gtk.Window parent, Exception e, string message, string title, params AlertButton[] buttons)
 
178
                {
 
179
                        return messageService.ShowException (parent, title, message, e, buttons);
159
180
                }
160
181
                #endregion
161
182
                
410
431
                //The real GTK# code is wrapped in a GuiSyncObject to make calls synchronous on the GUI thread
411
432
                private class InternalMessageService : GuiSyncObject
412
433
                {
413
 
                        public void ShowException (Gtk.Window parent, Exception e, string primaryText)
 
434
                        public AlertButton ShowException (Gtk.Window parent, string title, string message, Exception e, params AlertButton[] buttons)
414
435
                        {
415
436
                                var exceptionDialog = new ExceptionDialog () {
416
 
                                        Message = primaryText,
 
437
                                        Buttons = buttons ?? new AlertButton[] { AlertButton.Ok },
 
438
                                        Title = title ?? GettextCatalog.GetString ("An error has occurred"),
 
439
                                        Message = message,
417
440
                                        Exception = e,
418
441
                                        TransientFor = parent,
419
442
                                };
420
443
                                exceptionDialog.Run ();
 
444
                                return exceptionDialog.ResultButton;
421
445
                        }
422
446
                        
423
447
                        public AlertButton GenericAlert (MessageDescription message)