From c6a51db8d3c02cb3f31ea894ba8684a9cee7f0e4 Mon Sep 17 00:00:00 2001 From: Doug Blank Date: Sat, 7 Nov 2009 13:31:36 +0000 Subject: [PATCH] Fix for running quick view gramplet; disable unnecessary signals reception for some change-actives svn: r13519 --- src/plugins/gramplet/AgeStats.py | 3 +++ src/plugins/gramplet/QuickViewGramplet.py | 3 ++- src/plugins/gramplet/StatsGramplet.py | 3 +++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/plugins/gramplet/AgeStats.py b/src/plugins/gramplet/AgeStats.py index 31ae5930f..d6da72e3f 100644 --- a/src/plugins/gramplet/AgeStats.py +++ b/src/plugins/gramplet/AgeStats.py @@ -38,6 +38,9 @@ class AgeStatsGramplet(Gramplet): self.max_father_diff = 60 self.chart_width = 60 + def post_init(self): + self.disconnect("active-changed") + def build_options(self): from gen.plug.menu import NumberOption self.add_option(NumberOption(_("Max age"), diff --git a/src/plugins/gramplet/QuickViewGramplet.py b/src/plugins/gramplet/QuickViewGramplet.py index ddcf2f969..27d291b30 100644 --- a/src/plugins/gramplet/QuickViewGramplet.py +++ b/src/plugins/gramplet/QuickViewGramplet.py @@ -100,7 +100,8 @@ class QuickViewGramplet(Gramplet): type_list.add_item(item[0], item[1]) # Add particular lists: qv_list = get_quick_report_list(CATEGORY_QR_PERSON) - list_option = EnumeratedListOption(_("Quick Views"), qv_list[0][2]) + list_option = EnumeratedListOption(_("Quick Views"), + qv_list[0].id) for pdata in qv_list: list_option.add_item(pdata.id, pdata.name) self.add_option(type_list) diff --git a/src/plugins/gramplet/StatsGramplet.py b/src/plugins/gramplet/StatsGramplet.py index e02c8d517..221d4fb74 100644 --- a/src/plugins/gramplet/StatsGramplet.py +++ b/src/plugins/gramplet/StatsGramplet.py @@ -54,6 +54,9 @@ class StatsGramplet(Gramplet): self.set_text(_("No Family Tree loaded.")) self.set_tooltip(_("Double-click item to see matches")) + def post_init(self): + self.disconnect("active-changed") + def db_changed(self): self.dbstate.db.connect('person-add', self.update) self.dbstate.db.connect('person-edit', self.update)