diff options
author | Lluis Sanchez <llsan@microsoft.com> | 2017-03-27 16:50:33 +0300 |
---|---|---|
committer | Lluis Sanchez <llsan@microsoft.com> | 2017-03-27 16:50:33 +0300 |
commit | 3718d45fec657dca4797fb3371a69001d297d08b (patch) | |
tree | 1ece6f36d6923fbaff1b86e09a862cd0d6b8d958 /main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui | |
parent | 5e6a84247cb5f8c28927091fe8feeabc712f6d3c (diff) | |
parent | 4e6f0931a4a0e5a18666aadc4c192e323bb1bef0 (diff) |
Merge branch 'master' into vNext-webtools-platform
Diffstat (limited to 'main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui')
5 files changed, 57 insertions, 1 deletions
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/BackgroundProgressMonitor.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/BackgroundProgressMonitor.cs index 25aac3297a..82035b410f 100644 --- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/BackgroundProgressMonitor.cs +++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/BackgroundProgressMonitor.cs @@ -45,6 +45,8 @@ namespace MonoDevelop.Ide.Gui Application.Invoke (delegate { var img = ImageService.GetIcon (iconName, IconSize.Menu); icon = IdeApp.Workbench.StatusBar.ShowStatusIcon (img); + icon.Title = GettextCatalog.GetString ("Background Progress"); + icon.Help = GettextCatalog.GetString ("An operation is occuring in the background"); if (icon == null) LoggingService.LogError ("Icon '" + iconName + "' not found."); }); diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/BaseViewContent.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/BaseViewContent.cs index 1762462f49..e7c991caf4 100644 --- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/BaseViewContent.cs +++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/BaseViewContent.cs @@ -59,6 +59,12 @@ namespace MonoDevelop.Ide.Gui } } + public virtual string TabAccessibilityDescription { + get { + return string.Empty; + } + } + public virtual bool CanReuseView (string fileName) { return false; diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/DefaultWorkbench.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/DefaultWorkbench.cs index 056046ce66..e84e999093 100644 --- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/DefaultWorkbench.cs +++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/DefaultWorkbench.cs @@ -42,6 +42,7 @@ using MonoDevelop.Components.Docking; using GLib; using Gtk; using MonoDevelop.Components; +using MonoDevelop.Components.AtkCocoaHelper; using MonoDevelop.Ide.Extensions; using MonoDevelop.Components.MainToolbar; using MonoDevelop.Components.DockNotebook; @@ -222,6 +223,8 @@ namespace MonoDevelop.Ide.Gui IdeApp.CommandService.SetRootWindow (this); DockNotebook.NotebookChanged += NotebookPagesChanged; + + Accessible.SetIsMainWindow (true); } void NotebookPagesChanged (object sender, EventArgs e) @@ -547,7 +550,25 @@ namespace MonoDevelop.Ide.Gui } return window.ViewContent.ContentName + post + " – " + BrandingService.ApplicationLongName; } - + + void SetAccessibilityDetails (IWorkbenchWindow window) + { + string documentUrl, filename; + if (window.ViewContent.Project != null) { + Console.WriteLine ($"{window.ViewContent.Project.FileName}"); + Console.WriteLine ($"{window.ViewContent.PathRelativeToProject}"); + + documentUrl = "file://" + window.ViewContent.Project.FileName; + filename = System.IO.Path.GetFileName (window.ViewContent.PathRelativeToProject); + } else { + documentUrl = string.Empty; + filename = string.Empty; + } + + Accessible.SetDocument (documentUrl); + Accessible.SetFilename (filename); + } + void SetWorkbenchTitle () { try { @@ -560,8 +581,12 @@ namespace MonoDevelop.Ide.Gui if (IsInFullViewMode) this.ToggleFullViewMode (); } + + SetAccessibilityDetails (window); } catch (Exception) { Title = GetDefaultTitle (); + Accessible.SetDocument (""); + Accessible.SetFilename (""); } } @@ -853,7 +878,13 @@ namespace MonoDevelop.Ide.Gui void CreateComponents () { + Accessible.Name = "MainWindow"; + fullViewVBox = new VBox (false, 0); + fullViewVBox.Accessible.Name = "MainWindow.Root"; + fullViewVBox.Accessible.SetLabel ("Label"); + fullViewVBox.Accessible.SetShouldIgnore (true); + rootWidget = fullViewVBox; InstallMenuBar (); @@ -862,6 +893,8 @@ namespace MonoDevelop.Ide.Gui DesktopService.SetMainWindowDecorations (this); DesktopService.AttachMainToolbar (fullViewVBox, toolbar); toolbarFrame = new CommandFrame (IdeApp.CommandService); + toolbarFrame.Accessible.Name = "MainWindow.Root.ToolbarFrame"; + toolbarFrame.Accessible.SetShouldIgnore (true); fullViewVBox.PackStart (toolbarFrame, true, true, 0); diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/SdiWorkspaceWindow.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/SdiWorkspaceWindow.cs index 2b685ff1ef..e920151871 100644 --- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/SdiWorkspaceWindow.cs +++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/SdiWorkspaceWindow.cs @@ -33,6 +33,7 @@ using Gtk; using Mono.Addins; using MonoDevelop.Core; using MonoDevelop.Components; +using MonoDevelop.Components.AtkCocoaHelper; using MonoDevelop.Ide.Commands; using MonoDevelop.Components.Commands; using MonoDevelop.Ide.Extensions; @@ -101,6 +102,7 @@ namespace MonoDevelop.Ide.Gui extensionContext.RegisterCondition ("FileType", fileTypeCondition); box = new VBox (); + box.Accessible.SetShouldIgnore (true); viewContents.Add (content); @@ -621,6 +623,7 @@ namespace MonoDevelop.Ide.Gui var tab = new Tab (subViewToolbar, label) { Tag = viewContent }; + tab.Accessible.Help = viewContent.TabAccessibilityDescription; // If this is the current displayed document we need to add the control immediately as the tab is already active. if (addedContent) { diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/StatusBarIcon.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/StatusBarIcon.cs index 42ee9567ed..64023c0546 100644 --- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/StatusBarIcon.cs +++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/StatusBarIcon.cs @@ -57,11 +57,23 @@ namespace MonoDevelop.Ide public interface StatusBarIcon : IDisposable { /// <summary> + /// The title of the status icon. Used for accessibility + /// </summary> + /// <value>The title.</value> + string Title { get; set; } + + /// <summary> /// Tooltip of the status icon /// </summary> string ToolTip { get; set; } /// <summary> + /// The accessibility help message for the button + /// </summary> + /// <value>The help.</value> + string Help { get; set; } + + /// <summary> /// The clicked event to subscribe mouse clicks on the icon. /// </summary> event EventHandler<StatusBarIconClickedEventArgs> Clicked; |