Logo Search packages:      
Sourcecode: accerciser version File versions

def interface_view::_SectionAccessible::populateUI (   self,
  acc 
)

Populate the Accessible section with relevant data of the 
currently selected accessible.

@param acc: The currently selected accessible.
@type acc: Accessibility.Accessible

Reimplemented from interface_view::_InterfaceSection.

Definition at line 308 of file interface_view.py.

00308                            :
    '''
    Populate the Accessible section with relevant data of the 
    currently selected accessible.
    
    @param acc: The currently selected accessible.
    @type acc: Accessibility.Accessible
    '''

    self.child_count_label.set_text(str(acc.childCount))
    self.desc_label.set_label(acc.description or _('<i>(no description)</i>'))

    states = [pyatspi.stateToString(s) for s in acc.getState().getStates()]
    states.sort()
    map(self.states_model.append, [[state] for state in states])
    
    try:
      attribs = acc.getAttributes()
    except:
      pass
    else:
      for attr in attribs:
        name, value = attr.split(':', 1)
        self.attr_model.append([name, value])

    relations = acc.getRelationSet()
    for relation in relations:
      r_type_name = repr(relation.getRelationType()).replace('RELATION_', '')
      r_type_name = r_type_name.replace('_', ' ').lower().capitalize()
      iter = self.relations_model.append(None, [None, r_type_name, None])
      for i in range(relation.getNTargets()):
        acc = relation.getTarget(0)
        self.relations_model.append(iter, [getIcon(acc), acc.name, acc])
    self.relations_view.expand_all()

    self.registerEventListener(self._accEventState, 'object:state-changed')

  def clearUI(self):


Generated by  Doxygen 1.6.0   Back to index