Skip to content

Commit

Permalink
Improve presentation of graphical view table in disk management (PR n…
Browse files Browse the repository at this point in the history
…vaccess#10048)

* UX improvements for diskMGMT Graphical View
Co-authored-by: Reef Turner <[email protected]>
  • Loading branch information
lukaszgo1 authored Nov 20, 2020
1 parent b5e1286 commit 949416f
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 5 deletions.
38 changes: 33 additions & 5 deletions source/appModules/mmc.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
#appModules/mmc.py
#A part of NonVisual Desktop Access (NVDA)
#Copyright (C) 2015-2019 NV Access Limited, David Parduhn, Bill Dengler, Leonard de Ruijter
#This file is covered by the GNU General Public License.
#See the file COPYING for more details.
# A part of NonVisual Desktop Access (NVDA)
# Copyright (C) 2015-2020 NV Access Limited, David Parduhn, Bill Dengler, Leonard de Ruijter, Łukasz Golonka
# This file is covered by the GNU General Public License.
# See the file COPYING for more details.

import api
import appModuleHandler
import controlTypes
import eventHandler
from NVDAObjects.IAccessible import IAccessible
from NVDAObjects.behaviors import ToolTip

class MMCTable(IAccessible):
def _get_focusRedirect(self):
Expand All @@ -20,10 +20,36 @@ def _get_focusRedirect(self):


class MMCTableCell(IAccessible):
""" Cell and rowheader makes no sense for these controls. Mapping them to list items has added benefit
of suppressing selected. """
role = controlTypes.ROLE_LISTITEM

def event_selection(self):
if self.parent.hasFocus and api.getFocusObject() != self:
eventHandler.executeEvent("gainFocus", self)

def _get_positionInfo(self):
""" When 'Guess object position info when unavailable' is enabled
these controls report very strange information such as 65537 of 12, especially in braille.
Disable reporting of position info all together. """
return None


class toolTipWithEmptyName(ToolTip):
previousToolTipText = ''

def _get_name(self):
""" ToolTips appearing when hovering mouse over graphical view have empty name,
but it can be retrieved via display model. """
return self.displayText

def event_show(self):
# Stop repeating the same tooltip over and over again.
toolTipText = self.displayText
if toolTipText != toolTipWithEmptyName.previousToolTipText:
toolTipWithEmptyName.previousToolTipText = toolTipText
super().event_show()


class AppModule(appModuleHandler.AppModule):
def chooseNVDAObjectOverlayClasses(self, obj, clsList):
Expand All @@ -33,3 +59,5 @@ def chooseNVDAObjectOverlayClasses(self, obj, clsList):
elif obj.role in (controlTypes.ROLE_TABLECELL,
controlTypes.ROLE_TABLEROWHEADER):
clsList.insert(0, MMCTableCell)
if obj.windowClassName == "tooltips_class32" and obj.name is None:
clsList.insert(0, toolTipWithEmptyName)
1 change: 1 addition & 0 deletions user_docs/en/changes.t2t
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ What's New in NVDA
- In web browsers and other applications that support browse mode, the Elements List dialog (NVDA+F7) can now be invoked when in focus mode. (#10453)
- Updates to ARIA live regions are now suppressed when reporting of dynamic content changes is disabled. (#9077)
- NVDA will now report "Copied to clipboard" before the copied text. (#6757)
- Presentation of graphical view table in disk management has been improved. (#10048)


== Bug Fixes ==
Expand Down

0 comments on commit 949416f

Please sign in to comment.