|
1 | | -#appModules/powerpnt.py |
2 | | -#A part of NonVisual Desktop Access (NVDA) |
3 | | -#Copyright (C) 2012-2018 NV Access Limited |
4 | | -#This file is covered by the GNU General Public License. |
5 | | -#See the file COPYING for more details. |
| 1 | +# A part of NonVisual Desktop Access (NVDA) |
| 2 | +# Copyright (C) 2012-2022 NV Access Limited |
| 3 | +# This file is covered by the GNU General Public License. |
| 4 | +# See the file COPYING for more details. |
| 5 | + |
6 | 6 | from typing import ( |
7 | 7 | Optional, |
8 | 8 | Dict, |
@@ -412,18 +412,18 @@ def _get_firstChild(self): |
412 | 412 |
|
413 | 413 | def handleSelectionChange(self): |
414 | 414 | """Pushes focus to the newly selected object.""" |
415 | | - if getattr(self,"_isHandlingSelectionChange",False): |
416 | | - # #3394: A COM event can cause this function to run within itself. |
| 415 | + if getattr(self,"_isHandlingSelectionChange",False): |
| 416 | + # #3394: A COM event can cause this function to run within itself. |
417 | 417 | # This can cause double speaking, so stop here if we're already running. |
418 | | - return |
419 | | - self._isHandlingSelectionChange=True |
420 | | - try: |
| 418 | + return |
| 419 | + self._isHandlingSelectionChange=True |
| 420 | + try: |
421 | 421 | obj=self.selection |
422 | 422 | if not obj: |
423 | 423 | obj=IAccessible(windowHandle=self.windowHandle,IAccessibleObject=self.IAccessibleObject,IAccessibleChildID=self.IAccessibleChildID) |
424 | 424 | if obj and obj!=eventHandler.lastQueuedFocusObject: |
425 | | - eventHandler.queueEvent("gainFocus",obj) |
426 | | - finally: |
| 425 | + eventHandler.queueEvent("gainFocus",obj) |
| 426 | + finally: |
427 | 427 | self._isHandlingSelectionChange=False |
428 | 428 |
|
429 | 429 | def script_selectionChange(self,gesture): |
@@ -929,7 +929,7 @@ def _getFormatFieldAndOffsets(self,offset,formatConfig,calculateOffsets=True): |
929 | 929 | if formatConfig['reportFontName']: |
930 | 930 | formatField['font-name']=font.name |
931 | 931 | if formatConfig['reportFontSize']: |
932 | | - formatField['font-size']=str(font.size) |
| 932 | + formatField['font-size']= _("%d pt") % int(font.size) |
933 | 933 | if formatConfig['reportFontAttributes']: |
934 | 934 | formatField['bold']=bool(font.bold) |
935 | 935 | formatField['italic']=bool(font.italic) |
|
0 commit comments