def __init__(self, rthread, model):
super(MappingNameEditor, self).__init__(rthread)
self._model = model
self._type = common.unpluralize(model.get_name())
types = [(gobject.TYPE_STRING, "key"),
(gobject.TYPE_STRING, self._type),
(gobject.TYPE_STRING, _("Name"))]
self.listw = miscwidgets.KeyedListWidget(types)
self.listw.set_editable(1, True)
self.listw.set_sort_column(0, 1)
self.listw.set_sort_column(1, -1)
self.listw.show()
self.mappings = []
sw = gtk.ScrolledWindow()
sw.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
sw.add_with_viewport(self.listw)
self.root = sw
self._loaded = False
评论列表
文章目录