From 108e337b9d3838f7416d6c92287cea5b9f5e2b99 Mon Sep 17 00:00:00 2001 From: Alex Roitman Date: Tue, 3 Jun 2003 20:07:18 +0000 Subject: [PATCH] * src/Plugins.py (on_apply_clicked): Do not destroy dialog window. (on_ok_clicked): Added. Destory the dialog and do on_apply_clicked(). * src/plugins.glade: Added tooltips to Apply and OK buttons. * src/plugins/FtmStyleAncestor.py (apply_filter): Fixed generation condition. * src/plugins/FtmStyleDescendants.py (write_report): Do not print children if the current generation is the last. * src/plugins/DetDescendantReport.py (filter): Make it apply_filter, clean up and make shorter, modify numbering algorithm so that no gaps occur in people's indices. svn: r1650 --- gramps2/src/Plugins.py | 11 ++++++++--- gramps2/src/plugins.glade | 2 ++ 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/gramps2/src/Plugins.py b/gramps2/src/Plugins.py index 7f837dccb..976d0544a 100644 --- a/gramps2/src/Plugins.py +++ b/gramps2/src/Plugins.py @@ -1,7 +1,7 @@ # # Gramps - a GTK+/GNOME based genealogy program # -# Copyright (C) 2000 Donald N. Allingham +# Copyright (C) 2000-2003 Donald N. Allingham # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -127,7 +127,7 @@ class PluginDialog: self.dialog = gtk.glade.XML(const.pluginsFile,"report") self.dialog.signal_autoconnect({ "on_report_apply_clicked" : self.on_apply_clicked, - "on_report_ok_clicked" : self.on_apply_clicked, + "on_report_ok_clicked" : self.on_ok_clicked, "destroy_passed_object" : Utils.destroy_passed_object }) @@ -160,13 +160,18 @@ class PluginDialog: def on_apply_clicked(self,obj): """Execute the selected report""" - Utils.destroy_passed_object(obj) if self.run_tool: if self.update: self.run_tool(self.db,self.active,self.update) else: self.run_tool(self.db,self.active) + def on_ok_clicked(self,obj): + """Execute the selected report and close the dialog window""" + + Utils.destroy_passed_object(obj) + self.on_apply_clicked(obj) + def on_node_selected(self,obj): """Updates the informational display on the right hand side of the dialog box with the description of the selected report""" diff --git a/gramps2/src/plugins.glade b/gramps2/src/plugins.glade index 5b94f211c..a9010952a 100644 --- a/gramps2/src/plugins.glade +++ b/gramps2/src/plugins.glade @@ -43,6 +43,7 @@ True + Perform selected action True True gtk-apply @@ -56,6 +57,7 @@ True + Perform selected action and close this dialog True True gtk-ok