diff options
author | Greg Munn <gregm@microsoft.com> | 2019-10-01 18:10:29 +0300 |
---|---|---|
committer | Greg Munn <gregm@microsoft.com> | 2019-10-01 18:10:29 +0300 |
commit | 65fe2b4c78e25a1bbcc80e7d814df1406bdc4d39 (patch) | |
tree | 28218794f7854a6818f936870ae9186fd4305e64 | |
parent | 25437671c8e0c543275857bf9042783279ec5fa6 (diff) |
Testing VO announcements.vsts-939364-test
-rw-r--r-- | main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Dialogs/PolicyOptionsPanel.cs | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Dialogs/PolicyOptionsPanel.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Dialogs/PolicyOptionsPanel.cs index 467818e652..a724d7ec1b 100644 --- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Dialogs/PolicyOptionsPanel.cs +++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Dialogs/PolicyOptionsPanel.cs @@ -89,13 +89,16 @@ namespace MonoDevelop.Ide.Gui.Dialogs warningMessage = new HBox (); warningMessage.Spacing = 6; - var img = new ImageView (Stock.Warning, IconSize.LargeToolbar); + + var warningMsg = GettextCatalog.GetString ("Changes made in this section will only be applied to new projects. " + + "Settings for existing projects can be modified in the project (or solution) options dialog."); + var img = new InformationPopoverWidget { Severity = Ide.Tasks.TaskSeverity.Warning, Message = warningMsg, CanGetFocus = true }; + img.SetCommonAccessibilityAttributes ("PolicyOptionsPanel.Warning", - GettextCatalog.GetString ("Warning"), + warningMsg, null); - warningMessage.PackStart (img, false, false, 0); - Label wl = new Label (GettextCatalog.GetString ("Changes made in this section will only be applied to new projects. " + - "Settings for existing projects can be modified in the project (or solution) options dialog.")); + warningMessage.PackStart (img.ToGtkWidget(), false, false, 0); + Label wl = new Label (warningMsg); wl.Xalign = 0; wl.Wrap = true; wl.WidthRequest = 450; @@ -103,7 +106,7 @@ namespace MonoDevelop.Ide.Gui.Dialogs warningMessage.ShowAll (); warningMessage.Visible = false; vbox.PackEnd (warningMessage, false, false, 0); - + policyPanel = CreatePanelWidget (); //HACK: work around bug 469427 - broken themes match on widget names if (policyPanel.Name.IndexOf ("Panel") > 0) @@ -255,7 +258,13 @@ namespace MonoDevelop.Ide.Gui.Dialogs policyCombo.Active = active; else policyCombo.Active = store.IterNChildren () - 1; + warningMessage.Visible = isGlobalPolicy && !((IEquatable<T>)pol).Equals (GetCurrentValue ()); + + // test + if (warningMessage.Visible) { + IdeApp.Workbench.RootWindow.Accessible.MakeAccessibilityAnnouncement ("this is an announcement that doesn't seem to work"); + } } protected abstract string PolicyTitleWithMnemonic { get; } |