def __init__(self, parent, notebook):
Dialog.__init__(self, parent,
_('Pages By Number Of Links'), # T: dialog title
buttons=gtk.BUTTONS_CLOSE
)
self.notebook = notebook
self.direction_input = gtk.combo_box_new_text()
for dir in sorted(self.LABELS):
self.direction_input.append_text(self.LABELS[dir])
self.uistate.setdefault('link_direction', LINK_DIR_BACKWARD, self.LABELS.keys())
gtk_combobox_set_active_text(
self.direction_input,
self.LABELS[self.uistate['link_direction']]
)
self.direction_input.connect('changed', self.on_direction_input_changed)
hbox = gtk.HBox()
hbox.pack_start(gtk.Label(_('Trace Links')+':'), False)
hbox.add(self.direction_input)
self.vbox.pack_start(hbox, False)
self.listview = SingleClickTreeView(gtk.ListStore(int, str))
self.listview.set_reorderable(True)
for i, label in enumerate((_('#'), _('Page'))):
column = gtk.TreeViewColumn(label, gtk.CellRendererText(), text=i)
column.set_sort_column_id(i)
self.listview.append_column(column)
# TODO: self.listview.connect('row-activated', self.on_row_activated())
self.vbox.add(ScrolledWindow(self.listview))
self.populate_listview()
评论列表
文章目录