* src/ReportBase/_BareReportDialog.py (setup_title): Set name to
empty string if no person is available. * src/ReportBase/_ReportDialog.py (get_header): Make meaningful title for the header when name is empty. svn: r7381
This commit is contained in:
parent
7c240f8d3c
commit
82f2d2d69d
@ -1,4 +1,8 @@
|
|||||||
2006-10-09 Alex Roitman <shura@gramps-project.org>
|
2006-10-09 Alex Roitman <shura@gramps-project.org>
|
||||||
|
* src/ReportBase/_BareReportDialog.py (setup_title): Set name to
|
||||||
|
empty string if no person is available.
|
||||||
|
* src/ReportBase/_ReportDialog.py (get_header): Make meaningful
|
||||||
|
title for the header when name is empty.
|
||||||
* src/FilterEditor/_FilterEditor.py (close): Allow more arguments.
|
* src/FilterEditor/_FilterEditor.py (close): Allow more arguments.
|
||||||
|
|
||||||
2006-10-09 Don Allingham <don@gramps-project.org>
|
2006-10-09 Don Allingham <don@gramps-project.org>
|
||||||
|
@ -306,7 +306,10 @@ class BareReportDialog(ManagedWindow.ManagedWindow):
|
|||||||
"""Set up the title bar of the dialog. This function relies
|
"""Set up the title bar of the dialog. This function relies
|
||||||
on the get_title() customization function for what the title
|
on the get_title() customization function for what the title
|
||||||
should be."""
|
should be."""
|
||||||
self.name = NameDisplay.displayer.display(self.person)
|
if self.person:
|
||||||
|
self.name = NameDisplay.displayer.display(self.person)
|
||||||
|
else:
|
||||||
|
self.name = ''
|
||||||
self.window.set_title(self.get_title())
|
self.window.set_title(self.get_title())
|
||||||
|
|
||||||
def setup_header(self):
|
def setup_header(self):
|
||||||
|
@ -105,9 +105,12 @@ class ReportDialog(BareReportDialog):
|
|||||||
"""The header line to put at the top of the contents of the
|
"""The header line to put at the top of the contents of the
|
||||||
dialog box. By default this will just be the name of the
|
dialog box. By default this will just be the name of the
|
||||||
report for the selected person. """
|
report for the selected person. """
|
||||||
return _("%(report_name)s for %(person_name)s") % {
|
if name.strip():
|
||||||
'report_name' : self.report_name,
|
return _("%(report_name)s for %(person_name)s") % {
|
||||||
'person_name' : name}
|
'report_name' : self.report_name,
|
||||||
|
'person_name' : name}
|
||||||
|
else:
|
||||||
|
return _("%(report_name)s") % {'report_name' : self.report_name}
|
||||||
|
|
||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
|
Loading…
x
Reference in New Issue
Block a user