Handle gramplet functions for has_data

svn: r17107
This commit is contained in:
Doug Blank 2011-04-12 13:32:02 +00:00
parent 04ff68685e
commit 7dd6957807

View File

@ -320,10 +320,14 @@ class GrampsBar(gtk.Notebook):
Create a tab label consisting of a label and a close button. Create a tab label consisting of a label and a close button.
""" """
label = gtk.Label() label = gtk.Label()
if hasattr(gramplet.pui, "has_data"):
if gramplet.pui.has_data: if gramplet.pui.has_data:
label.set_text("<b>%s</b>" % gramplet.title) label.set_text("<b>%s</b>" % gramplet.title)
else: else:
label.set_text(gramplet.title) label.set_text(gramplet.title)
else: # just a function; always show yes it has data
label.set_text("<b>%s</b>" % gramplet.title)
label.set_use_markup(True) label.set_use_markup(True)
label.set_tooltip_text(gramplet.tname) label.set_tooltip_text(gramplet.tname)
label.show_all() label.show_all()