@@ -137,6 +137,10 @@ def chooseNVDAObjectOverlayClasses(self, obj, clsList):
137137 clsList .insert (0 , VismaControlBar )
138138 elif isinstance (obj , IAccessible ) and obj .IAccessibleRole == oleacc .ROLE_SYSTEM_CHECKBUTTON :
139139 clsList .insert (0 , SystemCheckButton )
140+ elif isinstance (obj , IAccessible ) and obj .IAccessibleRole == oleacc .ROLE_SYSTEM_TEXT :
141+ g = obj .parent .parent
142+ if g .windowClassName == "SafGrid" :
143+ clsList .insert (0 , GridFilterEdit )
140144 except Exception as e :
141145 log .info ("Fel i chooseNVDAObjectOverlayClasses: %s" % e )
142146 ui .message ("Fel i chooseNVDAObjectOverlayClasses: %s" % e )
@@ -334,7 +338,7 @@ def script_readGridSelection(self, gesture):
334338
335339
336340 def ReadGridSelection (self ):
337- checkbox_cols = ["Markering" , "Inaktiv" , "Aktivt" , "Makulerad" , "Fakturerad" , "Skriv" , "Skriv order" , "Skriv följ" , "Restn ej" , "Skickad" , "Levererad" , "Order" , "Fullständig" , "Läs" , "Utskrift" ]
341+ checkbox_cols = ["Markering" , "Inaktiv" , "Aktivt" , "Makulerad" , "Fakturerad" , "Skriv" , "Skriv order" , "Skriv följ" , "Restn ej" , "Skickad" , "Levererad" , "Order" , "Fullständig" , "Läs" , "Utskrift" , "Belopprabatt" , "Restn ant" ]
338342
339343 try :
340344 #gridpat = nav._getUIAPattern(UIAHandler.UIA_GridPatternId,UIAHandler.IUIAutomationGridPattern)
@@ -550,3 +554,21 @@ def script_changeItem(self,gesture):
550554 gesture .send ()
551555 speech .speakObject (self , reason = controlTypes .OutputReason .FOCUS )
552556
557+ class GridFilterEdit (IAccessible ):
558+
559+ def initOverlayClass (self ):
560+ try :
561+ UIAClient = UIAHandler .handler .clientObject
562+ grid = self .parent .parent
563+ filter = grid .UIAElement .FindFirst (UIAHandler .TreeScope_Children , UIAClient .CreatePropertyCondition (UIAHandler .UIA_NamePropertyId , "Filter" ))
564+ handleCond = UIAClient .CreatePropertyCondition (UIAHandler .UIA_NativeWindowHandlePropertyId , self .windowHandle )
565+ UIAPointer = filter .FindFirstBuildCache (UIAHandler .TreeScope_Children , handleCond , UIAHandler .handler .baseCacheRequest )
566+ txt = UIAPointer .CurrentName
567+ self .name = txt
568+ # This feels wrong but the name won't be spoken when navigating between the filter textboxes with Tab and Shift + Tab without this line.
569+ # Another little tidbit is that you have to press F3 twice to get in some kind of mode so this line makes difference.
570+ ui .message (txt )
571+ except Exception as e :
572+ pass
573+
574+
0 commit comments