def create_linkrow(self, link_this):
hbox = Gtk.HBox()
def ff(btn, page):
if id(page) in editor_of(self).m_page_mapping:
editor_of(self).show_page_id(id(page))
else:
if not page[0]:
page[0].append(pd.LinkList(link_this.m_name))
p = Page(page, parent_page(self))
p.show()
editor_of(self).add_page(p)
if isinstance(link_this, pd.Page):
linkbutton = gu.ClickableLabel(link_this.m_name)
linkbutton.connect('clicked', ff, link_this)
else:
try:
linkbutton = gu.ClickableLabel(lessonfile.infocache.get(link_this, 'title'))
linkbutton.set_tooltip_text(link_this)
except lessonfile.InfoCache.FileNotFound:
linkbutton = gu.ClickableLabel(_(u"«%s» was not found") % link_this)
linkbutton.make_warning()
hbox.pack_start(linkbutton, True, True, 0)
linkbutton.connect('button-press-event', self.on_right_click_row, link_this)
hbox.show_all()
return hbox
评论列表
文章目录