From 7dd6957807f154b66d81942d4026fa7ce8b4e2fc Mon Sep 17 00:00:00 2001 From: Doug Blank Date: Tue, 12 Apr 2011 13:32:02 +0000 Subject: [PATCH] Handle gramplet functions for has_data svn: r17107 --- src/gui/grampsbar.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/gui/grampsbar.py b/src/gui/grampsbar.py index 3ba466acf..bf1786686 100644 --- a/src/gui/grampsbar.py +++ b/src/gui/grampsbar.py @@ -320,10 +320,14 @@ class GrampsBar(gtk.Notebook): Create a tab label consisting of a label and a close button. """ label = gtk.Label() - if gramplet.pui.has_data: + if hasattr(gramplet.pui, "has_data"): + if gramplet.pui.has_data: + label.set_text("%s" % gramplet.title) + else: + label.set_text(gramplet.title) + else: # just a function; always show yes it has data label.set_text("%s" % gramplet.title) - else: - label.set_text(gramplet.title) + label.set_use_markup(True) label.set_tooltip_text(gramplet.tname) label.show_all()