Skip to content
This repository was archived by the owner on Oct 4, 2021. It is now read-only.

Commit 91d8ecf

Browse files
authored
Merge pull request #9299 from mono/backport-pr-9294-to-release-8.4
[release-8.4] [Debugger] Improve Breakpoint dialog accessibility
2 parents e7c8dcc + 10ccab4 commit 91d8ecf

File tree

1 file changed

+13
-7
lines changed

1 file changed

+13
-7
lines changed

main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/BreakpointPropertiesDialog.cs

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,8 @@ public BreakpointPropertiesDialog (BreakEvent be, BreakpointType breakpointType)
127127
Task.Run (LoadExceptionList);
128128
Initialize ();
129129
SetInitialData ();
130-
SetAccessibility ();
131130
SetLayout ();
131+
SetAccessibility ();
132132
if (be == null) {
133133
switch (breakpointType) {
134134
case BreakpointType.Location:
@@ -671,14 +671,17 @@ void SetAccessibility ()
671671
{
672672
var accessible = breakpointActionPause.Accessible;
673673
accessible.Identifier = "BreakpointPropertiesDialog.Pause";
674+
accessible.LabelWidget = actionLabel;
674675
accessible.Description = GettextCatalog.GetString ("Cause the program to pause when the breakpoint is hit");
675676

676677
accessible = breakpointActionPrint.Accessible;
677678
accessible.Identifier = "BreakpointPropertiesDialog.Print";
679+
accessible.LabelWidget = actionLabel;
678680
accessible.Description = GettextCatalog.GetString ("Cause the program to print a message and continue when the breakpoint is hit");
679681

680682
accessible = entryPrintExpression.Accessible;
681683
accessible.Identifier = "BreakpointPropertiesDialog.PrintExpression";
684+
accessible.LabelWidget = actionLabel;
682685
accessible.Label = GettextCatalog.GetString ("Breakpoint Expression");
683686
accessible.Description = GettextCatalog.GetString ("Enter the expression you wish to have printed to the console. Place simple C# expressions within {} to interpolate them.");
684687

@@ -731,21 +734,22 @@ void SetAccessibility ()
731734

732735
accessible = ignoreHitType.Accessible;
733736
accessible.Identifier = "BreakpointPropertiesDialog.HitType";
734-
accessible.Label = GettextCatalog.GetString ("Breakpoint Hit Count Type");
737+
accessible.LabelWidget = advancedLabel;
735738
accessible.Description = GettextCatalog.GetString ("Select a hit count condition for this breakpoint");
736739

737740
accessible = ignoreHitCount.Accessible;
738741
accessible.Identifier = "BreakpointPropertiesDialog.HitCount";
739-
accessible.Label = GettextCatalog.GetString ("Hit Count");
742+
accessible.Label = GettextCatalog.GetString ("Condition Hit Count");
740743
accessible.Description = GettextCatalog.GetString ("Enter the hit count required for the condition");
741744

742745
accessible = conditionalHitType.Accessible;
743746
accessible.Identifier = "BreakpointPropertiesDialog.ConditionalHit";
744-
accessible.Label = GettextCatalog.GetString ("Conditional Breakpoint Hit Type");
747+
accessible.LabelWidget = advancedLabel;
745748
accessible.Description = GettextCatalog.GetString ("Select an extra condition for this breakpoint");
746749

747750
accessible = entryConditionalExpression.Accessible;
748751
accessible.Identifier = "BreakpointPropertiesDialog.ConditionEntry";
752+
accessible.LabelWidget = advancedLabel;
749753
accessible.Label = GettextCatalog.GetString ("Conditional Breakpoint Expression");
750754
accessible.Description = GettextCatalog.GetString ("Enter a C# boolean expression to act as a condition for this breakpoint. The scope of the expression is local to the breakpoint");
751755

@@ -754,13 +758,15 @@ void SetAccessibility ()
754758
accessible.Description = GettextCatalog.GetString ("There is a warning for the condition expression");
755759
}
756760

761+
Label actionLabel, whenLabel, advancedLabel;
762+
757763
void SetLayout ()
758764
{
759765
var vbox = new VBox ();
760766
vbox.Accessible.Role = Xwt.Accessibility.Role.Filler;
761767
vbox.MinWidth = 450;
762768

763-
var actionLabel = new Label (GettextCatalog.GetString ("Breakpoint Action")) {
769+
actionLabel = new Label (GettextCatalog.GetString ("Breakpoint Action")) {
764770
Font = vbox.Font.WithWeight (FontWeight.Bold)
765771
};
766772
vbox.PackStart (actionLabel);
@@ -792,7 +798,7 @@ void SetLayout ()
792798

793799
vbox.PackStart (breakpointActionGroup);
794800

795-
var whenLabel = new Label (GettextCatalog.GetString ("When to Take Action")) {
801+
whenLabel = new Label (GettextCatalog.GetString ("When to Take Action")) {
796802
Font = vbox.Font.WithWeight (FontWeight.Bold)
797803
};
798804
vbox.PackStart (whenLabel);
@@ -839,7 +845,7 @@ void SetLayout ()
839845
}
840846
vbox.PackStart (whenToTakeActionRadioGroup);
841847

842-
var advancedLabel = new Label (GettextCatalog.GetString ("Advanced Conditions")) {
848+
advancedLabel = new Label (GettextCatalog.GetString ("Advanced Conditions")) {
843849
Font = vbox.Font.WithWeight (FontWeight.Bold)
844850
};
845851
vbox.PackStart (advancedLabel);

0 commit comments

Comments
 (0)