* 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
This commit is contained in:
Alex Roitman 2003-06-03 20:07:18 +00:00
parent bb645d13aa
commit fd8aef72da
2 changed files with 10 additions and 3 deletions

View File

@ -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"""

View File

@ -43,6 +43,7 @@
<child>
<widget class="GtkButton" id="button105">
<property name="visible">True</property>
<property name="tooltip" translatable="yes">Perform selected action</property>
<property name="can_default">True</property>
<property name="can_focus">True</property>
<property name="label">gtk-apply</property>
@ -56,6 +57,7 @@
<child>
<widget class="GtkButton" id="button104">
<property name="visible">True</property>
<property name="tooltip" translatable="yes">Perform selected action and close this dialog</property>
<property name="can_default">True</property>
<property name="can_focus">True</property>
<property name="label">gtk-ok</property>