Changeset 77
- Timestamp:
- 11/29/07 17:46:47
- Files:
-
- action_groups/trunk/ActionBrowser.py (modified) (4 diffs)
- action_groups/trunk/ActionModel.py (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
action_groups/trunk/ActionBrowser.py
r76 r77 32 32 plugin_name = 'Actions Browser' 33 33 else: 34 node = None 34 35 __gsignals__ = {'switch-down' : 35 36 (gobject.SIGNAL_RUN_FIRST, … … 104 105 def _onExamine(self, button): 105 106 acc = self.groups_tree.get_selected_acc() 106 if acc is not None :107 if acc is not None and self.node is not None: 107 108 self.node.update(acc) 108 109 … … 283 284 else: 284 285 acc.doAction() 286 285 287 if acc.isHyperlink(): 286 288 # need to refresh - this is heavy handed 287 289 iter = model.iter_parent_with_role(iter, pyatspi.ROLE_DOCUMENT_FRAME) 288 path = model.get_path(iter)289 acc = model[model.get_iter_root()][ActionModel.COL_ACC]290 acc = model.getRootAcc() 291 path = model.get_path(iter) # assume nothing changes before 290 292 self.set_top_acc(acc) 291 293 selection = self.get_selection() 294 print 'zzz' + str(path) 295 model.popToPath(path) 296 self.expandToPath(path) 292 297 selection.select_path(path) 293 294 298 295 299 elif acc.isSelectable(): 296 300 acc.toggleSectable() 297 301 298 if acc.is_group:302 if getattr(acc, 'is_group', False) and acc.is_group: 299 303 if self.row_expanded(path): 300 304 if acc.getRole() == pyatspi.ROLE_MENU: … … 306 310 self.expand_row(path, False) 307 311 self.next() 312 313 def expandToPath(self, path): 314 for i in xrange(1, len(path)): 315 self.expand_row(path[:i], False) 308 316 309 317 class MessageBox(): action_groups/trunk/ActionModel.py
r76 r77 94 94 def __init__(self, root_acc): 95 95 gtk.TreeStore.__init__(self, str, str, object, bool, bool) 96 self.root = root_acc 96 self.root_acc = root_acc 97 98 def getRootAcc(self): 99 return self.root_acc 97 100 98 101 def addSubTree(self, acc, parent=None): … … 106 109 t = time() 107 110 if iter is None: 108 parent_acc = self.root 111 parent_acc = self.root_acc 109 112 else: 110 113 parent_acc = self[iter][self.COL_ACC] … … 118 121 t = time() - t 119 122 print 'Populated level in', t 123 124 def popToPath(self, path): 125 for i in xrange(1, len(path)): 126 if not self[path[:i]][self.COL_FILLED]: 127 self.popLevel(self.get_iter(path[:i])) 120 128 121 129 def makeExpandable(self, iter):
