From d42b3f870c3d0108463f9eee164fc432e2ffea56 Mon Sep 17 00:00:00 2001 From: Doug Blank Date: Sun, 18 Apr 2010 12:55:43 +0000 Subject: [PATCH] Fixed error in losing options on config of this gramplet svn: r15212 --- src/plugins/gramplet/QuickViewGramplet.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/plugins/gramplet/QuickViewGramplet.py b/src/plugins/gramplet/QuickViewGramplet.py index d6869023b..2b4db1f29 100644 --- a/src/plugins/gramplet/QuickViewGramplet.py +++ b/src/plugins/gramplet/QuickViewGramplet.py @@ -60,18 +60,18 @@ class QuickViewGramplet(Gramplet): if len(self.gui.data) != 2: self.gui.data[:] = ["Person", None] - def on_save(self): + def save_update_options(self, widget=None): qv_type = self.get_option(_("View Type")) quick_type = qv_type.get_value() qv_option = self.get_option(_("Quick Views")) quick_view = qv_option.get_value() self.gui.data[:] = [quick_type, quick_view] + self.update() def main(self): - qv_type = self.get_option(_("View Type")) - quick_type = qv_type.get_value() + quick_type = self.gui.data[0] qv_option = self.get_option(_("Quick Views")) - quick_view = qv_option.get_value() + quick_view = self.gui.data[1] or qv_option.get_value() try: active_handle = self.get_active(quick_type) except: @@ -119,7 +119,8 @@ class QuickViewGramplet(Gramplet): "Repository": CATEGORY_QR_REPOSITORY} qv_option = self.get_option(_("View Type")) list_option = self.get_option(_("Quick Views")) - list_option.clear() qv_list = get_quick_report_list(code_map[qv_option.get_value()]) + list_option.clear() for pdata in qv_list: list_option.add_item(pdata.id, pdata.name) +