|
31 | 31 | using System.Collections.Generic; |
32 | 32 |
|
33 | 33 | using Foundation; |
| 34 | +using GLib; |
34 | 35 | using Gtk; |
35 | 36 |
|
36 | 37 | using Mono.Debugging.Client; |
37 | 38 |
|
38 | 39 | using MonoDevelop.Ide; |
39 | 40 | using MonoDevelop.Core; |
40 | 41 | using MonoDevelop.Components; |
| 42 | +using MonoDevelop.Components.AtkCocoaHelper; |
41 | 43 | using MonoDevelop.Ide.TextEditing; |
42 | 44 | using MonoDevelop.Ide.Editor.Extension; |
43 | 45 |
|
@@ -97,6 +99,8 @@ Widget CreateExceptionHeader () |
97 | 99 | icon.Yalign = 0; |
98 | 100 |
|
99 | 101 | exceptionTypeLabel = new Label { Xalign = 0.0f, Selectable = true, CanFocus = false }; |
| 102 | + icon.SetCommonAccessibilityAttributes ("ExceptionCaughtDialog.WarningIcon", exceptionTypeLabel, null); |
| 103 | + |
100 | 104 | exceptionMessageLabel = new Label { Wrap = true, Xalign = 0.0f, Selectable = true, CanFocus = false }; |
101 | 105 | helpLinkButton = new Button { HasFocus = true, Xalign = 0, Relief = ReliefStyle.None, BorderWidth = 0 }; |
102 | 106 | helpLinkButton.Name = "exception_help_link_label"; |
@@ -255,10 +259,10 @@ Widget CreateExceptionValueTreeView () |
255 | 259 | label.Xalign = 0; |
256 | 260 | label.Xpad = 10; |
257 | 261 |
|
258 | | - protected override void OnSizeRequested (ref Requisition requisition) |
259 | | - { |
260 | | - base.OnSizeRequested (ref requisition); |
261 | | - requisition.Height = 28; |
| 262 | + if (exceptionValueTreeView != null) { |
| 263 | + exceptionValueTreeView.SetCommonAccessibilityAttributes ("ExceptionCaughtDialog.ExceptionValueTreeView", label, null); |
| 264 | + } else { |
| 265 | + macExceptionValueTreeView.AccessibilityTitle = new NSString (label.Text); |
262 | 266 | } |
263 | 267 |
|
264 | 268 | var vbox = new VBox (); |
@@ -319,6 +323,8 @@ Widget CreateStackTraceTreeView () |
319 | 323 | label.Xalign = 0; |
320 | 324 | label.Xpad = 10; |
321 | 325 |
|
| 326 | + stackTraceTreeView.SetCommonAccessibilityAttributes ("ExceptionCaughtDialog.StackTraceTreeView", label, null); |
| 327 | + |
322 | 328 | var vbox2 = new VBox (); |
323 | 329 | vbox2.PackStart (label, false, false, 12); |
324 | 330 | vbox2.PackStart (vbox, true, true, 0); |
@@ -435,6 +441,7 @@ Widget CreateInnerExceptionMessage () |
435 | 441 | innerExceptionTypeLabel.Xalign = 0; |
436 | 442 | innerExceptionTypeLabel.Selectable = true; |
437 | 443 | innerExceptionTypeLabel.CanFocus = false; |
| 444 | + icon.SetCommonAccessibilityAttributes ("ExceptionCaughtDialog.InnerExceptionWarningIcon", innerExceptionTypeLabel, null); |
438 | 445 | hbox.PackStart (innerExceptionTypeLabel, false, true, 4); |
439 | 446 |
|
440 | 447 | innerExceptionMessageLabel = new Label (); |
@@ -518,6 +525,10 @@ Widget CreateInnerExceptionsTree () |
518 | 525 | UpdateSelectedException ((ExceptionInfo)innerExceptionsTreeView.Model.GetValue (selectedIter, 0)); |
519 | 526 | } |
520 | 527 | }; |
| 528 | + innerExceptionsTreeView.SetCommonAccessibilityAttributes ( |
| 529 | + "ExceptionCaughtDialog.InnerExceptionsTreeView", |
| 530 | + GettextCatalog.GetString ("Inner Exceptions"), |
| 531 | + null); |
521 | 532 | var eventBox = new EventBox (); |
522 | 533 | eventBox.ModifyBg (StateType.Normal, Styles.ExceptionCaughtDialog.TreeBackgroundColor.ToGdkColor ()); // top and bottom padders |
523 | 534 | var vbox = new VBox (); |
@@ -720,6 +731,7 @@ protected override void OnDestroyed () |
720 | 731 |
|
721 | 732 | class CellRendererInnerException : CellRenderer |
722 | 733 | { |
| 734 | + [Property ("text")] // Enables Voice Over support. |
723 | 735 | public string Text { get; set; } |
724 | 736 |
|
725 | 737 | Pango.FontDescription font = Pango.FontDescription.FromString (Platform.IsWindows ? "9" : "11"); |
|
0 commit comments