Changeset 124
- Timestamp:
- 01/17/08 14:58:23
- Files:
-
- inapp/trunk/ChangeLog (modified) (1 diff)
- inapp/trunk/src/jambu/AccDecorator.py (modified) (1 diff)
- inapp/trunk/src/jambu/ActionTree.py (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
inapp/trunk/ChangeLog
r122 r124 1 2008-01-16 r122 SteveLee <steve@fullmeasure.co.uk>1 2008-01-16 r122-3 SteveLee <steve@fullmeasure.co.uk> 2 2 3 * gail fixes 3 4 * improved highlight 4 5 inapp/trunk/src/jambu/AccDecorator.py
r113 r124 38 38 return getattr(self._acc, attrib) 39 39 40 def __eq__(self, other): 41 #do default comparison 42 if other is None: 43 return False 44 assert isinstance(other, self.__class__) 45 return self._acc == other._acc 46 47 def __ne__(self, other): 48 return not self.__eq__(other) 49 40 50 # now the 'real' functions 41 51 def hasStates(self, *states): inapp/trunk/src/jambu/ActionTree.py
r116 r124 82 82 83 83 def get_acc_from_iter(self, iter): 84 if iter is None: 85 return None 84 86 return self.get_acc_from_path(self.get_model().get_path(iter)) 85 87 … … 179 181 180 182 if event.type == 'focus:' and \ 181 not (AccDecorator(source_acc.parent).hasRoleIn(pyatspi.ROLE_MENU, pyatspi.ROLE_MENU_ITEM)): 183 not (AccDecorator(source_acc.parent).hasRoleIn(pyatspi.ROLE_MENU, pyatspi.ROLE_MENU_ITEM)) \ 184 and source_acc != self.get_selected_acc(): 182 185 # not (source_acc.hasRoleIn(pyatspi.ROLE_MENU, pyatspi.ROLE_MENU_ITEM, 183 186 # pyatspi.ROLE_RADIO_MENU_ITEM, pyatspi.ROLE_CHECK_MENU_ITEM)): … … 196 199 except LookupError: 197 200 root = None 201 if top is None or top <> root: 198 202 # for some reason they are not always the same accessible 199 203 # even though we expect them to be compared by hash 200 204 # perhaps state changes as default hash is probably on memory image 201 if top is not None and \202 (root is None or not(top.getRole() == root.getRole() and top.name == root.name)):205 # if top is not None and \ 206 # (root is None or not(top.getRole() == root.getRole() and top.name == root.name)): 203 207 WindowActivateMessage(top).send() 204 208 … … 351 355 print 'gk: click' 352 356 self.generateClick(acc) 353 357 354 358 elif acc.isSelectable(): 355 359 # moz location auto compelete - no parent 356 360 print 'sel' 361 is_gecko = acc.hasToolkitIn('Gecko') 357 362 if acc.hasRoleIn(pyatspi.ROLE_MENU_ITEM): 358 363 if not self.row_expanded(path): … … 360 365 elif self.row_expanded(path): 361 366 print '!!! Escape' 362 sendKeyCombination('Escape', '') 363 elif acc.hasRoleIn(pyatspi.ROLE_MENU) or acc.is_interactive: 367 sendKeyCombination('Escape', '') 368 elif is_gecko and \ 369 acc.hasRoleIn(pyatspi.ROLE_MENU) or acc.is_interactive: 364 370 acc.doAction() 365 elif acc.hasRoleIn(pyatspi.ROLE_CHECK_MENU_ITEM, pyatspi.ROLE_RADIO_MENU_ITEM): 371 elif is_gecko and \ 372 acc.hasRoleIn(pyatspi.ROLE_CHECK_MENU_ITEM, pyatspi.ROLE_RADIO_MENU_ITEM): 366 373 acc.toggleSectable() 367 374 acc.doAction() 368 elif acc.hasRoleIn(pyatspi.ROLE_PAGE_TAB): 369 acc.toggleSectable() 370 self._do_actionGroup(iter) # race condition? 375 elif is_gecko and \ 376 acc.hasRoleIn(pyatspi.ROLE_PAGE_TAB): 377 acc.toggleSectable() 378 self._do_actionGroup(iter) # race condition? 371 379 else: 372 380 acc.toggleSectable()
