Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/monodevelop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/main/src
diff options
context:
space:
mode:
authoriain holmes <iain@xamarin.com>2017-05-05 14:38:17 +0300
committeriain holmes <iain@xamarin.com>2017-05-15 13:17:41 +0300
commit24f6b2f64aa391cae29f656b867ebc3a981e62db (patch)
treec7dd1cdfbdd2b42d67e77d4f77f2afdec3b381d5 /main/src
parent6fcac94d6ee2424be5f61a36936a005447b5edd3 (diff)
[A11y] Make the project options panels accessible
Adds label and help to most of the project options panels in the main repo. Panels using Xwt can't be made accessible yet. Partially fixes #53537
Diffstat (limited to 'main/src')
-rw-r--r--main/src/addins/CSharpBinding/MonoDevelop.CSharp.Project/CodeGenerationPanel.cs40
-rw-r--r--main/src/addins/CSharpBinding/MonoDevelop.CSharp.Project/CompilerOptionsPanelWidget.cs34
-rw-r--r--main/src/addins/MonoDevelop.Packaging/MonoDevelop.Packaging.Gui/GtkNuGetPackageMetadataOptionsPanelWidget.cs87
-rw-r--r--main/src/addins/MonoDevelop.Packaging/MonoDevelop.Packaging.Gui/GtkProjectNuGetBuildOptionsPanelWidget.cs10
-rw-r--r--main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl.Dialogs/CommitMessageStylePanelWidget.cs34
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Components.AtkCocoaHelper/AtkCocoaHelper.cs20
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Components/BaseFileEntry.cs18
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Dialogs/MimeTypePolicyOptionsPanel.cs12
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.OptionPanels/TextStylePolicyPanel.cs34
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads/ErrorListPad.cs140
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects.OptionPanels/BaseDirectoryPanelWidget.cs11
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects.OptionPanels/CommonAssemblySigningPreferences.cs19
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects.OptionPanels/CustomCommandWidget.cs25
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects.OptionPanels/GeneralProjectOptions.cs38
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects.OptionPanels/NamespaceSynchronisationPanel.cs20
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects.OptionPanels/OutputOptionsPanel.cs16
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.StandardHeader/StandardHeaderPolicyPanel.cs14
17 files changed, 488 insertions, 84 deletions
diff --git a/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Project/CodeGenerationPanel.cs b/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Project/CodeGenerationPanel.cs
index 651b9d7337..318c2e204c 100644
--- a/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Project/CodeGenerationPanel.cs
+++ b/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Project/CodeGenerationPanel.cs
@@ -28,10 +28,12 @@
using System;
using MonoDevelop.Components;
+using MonoDevelop.Components.AtkCocoaHelper;
using MonoDevelop.Projects;
using MonoDevelop.Ide.Gui.Dialogs;
using System.Collections.Generic;
using System.Linq;
+using MonoDevelop.Core;
namespace MonoDevelop.CSharp.Project
{
@@ -50,6 +52,44 @@ namespace MonoDevelop.CSharp.Project
{
Build ();
xmlDocsEntry.DisplayAsRelativePath = true;
+
+ SetupAccessibility ();
+ }
+
+ void SetupAccessibility ()
+ {
+ generateOverflowChecksCheckButton.SetCommonAccessibilityAttributes ("CompilerOptions.OverflowChecks", null,
+ GettextCatalog.GetString ("Check this to enable overflow checking"));
+ enableOptimizationCheckButton.SetCommonAccessibilityAttributes ("CompilerOptions.Optimizations", null,
+ GettextCatalog.GetString ("Check this to enable optimizations"));
+ generateXmlOutputCheckButton.SetCommonAccessibilityAttributes ("CompilerOptions.XmlDoc", null,
+ GettextCatalog.GetString ("Check this to generate XML documentation"));
+ xmlDocsEntry.EntryAccessible.Name = "CompilerOptions.XmlEntry";
+ xmlDocsEntry.EntryAccessible.SetLabel (GettextCatalog.GetString ("XML Filename"));
+ xmlDocsEntry.EntryAccessible.Description = GettextCatalog.GetString ("Enter the filename for the generated XML documentation");
+
+ comboDebug.SetCommonAccessibilityAttributes ("CompilerOptions.DebugCombo", GettextCatalog.GetString ("Debug Information"),
+ GettextCatalog.GetString ("Select the level of debugging information to be generated"));
+ comboDebug.SetAccessibilityLabelRelationship (label2);
+
+ symbolsEntry.SetCommonAccessibilityAttributes ("CompilerOptions.SymbolsEntry", GettextCatalog.GetString ("Define Symbols"),
+ GettextCatalog.GetString ("Enter the symbols the compiler should define"));
+ symbolsEntry.SetAccessibilityLabelRelationship (label87);
+
+ comboPlatforms.SetCommonAccessibilityAttributes ("CompilerOptions.Platforms", GettextCatalog.GetString ("Platform Target"),
+ GettextCatalog.GetString ("Select the platform to target"));
+ comboPlatforms.SetAccessibilityLabelRelationship (label1);
+
+ warningLevelSpinButton.SetCommonAccessibilityAttributes ("CompilerOptions.WarningsLevel", GettextCatalog.GetString ("Warning Level"),
+ GettextCatalog.GetString ("Select the warning level to use"));
+ warningLevelSpinButton.SetAccessibilityLabelRelationship (label85);
+
+ ignoreWarningsEntry.SetCommonAccessibilityAttributes ("CompilerOptions.IgnoreWarnings", GettextCatalog.GetString ("Ignore Warnings"),
+ GettextCatalog.GetString ("Enter the warning numbers separated by a comma that the compile should ignore"));
+ ignoreWarningsEntry.SetAccessibilityLabelRelationship (label86);
+
+ warningsAsErrorsCheckButton.SetCommonAccessibilityAttributes ("CompilerOptions.WarningsAsErrors", null,
+ GettextCatalog.GetString ("Check to treat warnings as errors"));
}
//doing just original.Split(whitespaces).Distinct().Join(";") would make modifications to .csproj with " "(space) seperator
diff --git a/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Project/CompilerOptionsPanelWidget.cs b/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Project/CompilerOptionsPanelWidget.cs
index 1da11ca8ab..d3081dcecc 100644
--- a/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Project/CompilerOptionsPanelWidget.cs
+++ b/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Project/CompilerOptionsPanelWidget.cs
@@ -31,6 +31,7 @@ using System;
using Gtk;
using MonoDevelop.Components;
+using MonoDevelop.Components.AtkCocoaHelper;
using MonoDevelop.Core;
using MonoDevelop.Projects;
using MonoDevelop.Projects.Text;
@@ -123,6 +124,39 @@ namespace MonoDevelop.CSharp.Project
}
} while (langVerStore.IterNext (ref iter));
}
+
+ SetupAccessibility ();
+ }
+
+ void SetupAccessibility ()
+ {
+ compileTargetCombo.SetCommonAccessibilityAttributes ("CodeGeneration.CompileTarget",
+ GettextCatalog.GetString ("Compile Target"),
+ GettextCatalog.GetString ("Select the compile target for the code generation"));
+ compileTargetCombo.SetAccessibilityLabelRelationship (label86);
+
+ mainClassEntry.SetCommonAccessibilityAttributes ("CodeGeneration.MainClass",
+ GettextCatalog.GetString ("Main Class"),
+ GettextCatalog.GetString ("Enter the main class for the code generation"));
+ mainClassEntry.SetAccessibilityLabelRelationship (label88);
+
+ iconEntry.SetEntryAccessibilityAttributes ("CodeGeneration.WinIcon", GettextCatalog.GetString ("Win32 Icon"),
+ GettextCatalog.GetString ("Enter the file to use as the icon on Windows"));
+ iconEntry.SetAccessibilityLabelRelationship (label3);
+
+ codepageEntry.SetCommonAccessibilityAttributes ("CodeGeneration.CodePage", GettextCatalog.GetString ("Compiler Code Page"),
+ GettextCatalog.GetString ("Select the compiler code page"));
+ codepageEntry.SetAccessibilityLabelRelationship (label1);
+
+ noStdLibCheckButton.SetCommonAccessibilityAttributes ("CodeGeneration.NoStdLib", null, GettextCatalog.GetString ("Whether or not to include a reference to mscorlib.dll"));
+
+ langVerCombo.SetCommonAccessibilityAttributes ("CodeGeneration.LanguageVersion",
+ GettextCatalog.GetString ("C# Language Version"),
+ GettextCatalog.GetString ("Select the version of C# to use"));
+ langVerCombo.SetAccessibilityLabelRelationship (label2);
+
+ allowUnsafeCodeCheckButton.SetCommonAccessibilityAttributes ("CodeGeneration.AllowUnsafe", null,
+ GettextCatalog.GetString ("Check to allow 'unsafe' code"));
}
public bool ValidateChanges ()
diff --git a/main/src/addins/MonoDevelop.Packaging/MonoDevelop.Packaging.Gui/GtkNuGetPackageMetadataOptionsPanelWidget.cs b/main/src/addins/MonoDevelop.Packaging/MonoDevelop.Packaging.Gui/GtkNuGetPackageMetadataOptionsPanelWidget.cs
index 6ade8ad23e..0008cbeaf2 100644
--- a/main/src/addins/MonoDevelop.Packaging/MonoDevelop.Packaging.Gui/GtkNuGetPackageMetadataOptionsPanelWidget.cs
+++ b/main/src/addins/MonoDevelop.Packaging/MonoDevelop.Packaging.Gui/GtkNuGetPackageMetadataOptionsPanelWidget.cs
@@ -30,6 +30,8 @@ using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using Gtk;
+using MonoDevelop.Components.AtkCocoaHelper;
+using MonoDevelop.Core;
using MonoDevelop.Projects;
namespace MonoDevelop.Packaging.Gui
@@ -46,6 +48,91 @@ namespace MonoDevelop.Packaging.Gui
this.Build ();
PopulateLanguages ();
+
+ SetupAccessibility ();
+ }
+
+ void SetupAccessibility ()
+ {
+ packageIdTextBox.SetCommonAccessibilityAttributes ("NuGetMetadata.ID",
+ GettextCatalog.GetString ("ID"),
+ GettextCatalog.GetString ("Enter the ID of the NuGet package"));
+ packageIdTextBox.SetAccessibilityLabelRelationship (packageIdLabel);
+
+ packageVersionTextBox.SetCommonAccessibilityAttributes ("NuGetMetadata.Version",
+ GettextCatalog.GetString ("Version"),
+ GettextCatalog.GetString ("Enter the version of the NuGet package"));
+ packageVersionTextBox.SetAccessibilityLabelRelationship (packageVersionLabel);
+
+ packageAuthorsTextBox.SetCommonAccessibilityAttributes ("NuGetMetadata.Authors",
+ GettextCatalog.GetString ("Authors"),
+ GettextCatalog.GetString ("Enter the authors of the NuGet package"));
+ packageAuthorsTextBox.SetAccessibilityLabelRelationship (packageAuthorsLabel);
+
+ packageDescriptionTextView.SetCommonAccessibilityAttributes ("NuGetMetadata.Description",
+ GettextCatalog.GetString ("Description"),
+ GettextCatalog.GetString ("Enter the description of the NuGet package"));
+ packageDescriptionTextView.SetAccessibilityLabelRelationship (packageDescriptionLabel);
+
+ packageOwnersTextBox.SetCommonAccessibilityAttributes ("NuGetMetadata.Owners",
+ GettextCatalog.GetString ("Owners"),
+ GettextCatalog.GetString ("Enter the owners of the NuGet package"));
+ packageOwnersTextBox.SetAccessibilityLabelRelationship (packageOwnersLabel);
+
+ packageCopyrightTextBox.SetCommonAccessibilityAttributes ("NuGetMetadata.Copyright",
+ GettextCatalog.GetString ("Copyright"),
+ GettextCatalog.GetString ("Enter the copyright statement for the NuGet package"));
+ packageCopyrightTextBox.SetAccessibilityLabelRelationship (packageCopyrightLabel);
+
+ packageTitleTextBox.SetCommonAccessibilityAttributes ("NuGetMetadata.Title",
+ GettextCatalog.GetString ("Title"),
+ GettextCatalog.GetString ("Enter the title of the NuGet package"));
+ packageTitleTextBox.SetAccessibilityLabelRelationship (packageTitleLabel);
+
+ packageSummaryTextBox.SetCommonAccessibilityAttributes ("NuGetMetadata.Summary",
+ GettextCatalog.GetString ("Summary"),
+ GettextCatalog.GetString ("Enter the summary for the NuGet package"));
+ packageSummaryTextBox.SetAccessibilityLabelRelationship (packageSummaryLabel);
+
+ packageProjectUrlTextBox.SetCommonAccessibilityAttributes ("NuGetMetadata.URL",
+ GettextCatalog.GetString ("Project URL"),
+ GettextCatalog.GetString ("Enter the project URL for the NuGet package"));
+ packageProjectUrlTextBox.SetAccessibilityLabelRelationship (packageProjectUrlLabel);
+
+ packageIconUrlTextBox.SetCommonAccessibilityAttributes ("NuGetMetadata.Icon",
+ GettextCatalog.GetString ("Icon URL"),
+ GettextCatalog.GetString ("Enter the URL for the NuGet package's icon"));
+ packageIconUrlTextBox.SetAccessibilityLabelRelationship (packageIconUrlLabel);
+
+ packageLicenseUrlTextBox.SetCommonAccessibilityAttributes ("NuGetMetadata.licence",
+ GettextCatalog.GetString ("License URL"),
+ GettextCatalog.GetString ("Enter the URL for the NuGet package's license"));
+ packageLicenseUrlTextBox.SetAccessibilityLabelRelationship (packageLicenseUrlLabel);
+
+ packageRequireLicenseAcceptanceCheckBox.SetCommonAccessibilityAttributes ("NuGetMetadata.Acceptance",
+ GettextCatalog.GetString ("Require License Acceptance"),
+ GettextCatalog.GetString ("Check to require the user to accept the NuGet package's license"));
+ packageRequireLicenseAcceptanceCheckBox.SetAccessibilityLabelRelationship (packageRequireLicenseAcceptanceLabel);
+
+ packageDevelopmentDependencyCheckBox.SetCommonAccessibilityAttributes ("NuGetMetadata.Development",
+ GettextCatalog.GetString ("Development Dependency"),
+ GettextCatalog.GetString ("Check to indicate that this is a development dependency"));
+ packageDevelopmentDependencyCheckBox.SetAccessibilityLabelRelationship (packageDevelopmentDependencyLabel);
+
+ packageTagsTextBox.SetCommonAccessibilityAttributes ("NuGetMetadata.Tags",
+ GettextCatalog.GetString ("Tags"),
+ GettextCatalog.GetString ("Enter the tags for this NuGet package"));
+ packageTagsTextBox.SetAccessibilityLabelRelationship (packageTagsLabel);
+
+ packageLanguageComboBox.SetCommonAccessibilityAttributes ("NuGetMetadata.Language",
+ GettextCatalog.GetString ("Language"),
+ GettextCatalog.GetString ("Select the language for this NuGet package"));
+ packageLanguageComboBox.SetAccessibilityLabelRelationship (packageLanguageLabel);
+
+ packageReleaseNotesTextView.SetCommonAccessibilityAttributes ("NuGetMetadata.ReleaseNotes",
+ GettextCatalog.GetString ("Release Notes"),
+ GettextCatalog.GetString ("Enter the release notes for this NuGet package"));
+ packageReleaseNotesTextView.SetAccessibilityLabelRelationship (packageReleaseNotesLabel);
}
internal static System.Action<bool> OnProjectHasMetadataChanged;
diff --git a/main/src/addins/MonoDevelop.Packaging/MonoDevelop.Packaging.Gui/GtkProjectNuGetBuildOptionsPanelWidget.cs b/main/src/addins/MonoDevelop.Packaging/MonoDevelop.Packaging.Gui/GtkProjectNuGetBuildOptionsPanelWidget.cs
index 6e41b7485c..682eb24bb1 100644
--- a/main/src/addins/MonoDevelop.Packaging/MonoDevelop.Packaging.Gui/GtkProjectNuGetBuildOptionsPanelWidget.cs
+++ b/main/src/addins/MonoDevelop.Packaging/MonoDevelop.Packaging.Gui/GtkProjectNuGetBuildOptionsPanelWidget.cs
@@ -25,6 +25,8 @@
// THE SOFTWARE.
using System;
+using MonoDevelop.Components.AtkCocoaHelper;
+using MonoDevelop.Core;
namespace MonoDevelop.Packaging.Gui
{
@@ -38,6 +40,14 @@ namespace MonoDevelop.Packaging.Gui
UpdateMissingMetadataLabelVisibility ();
packOnBuildButton.Toggled += PackOnBuildButtonToggled;
GtkNuGetPackageMetadataOptionsPanelWidget.OnProjectHasMetadataChanged = OnProjectHasMetadataChanged;
+
+ SetupAccessibility ();
+ }
+
+ void SetupAccessibility ()
+ {
+ packOnBuildButton.SetCommonAccessibilityAttributes ("NugetBuildOptionsPanel.PackOnBuild", null,
+ GettextCatalog.GetString ("Check to create a NuGet package when building"));
}
public bool PackOnBuild {
diff --git a/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl.Dialogs/CommitMessageStylePanelWidget.cs b/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl.Dialogs/CommitMessageStylePanelWidget.cs
index 569406bad0..89cdf48306 100644
--- a/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl.Dialogs/CommitMessageStylePanelWidget.cs
+++ b/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl.Dialogs/CommitMessageStylePanelWidget.cs
@@ -26,6 +26,7 @@
//
using System;
+using MonoDevelop.Components.AtkCocoaHelper;
using MonoDevelop.Ide;
using MonoDevelop.Projects;
using MonoDevelop.Ide.Fonts;
@@ -47,8 +48,39 @@ namespace MonoDevelop.VersionControl
this.Build();
textview.AcceptsTab = true;
+
+ SetupAccessibility ();
}
-
+
+ void SetupAccessibility ()
+ {
+ entryHeader.SetCommonAccessibilityAttributes ("CommitMessageStyle.HeaderEntry",
+ GettextCatalog.GetString ("Message Header"),
+ GettextCatalog.GetString ("Enter the commit message header"));
+ entryHeader.SetAccessibilityLabelRelationship (label4);
+
+ checkUseBullets.SetCommonAccessibilityAttributes ("CommitMessageStyle.UseBullets", null,
+ GettextCatalog.GetString ("Check to use bullets for each entry"));
+ checkIndentEntries.SetCommonAccessibilityAttributes ("CommitMessageStyle.IndentEntries", null,
+ GettextCatalog.GetString ("Check to indent each entry"));
+ checkIndent.SetCommonAccessibilityAttributes ("CommitMessageStyle.CheckIndent", null,
+ GettextCatalog.GetString ("Check to align the message text"));
+ checkLineSep.SetCommonAccessibilityAttributes ("CommitMessageStyle.CheckLineSep", null,
+ GettextCatalog.GetString ("Check to add a blank line between messages"));
+ checkOneLinePerFile.SetCommonAccessibilityAttributes ("CommitMessageStyle.CheckOneLine", null,
+ GettextCatalog.GetString ("Check to add one line per file changed"));
+ checkMsgInNewLine.SetCommonAccessibilityAttributes ("CommitMessageStyle.CheckMsgNewLine", null,
+ GettextCatalog.GetString ("Check to keep the file name and messages on separate lines"));
+ checkIncludeDirs.SetCommonAccessibilityAttributes ("CommitMessageStyle.CheckIncludeDirs", null,
+ GettextCatalog.GetString ("Check to include file directories"));
+ checkWrap.SetCommonAccessibilityAttributes ("CommitMessageStyle.Wrap", null,
+ GettextCatalog.GetString ("Check to wrap the lines at 60 characters"));
+ textview.SetCommonAccessibilityAttributes ("CommitMessagesStyle.Preview",
+ GettextCatalog.GetString ("Preview"),
+ GettextCatalog.GetString ("A preview of the settings above"));
+ textview.SetAccessibilityLabelRelationship (label9);
+ }
+
public void Load (CommitMessageFormat format, AuthorInformation uinfo)
{
updating = true;
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.AtkCocoaHelper/AtkCocoaHelper.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.AtkCocoaHelper/AtkCocoaHelper.cs
index cfb35700cc..7d302902f2 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.AtkCocoaHelper/AtkCocoaHelper.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.AtkCocoaHelper/AtkCocoaHelper.cs
@@ -40,9 +40,15 @@ namespace MonoDevelop.Components.AtkCocoaHelper
{
public static void SetCommonAttributes (this Atk.Object o, string name, string label, string help)
{
- o.Name = name;
- o.Description = help;
- o.SetLabel (label);
+ if (!string.IsNullOrEmpty (name)) {
+ o.Name = name;
+ }
+ if (!string.IsNullOrEmpty (name)) {
+ o.Description = help;
+ }
+ if (!string.IsNullOrEmpty (name)) {
+ o.SetLabel (label);
+ }
}
public static void SetCommonAccessibilityAttributes (this Gtk.Widget w, string name, string label, string help)
@@ -50,6 +56,12 @@ namespace MonoDevelop.Components.AtkCocoaHelper
var accessible = w.Accessible;
accessible.SetCommonAttributes (name, label, help);
}
+
+ public static void SetAccessibilityLabelRelationship (this Gtk.Widget w, Gtk.Widget label)
+ {
+ w.Accessible.SetTitleUIElement (label.Accessible);
+ label.Accessible.SetTitleFor (w.Accessible);
+ }
}
// AtkCocoaHelper wraps NSAccessibilityElement to set NSAccessibility properties that aren't supported by Atk
@@ -494,4 +506,4 @@ namespace MonoDevelop.Components.AtkCocoaHelper
Func<int, AtkCocoa.Range> StyleRangeForIndex { set; }
Func<Gdk.Point, AtkCocoa.Range> RangeForPosition { set; }
}
-} \ No newline at end of file
+}
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/BaseFileEntry.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/BaseFileEntry.cs
index 0af5978317..89b90e9b4d 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/BaseFileEntry.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/BaseFileEntry.cs
@@ -1,4 +1,4 @@
-//
+//
// BaseFileEntry.cs
//
// Author:
@@ -32,6 +32,7 @@ using Gtk;
using Gdk;
using MonoDevelop.Core;
+using MonoDevelop.Components.AtkCocoaHelper;
namespace MonoDevelop.Components
{
@@ -49,6 +50,9 @@ namespace MonoDevelop.Components
this.BrowserTitle = name;
pathEntry = new Entry ();
browseButton = Button.NewWithMnemonic (GettextCatalog.GetString ("_Browse..."));
+ browseButton.SetCommonAccessibilityAttributes ("FileEntry.Browse",
+ GettextCatalog.GetString ("Browse"),
+ GettextCatalog.GetString ("Select a folder for the entry"));
pathEntry.Changed += OnTextChanged;
browseButton.Clicked += OnButtonClicked;
@@ -143,5 +147,17 @@ namespace MonoDevelop.Components
if (!loading && PathChanged != null)
PathChanged (this, EventArgs.Empty);
}
+
+ // Accessibility
+ public void SetEntryAccessibilityAttributes (string name, string label, string help)
+ {
+ pathEntry.SetCommonAccessibilityAttributes (name, label, help);
+ }
+
+ public Atk.Object EntryAccessible {
+ get {
+ return pathEntry.Accessible;
+ }
+ }
}
}
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Dialogs/MimeTypePolicyOptionsPanel.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Dialogs/MimeTypePolicyOptionsPanel.cs
index 27954a4a2d..470df600cc 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Dialogs/MimeTypePolicyOptionsPanel.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Dialogs/MimeTypePolicyOptionsPanel.cs
@@ -29,6 +29,7 @@ using System.Collections.Generic;
using Gtk;
using System.Linq;
+using MonoDevelop.Components.AtkCocoaHelper;
using MonoDevelop.Core;
using MonoDevelop.Ide.Gui.Dialogs;
using MonoDevelop.Projects;
@@ -276,9 +277,16 @@ namespace MonoDevelop.Ide.Gui.Dialogs
panelWidget.Sensitive = true;
}
};
-
+
+ defaultSettingsButton.SetCommonAccessibilityAttributes ("MimePanel.DefaultCheckbox", null,
+ GettextCatalog.GetString ("Check to use the default settings from '{0}'", baseType));
+ defaultSettingsButton.Accessible.AddLinkedUIElement (panelWidget.Accessible);
+
box.PackStart (defaultSettingsButton, false, false, 0);
- box.PackStart (new HSeparator (), false, false, 0);
+ var hsep = new HSeparator ();
+ hsep.Accessible.SetShouldIgnore (true);
+
+ box.PackStart (hsep, false, false, 0);
box.ShowAll ();
box.PackStart (panelWidget, true, true, 0);
panelWidget.Show ();
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.OptionPanels/TextStylePolicyPanel.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.OptionPanels/TextStylePolicyPanel.cs
index d6bd13b7d2..db3bd63674 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.OptionPanels/TextStylePolicyPanel.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.OptionPanels/TextStylePolicyPanel.cs
@@ -26,6 +26,7 @@
using System;
using MonoDevelop.Components;
+using MonoDevelop.Components.AtkCocoaHelper;
using MonoDevelop.Core;
using MonoDevelop.Projects.Policies;
using MonoDevelop.Ide.Projects;
@@ -71,8 +72,39 @@ namespace MonoDevelop.Ide.Gui.OptionPanels
lineEndingCombo.AppendText (GettextCatalog.GetString ("Mac Classic"));
lineEndingCombo.AppendText (GettextCatalog.GetString ("Unix / Mac"));
lineEndingCombo.AppendText (GettextCatalog.GetString ("Microsoft Windows")); // Using "Windows" is too short, otherwise the translation get's confused. Mike
+
+ SetupAccessibility ();
+ }
+
+ void SetupAccessibility ()
+ {
+ columnWidthSpin.SetCommonAccessibilityAttributes ("Textpolicy.WidthSpinner",
+ GettextCatalog.GetString ("Desired File Width"),
+ GettextCatalog.GetString ("The desired width of the file in columns"));
+ columnWidthSpin.SetAccessibilityLabelRelationship (label1);
+
+ lineEndingCombo.SetCommonAccessibilityAttributes ("Textpolicy.LineEndings",
+ GettextCatalog.GetString ("Line Endings"),
+ GettextCatalog.GetString ("Select the type of line endings the file should have"));
+ lineEndingCombo.SetAccessibilityLabelRelationship (label6);
+
+ tabWidthSpin.SetCommonAccessibilityAttributes ("Textpolicy.TabWidth",
+ GettextCatalog.GetString ("Tab Width"),
+ GettextCatalog.GetString ("Select the width of tab stops"));
+ tabWidthSpin.SetAccessibilityLabelRelationship (label7);
+
+ indentWidthSpin.SetCommonAccessibilityAttributes ("Textpolicy.IndentWidth",
+ GettextCatalog.GetString ("Indent Width"),
+ GettextCatalog.GetString ("Select the width of indents"));
+ indentWidthSpin.SetAccessibilityLabelRelationship (label9);
+
+ tabsToSpaceCheck.SetCommonAccessibilityAttributes ("Textpolicy.TabsToSpaces", null,
+ GettextCatalog.GetString ("Check to automatically convert tabs to spaces"));
+ tabsAfterNonTabsCheck.SetCommonAccessibilityAttributes ("Textpolicy.TabsAfterSpaces", null,
+ GettextCatalog.GetString ("Check to allow tabs after non-tabs"));
+ removeTrailingWhitespaceCheck.SetCommonAccessibilityAttributes ("Textpolicy.TrailingWhitespace", null,
+ GettextCatalog.GetString ("Check to automatically remove trailing whitespace from a line"));
}
-
protected virtual void UpdateState (object sender, System.EventArgs e)
{
panel.UpdateSelectedNamedPolicy ();
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads/ErrorListPad.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads/ErrorListPad.cs
index 6980899f1a..f7538ac892 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads/ErrorListPad.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads/ErrorListPad.cs
@@ -97,17 +97,17 @@ namespace MonoDevelop.Ide.Gui.Pads
internal const int Task = 2;
internal const int Description = 3;
}
-
+
static class VisibleColumns
{
- internal const int Type = 0;
- internal const int Marked = 1;
- internal const int Line = 2;
+ internal const int Type = 0;
+ internal const int Marked = 1;
+ internal const int Line = 2;
internal const int Description = 3;
- internal const int File = 4;
- internal const int Project = 5;
- internal const int Path = 6;
- internal const int Category = 7;
+ internal const int File = 4;
+ internal const int Project = 5;
+ internal const int Path = 6;
+ internal const int Category = 7;
}
public override Control Control {
@@ -157,7 +157,7 @@ namespace MonoDevelop.Ide.Gui.Pads
errorBtn.Toggled += new EventHandler (FilterChanged);
errorBtn.TooltipText = GettextCatalog.GetString ("Show Errors");
errorBtn.Accessible.Description = GettextCatalog.GetString ("Show Errors");
- UpdateErrorsNum();
+ UpdateErrorsNum ();
toolbar.Add (errorBtn);
warnBtn = MakeButton (Stock.Warning, "toggleWarnings", ShowWarnings, out warnBtnLbl);
@@ -165,7 +165,7 @@ namespace MonoDevelop.Ide.Gui.Pads
warnBtn.Toggled += new EventHandler (FilterChanged);
warnBtn.TooltipText = GettextCatalog.GetString ("Show Warnings");
warnBtn.Accessible.Description = GettextCatalog.GetString ("Show Warnings");
- UpdateWarningsNum();
+ UpdateWarningsNum ();
toolbar.Add (warnBtn);
msgBtn = MakeButton (Stock.Information, "toggleMessages", ShowMessages, out msgBtnLbl);
@@ -173,7 +173,7 @@ namespace MonoDevelop.Ide.Gui.Pads
msgBtn.Toggled += new EventHandler (FilterChanged);
msgBtn.TooltipText = GettextCatalog.GetString ("Show Messages");
msgBtn.Accessible.Description = GettextCatalog.GetString ("Show Messages");
- UpdateMessagesNum();
+ UpdateMessagesNum ();
toolbar.Add (msgBtn);
var sep = new SeparatorToolItem ();
@@ -236,45 +236,45 @@ namespace MonoDevelop.Ide.Gui.Pads
sort.SetSortFunc (VisibleColumns.Project, ProjectIterSort);
sort.SetSortFunc (VisibleColumns.File, FileIterSort);
sort.SetSortFunc (VisibleColumns.Category, CategoryIterSort);
-
+
view = new PadTreeView (sort);
view.ShowExpanders = true;
view.RulesHint = true;
view.DoPopupMenu = (evnt) => IdeApp.CommandService.ShowContextMenu (view, evnt, CreateMenu ());
AddColumns ();
LoadColumnsVisibility ();
- view.Columns[VisibleColumns.Type].SortColumnId = VisibleColumns.Type;
- view.Columns[VisibleColumns.Project].SortColumnId = VisibleColumns.Project;
- view.Columns[VisibleColumns.File].SortColumnId = VisibleColumns.File;
- view.Columns[VisibleColumns.Category].SortColumnId = VisibleColumns.Category;
-
+ view.Columns [VisibleColumns.Type].SortColumnId = VisibleColumns.Type;
+ view.Columns [VisibleColumns.Project].SortColumnId = VisibleColumns.Project;
+ view.Columns [VisibleColumns.File].SortColumnId = VisibleColumns.File;
+ view.Columns [VisibleColumns.Category].SortColumnId = VisibleColumns.Category;
+
sw = new MonoDevelop.Components.CompactScrolledWindow ();
sw.ShadowType = ShadowType.None;
sw.Add (view);
- TaskService.Errors.TasksRemoved += ShowResults;
- TaskService.Errors.TasksAdded += TaskAdded;
- TaskService.Errors.TasksChanged += TaskChanged;
+ TaskService.Errors.TasksRemoved += ShowResults;
+ TaskService.Errors.TasksAdded += TaskAdded;
+ TaskService.Errors.TasksChanged += TaskChanged;
TaskService.Errors.CurrentLocationTaskChanged += HandleTaskServiceErrorsCurrentLocationTaskChanged;
-
+
IdeApp.Workspace.FirstWorkspaceItemOpened += OnCombineOpen;
IdeApp.Workspace.LastWorkspaceItemClosed += OnCombineClosed;
-
+
view.RowActivated += new RowActivatedHandler (OnRowActivated);
-
+
iconWarning = ImageService.GetIcon (Ide.Gui.Stock.Warning, Gtk.IconSize.Menu);
iconError = ImageService.GetIcon (Ide.Gui.Stock.Error, Gtk.IconSize.Menu);
iconInfo = ImageService.GetIcon (Ide.Gui.Stock.Information, Gtk.IconSize.Menu);
iconEmpty = ImageService.GetIcon (Ide.Gui.Stock.Empty, Gtk.IconSize.Menu);
-
+
control.Add1 (sw);
-
+
outputView = new LogView { Name = "buildOutput" };
control.Add2 (outputView);
-
+
control.ShowAll ();
-
+
control.SizeAllocated += HandleControlSizeAllocated;
-
+
bool outputVisible = OutputViewVisible;
if (outputVisible) {
outputView.Visible = true;
@@ -282,9 +282,9 @@ namespace MonoDevelop.Ide.Gui.Pads
} else {
outputView.Hide ();
}
-
+
sw.SizeAllocated += HandleSwSizeAllocated;
-
+
// Load existing tasks
foreach (TaskListEntry t in TaskService.Errors) {
AddTask (t);
@@ -303,15 +303,15 @@ namespace MonoDevelop.Ide.Gui.Pads
base.Dispose ();
}
-
+
void HandleSwSizeAllocated (object o, SizeAllocatedArgs args)
{
if (!initialLogShow && outputView.Visible) {
- var val = (double) ((double) control.Position / (double) control.Allocation.Width);
+ var val = (double)((double)control.Position / (double)control.Allocation.Width);
LogSeparatorPosition.Value = val;
}
}
-
+
[GLib.ConnectBefore]
void HandleControlSizeAllocated (object o, SizeAllocatedArgs args)
{
@@ -320,7 +320,7 @@ namespace MonoDevelop.Ide.Gui.Pads
initialLogShow = false;
}
}
-
+
public ProgressMonitor GetBuildProgressMonitor ()
{
if (control == null)
@@ -338,10 +338,10 @@ namespace MonoDevelop.Ide.Gui.Pads
if (!view.Model.GetIterFirst (out it))
return;
do {
- TaskListEntry t = (TaskListEntry) view.Model.GetValue (it, DataColumns.Task);
+ TaskListEntry t = (TaskListEntry)view.Model.GetValue (it, DataColumns.Task);
if (t == TaskService.Errors.CurrentLocationTask) {
view.Selection.SelectIter (it);
- view.ScrollToCell (view.Model.GetPath (it), view.Columns[0], false, 0, 0);
+ view.ScrollToCell (view.Model.GetPath (it), view.Columns [0], false, 0, 0);
it = filter.ConvertIterToChildIter (sort.ConvertIterToChildIter (it));
store.SetValue (it, DataColumns.Read, true);
return;
@@ -355,15 +355,15 @@ namespace MonoDevelop.Ide.Gui.Pads
if (!view.Model.GetIterFirst (out iter))
return;
do {
- var t = (TaskListEntry) view.Model.GetValue (iter, DataColumns.Task);
+ var t = (TaskListEntry)view.Model.GetValue (iter, DataColumns.Task);
if (t == taskListEntry) {
view.Selection.SelectIter (iter);
- view.ScrollToCell (view.Model.GetPath (iter), view.Columns[0], false, 0, 0);
+ view.ScrollToCell (view.Model.GetPath (iter), view.Columns [0], false, 0, 0);
return;
}
} while (view.Model.IterNext (ref iter));
}
-
+
void LoadColumnsVisibility ()
{
var columns = PropertyService.Get ("Monodevelop.ErrorListColumns", string.Join (";", Enumerable.Repeat ("TRUE", view.Columns.Length)));
@@ -386,7 +386,7 @@ namespace MonoDevelop.Ide.Gui.Pads
{
if (menu != null)
return menu;
-
+
var group = new ActionGroup ("Popup");
var help = new Gtk.Action ("help", GettextCatalog.GetString ("Show Error Reference"),
@@ -410,56 +410,56 @@ namespace MonoDevelop.Ide.Gui.Pads
var columnType = new ToggleAction ("columnType", GettextCatalog.GetString ("Type"),
GettextCatalog.GetString ("Toggle visibility of Type column"), null);
columnType.Toggled += OnColumnVisibilityChanged;
- columnsActions[columnType] = VisibleColumns.Type;
+ columnsActions [columnType] = VisibleColumns.Type;
group.Add (columnType);
var columnValidity = new ToggleAction ("columnValidity", GettextCatalog.GetString ("Validity"),
GettextCatalog.GetString ("Toggle visibility of Validity column"), null);
columnValidity.Toggled += OnColumnVisibilityChanged;
- columnsActions[columnValidity] = VisibleColumns.Marked;
+ columnsActions [columnValidity] = VisibleColumns.Marked;
group.Add (columnValidity);
var columnLine = new ToggleAction ("columnLine", GettextCatalog.GetString ("Line"),
GettextCatalog.GetString ("Toggle visibility of Line column"), null);
columnLine.Toggled += OnColumnVisibilityChanged;
- columnsActions[columnLine] = VisibleColumns.Line;
+ columnsActions [columnLine] = VisibleColumns.Line;
group.Add (columnLine);
var columnDescription = new ToggleAction ("columnDescription", GettextCatalog.GetString ("Description"),
GettextCatalog.GetString ("Toggle visibility of Description column"), null);
columnDescription.Toggled += OnColumnVisibilityChanged;
- columnsActions[columnDescription] = VisibleColumns.Description;
+ columnsActions [columnDescription] = VisibleColumns.Description;
group.Add (columnDescription);
var columnFile = new ToggleAction ("columnFile", GettextCatalog.GetString ("File"),
GettextCatalog.GetString ("Toggle visibility of File column"), null);
columnFile.Toggled += OnColumnVisibilityChanged;
- columnsActions[columnFile] = VisibleColumns.File;
+ columnsActions [columnFile] = VisibleColumns.File;
group.Add (columnFile);
var columnProject = new ToggleAction ("columnProject", GettextCatalog.GetString ("Project"),
GettextCatalog.GetString ("Toggle visibility of Project column"), null);
columnProject.Toggled += OnColumnVisibilityChanged;
- columnsActions[columnProject] = VisibleColumns.Project;
+ columnsActions [columnProject] = VisibleColumns.Project;
group.Add (columnProject);
var columnPath = new ToggleAction ("columnPath", GettextCatalog.GetString ("Path"),
GettextCatalog.GetString ("Toggle visibility of Path column"), null);
columnPath.Toggled += OnColumnVisibilityChanged;
- columnsActions[columnPath] = VisibleColumns.Path;
+ columnsActions [columnPath] = VisibleColumns.Path;
group.Add (columnPath);
var columnCategory = new ToggleAction ("columnCategory", GettextCatalog.GetString ("Category"),
- GettextCatalog.GetString ("Toggle visibility of Category column"), null);
+ GettextCatalog.GetString ("Toggle visibility of Category column"), null);
columnCategory.Toggled += OnColumnVisibilityChanged;
- columnsActions[columnCategory] = VisibleColumns.Category;
+ columnsActions [columnCategory] = VisibleColumns.Category;
group.Add (columnCategory);
var uiManager = new UIManager ();
uiManager.InsertActionGroup (group, 0);
-
+
string uiStr = "<ui><popup name='popup'>"
+ "<menuitem action='help'/>"
+ "<menuitem action='copy'/>"
@@ -482,14 +482,14 @@ namespace MonoDevelop.Ide.Gui.Pads
menu.ShowAll ();
menu.Shown += delegate {
- columnType.Active = view.Columns[VisibleColumns.Type].Visible;
- columnValidity.Active = view.Columns[VisibleColumns.Marked].Visible;
- columnLine.Active = view.Columns[VisibleColumns.Line].Visible;
- columnDescription.Active = view.Columns[VisibleColumns.Description].Visible;
- columnFile.Active = view.Columns[VisibleColumns.File].Visible;
- columnProject.Active = view.Columns[VisibleColumns.Project].Visible;
- columnPath.Active = view.Columns[VisibleColumns.Path].Visible;
- columnCategory.Active = view.Columns[VisibleColumns.Category].Visible;
+ columnType.Active = view.Columns [VisibleColumns.Type].Visible;
+ columnValidity.Active = view.Columns [VisibleColumns.Marked].Visible;
+ columnLine.Active = view.Columns [VisibleColumns.Line].Visible;
+ columnDescription.Active = view.Columns [VisibleColumns.Description].Visible;
+ columnFile.Active = view.Columns [VisibleColumns.File].Visible;
+ columnProject.Active = view.Columns [VisibleColumns.Project].Visible;
+ columnPath.Active = view.Columns [VisibleColumns.Path].Visible;
+ columnCategory.Active = view.Columns [VisibleColumns.Category].Visible;
help.Sensitive = copy.Sensitive = jump.Sensitive =
view.Selection != null &&
view.Selection.CountSelectedRows () > 0 &&
@@ -502,16 +502,15 @@ namespace MonoDevelop.Ide.Gui.Pads
string dummyString;
help.Sensitive &= GetSelectedErrorReference (out dummyString);
};
-
+
return menu;
}
- TaskListEntry SelectedTask
- {
+ TaskListEntry SelectedTask {
get {
TreeModel model;
TreeIter iter;
- if (view.Selection.GetSelected (out model, out iter))
+ if (view.Selection.GetSelected (out model, out iter))
return model.GetValue (iter, DataColumns.Task) as TaskListEntry;
return null; // no one selected
}
@@ -605,9 +604,8 @@ namespace MonoDevelop.Ide.Gui.Pads
void OnColumnVisibilityChanged (object o, EventArgs args)
{
ToggleAction action = o as ToggleAction;
- if (action != null)
- {
- view.Columns[columnsActions[action]].Visible = action.Active;
+ if (action != null) {
+ view.Columns [columnsActions [action]].Visible = action.Active;
StoreColumnsVisibility ();
}
}
@@ -615,16 +613,16 @@ namespace MonoDevelop.Ide.Gui.Pads
void AddColumns ()
{
CellRendererImage iconRender = new CellRendererImage ();
-
+
Gtk.CellRendererToggle toggleRender = new Gtk.CellRendererToggle ();
toggleRender.Toggled += new ToggledHandler (ItemToggled);
-
+
TreeViewColumn col;
col = view.AppendColumn ("!", iconRender, "image", DataColumns.Type);
-
+
col = view.AppendColumn ("", toggleRender);
col.SetCellDataFunc (toggleRender, new Gtk.TreeCellDataFunc (ToggleDataFunc));
-
+
col = view.AppendColumn (GettextCatalog.GetString ("Line"), view.TextRenderer);
col.SetCellDataFunc (view.TextRenderer, new Gtk.TreeCellDataFunc (LineDataFunc));
@@ -888,11 +886,11 @@ namespace MonoDevelop.Ide.Gui.Pads
AddTaskInternal (t);
filter.Refilter ();
}
-
+
void AddTaskInternal (TaskListEntry t)
{
if (tasks.Contains (t)) return;
-
+
Xwt.Drawing.Image stock;
switch (t.Severity) {
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects.OptionPanels/BaseDirectoryPanelWidget.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects.OptionPanels/BaseDirectoryPanelWidget.cs
index 520fc66781..0094dea3de 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects.OptionPanels/BaseDirectoryPanelWidget.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects.OptionPanels/BaseDirectoryPanelWidget.cs
@@ -1,4 +1,4 @@
-// BaseDirectoryPanel.cs
+// BaseDirectoryPanel.cs
//
// Author:
// Lluis Sanchez Gual <lluis@novell.com>
@@ -27,6 +27,9 @@
using System;
+using MonoDevelop.Components.AtkCocoaHelper;
+using MonoDevelop.Core;
+
namespace MonoDevelop.Ide.Projects.OptionPanels
{
@@ -38,6 +41,12 @@ namespace MonoDevelop.Ide.Projects.OptionPanels
public BaseDirectoryPanelWidget()
{
this.Build();
+ var a = folderentry.EntryAccessible;
+ a.SetTitleUIElement (label3.Accessible);
+ label3.Accessible.SetTitleFor (a);
+ folderentry.SetEntryAccessibilityAttributes ("BaseDirectory.FolderEntry",
+ GettextCatalog.GetString ("Root Directory"),
+ GettextCatalog.GetString ("Entry the root directory for the project"));
}
public string BaseDirectory {
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects.OptionPanels/CommonAssemblySigningPreferences.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects.OptionPanels/CommonAssemblySigningPreferences.cs
index c0a509bfc6..60ed5f2b2f 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects.OptionPanels/CommonAssemblySigningPreferences.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects.OptionPanels/CommonAssemblySigningPreferences.cs
@@ -29,6 +29,7 @@
using System;
using System.Collections.Generic;
using MonoDevelop.Components;
+using MonoDevelop.Components.AtkCocoaHelper;
using MonoDevelop.Ide.Gui.Dialogs;
using MonoDevelop.Projects;
using MonoDevelop.Core;
@@ -43,8 +44,24 @@ namespace MonoDevelop.Ide.Projects.OptionPanels
public CommonAssemblySigningPreferences ()
{
this.Build();
+
+ SetupAccessibility ();
}
-
+
+ void SetupAccessibility ()
+ {
+ signAssemblyCheckbutton.SetCommonAccessibilityAttributes ("SigningOptions.Sign", null,
+ GettextCatalog.GetString ("Check to enable assembly signing"));
+ strongNameFileEntry.EntryAccessible.Name = "SigningOptions.NameFile";
+ strongNameFileEntry.EntryAccessible.SetLabel (GettextCatalog.GetString ("Strong Name File"));
+ strongNameFileEntry.EntryAccessible.Description = GettextCatalog.GetString ("Enter the Strong Name File");
+ strongNameFileEntry.EntryAccessible.SetTitleUIElement (strongNameFileLabel.Accessible);
+ strongNameFileLabel.Accessible.SetTitleFor (strongNameFileEntry.EntryAccessible);
+
+ delaySignCheckbutton.SetCommonAccessibilityAttributes ("SigningOptions.Delay", null,
+ GettextCatalog.GetString ("Delay signing the assembly"));
+ }
+
public void LoadPanelContents (Project project, ItemConfiguration[] configurations)
{
this.configurations = configurations;
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects.OptionPanels/CustomCommandWidget.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects.OptionPanels/CustomCommandWidget.cs
index f016c28e3e..3abd9f6f20 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects.OptionPanels/CustomCommandWidget.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects.OptionPanels/CustomCommandWidget.cs
@@ -97,8 +97,31 @@ namespace MonoDevelop.Ide.Projects.OptionPanels
tagSelectorCommand.ButtonAccessible.SetCommonAttributes ("CustomCommand.TagSelector",
GettextCatalog.GetString ("Tag Selector"),
GettextCatalog.GetString ("Insert a custom tag into the command entry"));
+
+ SetupAccessibility ();
}
-
+
+ void SetupAccessibility ()
+ {
+ comboType.SetCommonAccessibilityAttributes ("CustomCommands.OperationType",
+ GettextCatalog.GetString ("Select a project operation"),
+ GettextCatalog.GetString ("Select the type of project operation to add a custom command for"));
+ buttonRemove.SetCommonAccessibilityAttributes ("CustomCommands.Remove", null, GettextCatalog.GetString ("Click to remove this custom command"));
+
+ entryCommand.SetCommonAccessibilityAttributes ("CustomCommand.CommandEntry", GettextCatalog.GetString ("Command"),
+ GettextCatalog.GetString ("Enter the custom command"));
+ entryCommand.SetAccessibilityLabelRelationship (label3);
+ buttonBrowse.SetCommonAccessibilityAttributes ("CustomCommand.CommandBrowse", "", GettextCatalog.GetString ("Use a file selector to select a custom command"));
+
+ entryName.SetCommonAccessibilityAttributes ("CustomCommands.WorkingDirectory",
+ GettextCatalog.GetString ("Working Directory"),
+ GettextCatalog.GetString ("Enter the directory for the command to execute in"));
+ entryName.SetAccessibilityLabelRelationship (label1);
+
+ checkExternalCons.SetCommonAccessibilityAttributes ("CustomCommands.RunOnExtConsole", null, GettextCatalog.GetString ("Check for the command to run on an external console"));
+ checkPauseCons.SetCommonAccessibilityAttributes ("CustomCommands.Pause", null, GettextCatalog.GetString ("Check to pause the console output"));
+ }
+
public CustomCommand CustomCommand {
get { return cmd; }
}
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects.OptionPanels/GeneralProjectOptions.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects.OptionPanels/GeneralProjectOptions.cs
index c50c616ec6..c3eccb5a71 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects.OptionPanels/GeneralProjectOptions.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects.OptionPanels/GeneralProjectOptions.cs
@@ -27,8 +27,10 @@ using System;
using MonoDevelop.Ide.Gui.Dialogs;
using MonoDevelop.Components;
+using MonoDevelop.Components.AtkCocoaHelper;
using MonoDevelop.Projects;
using MonoDevelop.Projects.SharedAssetsProjects;
+using MonoDevelop.Core;
namespace MonoDevelop.Ide.Projects.OptionPanels
{
@@ -78,6 +80,42 @@ namespace MonoDevelop.Ide.Projects.OptionPanels
entryVersion.Text = project.Version;
checkSolutionVersion.Active = project.SyncVersionWithSolution;
entryVersion.Sensitive = !project.SyncVersionWithSolution;
+
+ SetAccessibilityAttributes ();
+ }
+
+ void SetAccessibilityAttributes ()
+ {
+ informationHeaderLabel.Accessible.SetTitleFor (table11.Accessible);
+ table11.Accessible.SetTitleUIElement (informationHeaderLabel.Accessible);
+
+ projectNameEntry.Accessible.SetTitleUIElement (nameLabel.Accessible);
+ projectNameEntry.SetCommonAccessibilityAttributes ("GeneralProjectOptions.ProjectNameEntry",
+ GettextCatalog.GetString ("Project Name"),
+ GettextCatalog.GetString ("Enter the project name"));
+ nameLabel.Accessible.SetTitleFor (projectNameEntry.Accessible);
+
+ entryVersion.Accessible.SetTitleUIElement (label1.Accessible);
+ entryVersion.SetCommonAccessibilityAttributes ("GeneralProjectOptions.VersionEntry",
+ GettextCatalog.GetString ("Project Version"),
+ GettextCatalog.GetString ("Enter the project version"));
+ label1.Accessible.SetTitleFor (entryVersion.Accessible);
+
+ checkSolutionVersion.SetCommonAccessibilityAttributes ("GeneralProjectOptions.SolutionVersion", null,
+ GettextCatalog.GetString ("Check to use the same version as the solution"));
+
+ projectDescriptionTextView.Accessible.SetTitleUIElement (descriptionLabel.Accessible);
+ descriptionLabel.Accessible.SetTitleFor (projectDescriptionTextView.Accessible);
+
+ projectDescriptionTextView.SetCommonAccessibilityAttributes ("GeneralProjectOptions.Description",
+ GettextCatalog.GetString ("Project Description"),
+ GettextCatalog.GetString ("Enter a description of the project"));
+
+ projectDefaultNamespaceEntry.Accessible.SetTitleUIElement (defaultNamespaceLabel.Accessible);
+ projectDefaultNamespaceEntry.SetCommonAccessibilityAttributes ("GeneralProjectOptions.Namespace",
+ GettextCatalog.GetString ("Default Namespace"),
+ GettextCatalog.GetString ("Enter the default namespace for the project"));
+ defaultNamespaceLabel.Accessible.SetTitleFor (projectDescriptionTextView.Accessible);
}
public void Store ()
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects.OptionPanels/NamespaceSynchronisationPanel.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects.OptionPanels/NamespaceSynchronisationPanel.cs
index 1b64831c41..61e9f62a85 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects.OptionPanels/NamespaceSynchronisationPanel.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects.OptionPanels/NamespaceSynchronisationPanel.cs
@@ -34,6 +34,7 @@ using MonoDevelop.Projects.Policies;
using MonoDevelop.Ide.Gui.Dialogs;
using System.Linq;
using MonoDevelop.Components;
+using MonoDevelop.Components.AtkCocoaHelper;
namespace MonoDevelop.Ide.Projects.OptionPanels
{
@@ -166,8 +167,25 @@ namespace MonoDevelop.Ide.Projects.OptionPanels
previewFrame.ShowAll ();
UpdatePreview (null, EventArgs.Empty);
+
+ SetupAccessibility ();
}
-
+
+ void SetupAccessibility ()
+ {
+ checkAssociateNamespacesDirectories.SetCommonAccessibilityAttributes ("NamespaceOptions.AssociateNamespace",
+ null,
+ GettextCatalog.GetString ("Check to associate namespaces with directory names"));
+ checkDefaultAsRoot.SetCommonAccessibilityAttributes ("NamespaceOptions.DefaultRoot", null,
+ GettextCatalog.GetString ("Check to use the default namespace as the root of all namespaces"));
+ radioFlat.SetCommonAccessibilityAttributes ("NamespaceOptions.Flat", null,
+ GettextCatalog.GetString ("Check to use a flat folder structure"));
+ radioHierarch.SetCommonAccessibilityAttributes ("NamespaceOptions.Hierarchy", null,
+ GettextCatalog.GetString ("Check to use a hierarchical folder structure"));
+ checkVSStyleResourceNames.SetCommonAccessibilityAttributes ("NamespaceOptions.VSNames", null,
+ GettextCatalog.GetString ("Check to use Visual Studio style resource names"));
+ }
+
public void LoadFrom (DotNetNamingPolicy policy)
{
checkAssociateNamespacesDirectories.Active = (policy.DirectoryNamespaceAssociation != DirectoryNamespaceAssociation.None);
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects.OptionPanels/OutputOptionsPanel.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects.OptionPanels/OutputOptionsPanel.cs
index c25deb35ef..afb3211a3f 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects.OptionPanels/OutputOptionsPanel.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects.OptionPanels/OutputOptionsPanel.cs
@@ -28,6 +28,7 @@ using System.Collections;
using System.Collections.Generic;
using Gtk;
using MonoDevelop.Components;
+using MonoDevelop.Components.AtkCocoaHelper;
using MonoDevelop.Core;
using MonoDevelop.Ide.Gui.Dialogs;
using MonoDevelop.Projects;
@@ -87,6 +88,21 @@ namespace MonoDevelop.Ide.Projects.OptionPanels
public OutputOptionsPanelWidget ()
{
Build ();
+
+ SetupAccessibility ();
+ }
+
+ void SetupAccessibility ()
+ {
+ assemblyNameEntry.SetCommonAccessibilityAttributes ("OutputOptionsPanel.AssemblyEntry",
+ GettextCatalog.GetString ("Assembly Name"),
+ GettextCatalog.GetString ("Enter the name of the output assembly"));
+ assemblyNameEntry.SetAccessibilityLabelRelationship (label98);
+ outputPathEntry.EntryAccessible.SetCommonAttributes ("OutputOptionsPanel.OutputEntry",
+ GettextCatalog.GetString ("Output Path"),
+ GettextCatalog.GetString ("Enter the output path"));
+ outputPathEntry.EntryAccessible.SetTitleUIElement (label99.Accessible);
+ label99.Accessible.SetTitleFor (outputPathEntry.EntryAccessible);
}
public void Load (Project project, ItemConfiguration[] configs)
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.StandardHeader/StandardHeaderPolicyPanel.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.StandardHeader/StandardHeaderPolicyPanel.cs
index 7fa743915b..d872561f68 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.StandardHeader/StandardHeaderPolicyPanel.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.StandardHeader/StandardHeaderPolicyPanel.cs
@@ -28,6 +28,7 @@
using System;
using MonoDevelop.Components;
+using MonoDevelop.Components.AtkCocoaHelper;
using MonoDevelop.Core;
using MonoDevelop.Core.Serialization;
using MonoDevelop.Projects.Policies;
@@ -103,8 +104,21 @@ namespace MonoDevelop.Ide.StandardHeader
w4.Expand = false;
treeviewTemplates.WidthRequest = 200;
treeviewTemplates.QueueResize ();
+
+ SetupAccessibility ();
}
+ void SetupAccessibility ()
+ {
+ headerText.SetCommonAccessibilityAttributes ("StandardHeaderPanel.HeaderText",
+ GettextCatalog.GetString ("Header Text"),
+ GettextCatalog.GetString ("Enter the text to be used for the standard header"));
+ treeviewTemplates.SetCommonAccessibilityAttributes ("StandardHeaderPanel.TemplateTree",
+ GettextCatalog.GetString ("Templates"),
+ GettextCatalog.GetString ("Select a template to be inserted into the header text"));
+ includeAutoCheck.SetCommonAccessibilityAttributes ("StandardHeaderPanel.AutoCheck", null,
+ GettextCatalog.GetString ("Check to include the standard header in newly created files"));
+ }
void TreeviewTemplates_RowActivated (object o, Gtk.RowActivatedArgs args)
{
Gtk.TreeIter iter;