Handle gramplet functions for has_data
svn: r17107
This commit is contained in:
parent
04ff68685e
commit
7dd6957807
@ -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()
|
||||||
|
Loading…
Reference in New Issue
Block a user