Logo Search packages:      
Sourcecode: accerciser version File versions

def interface_view::_SectionAccessible::init (   self,
  glade_xml 
)

Initialization that is specific to the Accessible interface 
(construct data models, connect signals to callbacks, etc.)

@param glade_xml: Interface viewer glade xml.
@type glade_xml: gtk.glade.XML

Reimplemented from interface_view::_InterfaceSection.

Definition at line 246 of file interface_view.py.

00246                            :
    '''
    Initialization that is specific to the Accessible interface 
    (construct data models, connect signals to callbacks, etc.)
    
    @param glade_xml: Interface viewer glade xml.
    @type glade_xml: gtk.glade.XML
    '''
    glade_xml.signal_autoconnect(self)
    # Child count and description labels
    self.child_count_label = glade_xml.get_widget('label_acc_child count')
    self.desc_label = glade_xml.get_widget('label_acc_desc')

    # configure states tree view
    treeview = glade_xml.get_widget('states_view')
    self.states_model = gtk.ListStore(str)
    treeview.set_model(self.states_model)
    crt = gtk.CellRendererText()
    tvc = gtk.TreeViewColumn()
    tvc.pack_start(crt, True)
    tvc.set_attributes(crt, text=0)
    treeview.append_column(tvc)

    # configure relations tree view
    self.relations_view = glade_xml.get_widget('relations_view')
    self.relations_model = gtk.TreeStore(gtk.gdk.Pixbuf, str, object)
    self.relations_view.set_model(self.relations_model)
    crt = gtk.CellRendererText()
    crp = gtk.CellRendererPixbuf()
    tvc = gtk.TreeViewColumn()
    tvc.pack_start(crp, False)
    tvc.pack_start(crt, True)
    tvc.set_attributes(crp, pixbuf=0)
    tvc.set_attributes(crt, text=1)
    tvc.set_cell_data_func(crt, self._relationCellDataFunc)
    tvc.set_cell_data_func(crp, self._relationCellDataFunc)
    self.relations_view.append_column(tvc)
    # preset the different bg colors
    style = gtk.Style ()
    self.header_bg = style.bg[gtk.STATE_NORMAL]
    self.relation_bg = style.base[gtk.STATE_NORMAL]
    selection = self.relations_view.get_selection()
    selection.set_select_function(self._relationSelectFunc)
    show_button = glade_xml.get_widget('button_relation_show')
    show_button.set_sensitive(self._isSelectedInView(selection))
    selection.connect('changed', self._onViewSelectionChanged, show_button)

    # configure accessible attributes tree view
    treeview = glade_xml.get_widget('accattrib_view')
    self.attr_model = gtk.ListStore(str, str)
    treeview.set_model(self.attr_model)
    crt = gtk.CellRendererText()
    tvc = gtk.TreeViewColumn()
    tvc.pack_start(crt, True)
    tvc.set_attributes(crt, text=0)
    treeview.append_column(tvc)
    crt = gtk.CellRendererText()
    tvc = gtk.TreeViewColumn()
    tvc.pack_start(crt, True)
    tvc.set_attributes(crt, text=1)
    treeview.append_column(tvc)

  def populateUI(self, acc):


Generated by  Doxygen 1.6.0   Back to index