Logo Search packages:      
Sourcecode: accerciser version File versions

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

Populate the Text 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 1269 of file interface_view.py.

01269                            :
    '''
    Populate the Text section with relevant data of the 
    currently selected accessible.
    
    @param acc: The currently selected accessible.
    @type acc: Accessibility.Accessible
    '''
    self.offset_spin.set_value(0)

    ti = acc.queryText()

    text = ti.getText(0, ti.characterCount)
    self.text_buffer.set_text(text)

    self.offset_spin.get_adjustment().upper = ti.characterCount

    self.popTextAttr(offset=0)

    try:
      eti = acc.queryEditableText()
    except:
      eti = None

    expander_label = self.expander.get_label_widget()
    label_text = expander_label.get_label()
    label_text = label_text.replace(_(' <i>(Editable)</i>'),'')
    if eti:
      label_text += _(' <i>(Editable)</i>')
      self.text_view.set_editable(True)
    else:
      self.text_view.set_editable(False)
    expander_label.set_label(label_text)

    self._text_insert_handler = self.text_buffer.connect('insert-text', 
                                                         self._onITextInsert)
    self._text_delete_handler = self.text_buffer.connect('delete-range', 
                                                         self._onITextDelete)

    self.registerEventListener(self._accEventText, 
                               'object:text-changed')

  def clearUI(self):


Generated by  Doxygen 1.6.0   Back to index