Changeset 112

Show
Ignore:
Timestamp:
01/07/08 16:27:00
Author:
slee
Message:

more firefox fixes

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • inapp/trunk/README

    r110 r112  
    2929  --showtree    show the GTKTreeView of accesible objects and other UI 
    3030 
    31 Make sure gedit/minefield is already open and make it the active application again to be safe. 
     31Make sure gedit/minefield is already open and make it the active application  
     32again to be safe. 
    3233 
    3334Gestures 
     
    3839Auto scan may be started/stopped with the 'Start Scan' button. 
    3940 
    40 For mouse you need to leave the pointer in the spaces between the buttons and menus do not display properly as the mouse interferes. 
     41For mouse you need to leave the pointer in the spaces between the buttons and  
     42menus do not display properly as the mouse interferes. 
    4143 
    4244Known Bugs 
  • inapp/trunk/src/jambu/ActionTree.py

    r111 r112  
    1313 
    1414__metaclass__ = type 
     15 
     16def parent_acc_with_role(acc, *roles): 
     17  while acc is not None: 
     18    if acc.getRole() in roles: 
     19      return acc 
     20    acc = acc.parent 
     21  return None 
    1522 
    1623class ActionTree(gtk.TreeView): 
     
    161168    class WindowActivateMessage(MyMessage): 
    162169      handler = self._onWindowActivate 
     170    class ChildChangedMessage(MyMessage): 
     171      handler = self._onChildChanged 
    163172     
    164173    s = formatEvent(event) 
     
    174183    elif event.type in ('window:activate', 'window:restore'): 
    175184      PrintMessage(s).send() 
    176       def parent_acc_with_role(acc, *roles): 
    177         while acc is not None: 
    178           if acc.getRole() in roles: 
    179             return acc 
    180           acc = acc.parent 
    181         return None 
    182185      top = parent_acc_with_role(event.source, pyatspi.ROLE_DIALOG,  
    183186                                        pyatspi.ROLE_ALERT,  
     
    215218      model = self.get_model() 
    216219      if source_acc.hasToolkitIn('Gecko') or model.isAncestor(self.current_acc, source_acc._acc): 
    217         ChildChangedMessage(None).send() 
     220        ChildChangedMessage().send() 
    218221      # with minefield we get changes on a FRAME that is not in the heirarchy 
    219222         
     
    311314    path = model.get_path(iter) 
    312315    #acc.grabFocus() 
    313   
     316    #print '!!!', acc, acc.parent, acc.parent.parent 
     317 
    314318    if acc.isEditable(): 
    315319      try: 
     
    317321      except: 
    318322        raise 
     323 
     324    elif acc.hasToolkitIn('Gecko') \ 
     325        and acc.getRole() == pyatspi.ROLE_LIST and acc.parent.getRole() == pyatspi.ROLE_MENU and acc.is_group: 
     326      # assume is location list 
     327      print 'gk: loc group' 
     328      self._do_actionGroup(iter) 
     329 
     330    elif acc.hasToolkitIn('Gecko') \ 
     331        and (acc.getRole() == pyatspi.ROLE_LIST_ITEM \ 
     332        and acc.parent.getRole() == pyatspi.ROLE_LIST and acc.parent.parent.getRole() == pyatspi.ROLE_MENU): 
     333      # assume is location list 
     334      print 'gk: loc action' 
     335      acc.doAction() 
    319336       
     337    elif acc.hasToolkitIn('Gecko') \ 
     338        and (acc.getRole() == pyatspi.ROLE_PUSH_BUTTON \ 
     339        and acc.parent.getRole() == pyatspi.ROLE_PAGE_TAB_LIST): 
     340      # assume is location list 
     341      print 'gk: pt button action' 
     342      acc.generateClick() 
     343 
     344    elif acc.hasToolkitIn('Gecko') and \ 
     345         acc.hasRoleIn(pyatspi.ROLE_MENU, pyatspi.ROLE_MENU_ITEM): 
     346      print 'gk: click' 
     347      acc.generateClick() 
     348     
    320349    elif acc.isSelectable(): 
     350      # moz location auto compelete - no parent 
    321351      print 'sel' 
    322352      if acc.hasRoleIn(pyatspi.ROLE_MENU_ITEM): 
     
    326356          print '!!! Escape' 
    327357          sendKeyCombination('Escape', '')          
    328       elif acc.hasRoleIn(pyatspi.ROLE_MENU)
     358      elif acc.hasRoleIn(pyatspi.ROLE_MENU) or acc.is_interactive
    329359          acc.doAction() 
    330360      elif acc.hasRoleIn(pyatspi.ROLE_CHECK_MENU_ITEM, pyatspi.ROLE_RADIO_MENU_ITEM): 
     
    337367        acc.toggleSectable() 
    338368 
    339     elif acc.hasToolkitIn('Gecko') and \ 
    340          acc.hasRoleIn(pyatspi.ROLE_MENU, pyatspi.ROLE_MENU_ITEM): 
    341       print 'click' 
    342       acc.generateClick() 
    343      
    344369    # TODO: use template DP for toolkit and application 
    345370    elif acc.isActionable() and not acc.hasRoleIn(pyatspi.ROLE_AUTOCOMPLETE):