Changeset 112
- Timestamp:
- 01/07/08 16:27:00
- Files:
-
- inapp/trunk/README (modified) (2 diffs)
- inapp/trunk/src/jambu/ActionTree.py (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
inapp/trunk/README
r110 r112 29 29 --showtree show the GTKTreeView of accesible objects and other UI 30 30 31 Make sure gedit/minefield is already open and make it the active application again to be safe. 31 Make sure gedit/minefield is already open and make it the active application 32 again to be safe. 32 33 33 34 Gestures … … 38 39 Auto scan may be started/stopped with the 'Start Scan' button. 39 40 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. 41 For mouse you need to leave the pointer in the spaces between the buttons and 42 menus do not display properly as the mouse interferes. 41 43 42 44 Known Bugs inapp/trunk/src/jambu/ActionTree.py
r111 r112 13 13 14 14 __metaclass__ = type 15 16 def 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 15 22 16 23 class ActionTree(gtk.TreeView): … … 161 168 class WindowActivateMessage(MyMessage): 162 169 handler = self._onWindowActivate 170 class ChildChangedMessage(MyMessage): 171 handler = self._onChildChanged 163 172 164 173 s = formatEvent(event) … … 174 183 elif event.type in ('window:activate', 'window:restore'): 175 184 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 acc180 acc = acc.parent181 return None182 185 top = parent_acc_with_role(event.source, pyatspi.ROLE_DIALOG, 183 186 pyatspi.ROLE_ALERT, … … 215 218 model = self.get_model() 216 219 if source_acc.hasToolkitIn('Gecko') or model.isAncestor(self.current_acc, source_acc._acc): 217 ChildChangedMessage( None).send()220 ChildChangedMessage().send() 218 221 # with minefield we get changes on a FRAME that is not in the heirarchy 219 222 … … 311 314 path = model.get_path(iter) 312 315 #acc.grabFocus() 313 316 #print '!!!', acc, acc.parent, acc.parent.parent 317 314 318 if acc.isEditable(): 315 319 try: … … 317 321 except: 318 322 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() 319 336 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 320 349 elif acc.isSelectable(): 350 # moz location auto compelete - no parent 321 351 print 'sel' 322 352 if acc.hasRoleIn(pyatspi.ROLE_MENU_ITEM): … … 326 356 print '!!! Escape' 327 357 sendKeyCombination('Escape', '') 328 elif acc.hasRoleIn(pyatspi.ROLE_MENU) :358 elif acc.hasRoleIn(pyatspi.ROLE_MENU) or acc.is_interactive: 329 359 acc.doAction() 330 360 elif acc.hasRoleIn(pyatspi.ROLE_CHECK_MENU_ITEM, pyatspi.ROLE_RADIO_MENU_ITEM): … … 337 367 acc.toggleSectable() 338 368 339 elif acc.hasToolkitIn('Gecko') and \340 acc.hasRoleIn(pyatspi.ROLE_MENU, pyatspi.ROLE_MENU_ITEM):341 print 'click'342 acc.generateClick()343 344 369 # TODO: use template DP for toolkit and application 345 370 elif acc.isActionable() and not acc.hasRoleIn(pyatspi.ROLE_AUTOCOMPLETE):
