Changeset 2509

Show
Ignore:
Timestamp:
11/18/08 05:58:20 (7 weeks ago)
Author:
bzr
Message:

Move logic that forces level of a treeview item first when it changes, in to speech.getSpeechTextForProperties. This is definitely speech-specific code, and now also works for any treeviews that do have level information for their treeview items. I.e. this means that now in Gecko treeviews such as in Thunderbird, when arrowing to a new level it will be spoken before the rest of the item's info. SystreeView?32Item NVDAObject's now again set their level in positionInfo properly which means that braille can again show level. speech.getSpeechTextForProperties: do not announce level unless its not None. Stops a recent bug where speech would be announcing 'level None' in virtualBuffers.

Location:
trunk
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • trunk

    • Property bzr:revision-info
      •  

        old new  
        1 timestamp: 2008-11-18 13:58:36.805000067 +1000 
        2 committer: James Teh <jamie@jantrid.net> 
         1timestamp: 2008-11-18 16:57:23.318000078 +1100 
         2committer: Michael Curran <mick@kulgan.net> 
        33properties:  
        44        branch-nick: main 
    • Property bzr:revision-id:v3-list-QlpoOTFBWSZTWbrL2vUAAB1VgAAQABCAQDrrnqAgAFCgaaGRkxBoTIJ6mmaNRwhndFAoNhZjh_YY4a01fOg1ulgNNC2UrzPdXXEnDpX8XckU4UJC6y9r1A..
      •  

        old new  
        2782782306 jamie@jantrid.net-20081118034716-jk7koc7ahs798gtj 
        2792792307 jamie@jantrid.net-20081118035836-d8yvw3fqtn5g1w1s 
         2802308 mick@kulgan.net-20081118055723-kt92pexgf6vuc62d 
    • Property bzr:file-ids
      •  

        old new  
        1 source/synthDrivers/_espeak.py  612@dbe06fc7-9119-0410-a01d-9dbf589ecbba:trunk:source%2FsynthDrivers%2F_espeak.py 
        2 source/synthDrivers/espeak.py   612@dbe06fc7-9119-0410-a01d-9dbf589ecbba:trunk:source%2FsynthDrivers%2Fespeak.py 
         1source/NVDAObjects/IAccessible/sysTreeView32.py 834@dbe06fc7-9119-0410-a01d-9dbf589ecbba:trunk:source%2FNVDAObjects%2FIAccessible%2FsysTreeView32.py 
         2source/speech.py        503@dbe06fc7-9119-0410-a01d-9dbf589ecbba:trunk:source%2Fspeech.py 
  • trunk/source/NVDAObjects/IAccessible/sysTreeView32.py

    r2505 r2509  
    77import speech 
    88from . import IAccessible 
    9  
    10 oldLevel=None 
    119 
    1210TV_FIRST=0x1100 
     
    135133                info=super(TreeViewItem,self)._get_positionInfo() 
    136134                if self.IAccessibleChildID>0: 
     135                        info['level']=self.treeLevel 
    137136                        hItem=winUser.sendMessage(self.windowHandle,TVM_MAPACCIDTOHTREEITEM,self.IAccessibleChildID,0) 
    138137                        if not hItem: 
     
    161160                if announceContains: 
    162161                        speech.speakMessage(_("%s items")%self.childCount) 
    163  
    164         def event_gainFocus(self): 
    165                 global oldLevel 
    166                 newLevel=self.treeLevel 
    167                 if newLevel!=oldLevel and self is api.getFocusObject(): 
    168                         speech.speakMessage(_("level %d")%newLevel) 
    169                         oldLevel=newLevel 
    170                 super(self.__class__,self).event_gainFocus() 
  • trunk/source/speech.py

    r2507 r2509  
    4141REASON_DEBUG=8 
    4242REASON_ONLYCACHE=9 
     43oldTreeviewLevel=None 
    4344 
    4445 
     
    552553 
    553554def getSpeechTextForProperties(reason=REASON_QUERY,**propertyValues): 
     555        global oldTreeviewLevel 
    554556        textList=[] 
    555557        if 'name' in propertyValues: 
     
    585587                textList.append(_("%s of %s")%(propertyValues['positionInfo_indexInGroup'],propertyValues['positionInfo_similarItemsInGroup'])) 
    586588        if 'positionInfo_level' in propertyValues: 
    587                 textList.append(_('level %s')%propertyValues['positionInfo_level']) 
     589                level=propertyValues.get('positionInfo_level',None) 
     590                role=propertyValues.get('role',None) 
     591                if level and role==controlTypes.ROLE_TREEVIEWITEM and level!=oldTreeviewLevel: 
     592                        textList.insert(0,_("level %s")%level) 
     593                        oldTreeviewLevel=level 
     594                elif level: 
     595                        textList.append(_('level %s')%propertyValues['positionInfo_level']) 
    588596        return " ".join([x for x in textList if x]) 
    589597