Skip to content

Commit

Permalink
Factorise gesture mapping in Outlook appModule, taking advantage of B…
Browse files Browse the repository at this point in the history
…aseOutlookWordDocument class introduced by nvaccess#11925.
  • Loading branch information
CyrilleB79 committed Jan 22, 2021
1 parent c5c34ed commit f77b5ef
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 13 deletions.
2 changes: 1 addition & 1 deletion include/cldr
Submodule cldr updated 112 files
18 changes: 6 additions & 12 deletions source/appModules/outlook.py
Original file line number Diff line number Diff line change
Expand Up @@ -565,6 +565,12 @@ def script_tab(self, gesture):
if not caretMoved:
return
self.reportTab()

__gestures = {
"kb:control+shift+w": None, # Shortcut existing in Word but not in Outlook
"kb:control+shift+b": None, # Shortcut existing in Word but opens address book in Outlook
"kb:control+shift+a": "changeCase", # In Outlook Ctrl+Shift+A is equivalent to Shift+F3
}


class OutlookWordDocument(WordDocument, BaseOutlookWordDocument):
Expand All @@ -589,12 +595,6 @@ def _get_role(self):

ignoreEditorRevisions=True
ignorePageNumbers=True # This includes page sections, and page columns. None of which are appropriate for outlook.

__gestures = {
"kb:control+shift+w": None, # Shortcut existing in Word but not in Outlook
"kb:control+shift+b": None, # Shortcut existing in Word but opens address book in Outlook
"kb:control+shift+a": "changeCase", # In Outlook Ctrl+Shift+A is equivalent to Shift+F3
}


class OutlookUIAWordDocument(UIAWordDocument, BaseOutlookWordDocument):
Expand All @@ -606,12 +606,6 @@ def _get_isReadonlyViewer(self):
def _get_shouldCreateTreeInterceptor(self):
return self.isReadonlyViewer

__gestures = {
"kb:control+shift+w": None, # Shortcut existing in Word but not in Outlook
"kb:control+shift+b": None, # Shortcut existing in Word but opens address book in Outlook
"kb:control+shift+a": "changeCase", # In Outlook Ctrl+Shift+A is equivalent to Shift+F3
}

class DatePickerButton(IAccessible):
# Value is a duplicate of name so get rid of it
value=None
Expand Down

0 comments on commit f77b5ef

Please sign in to comment.