diff --git a/ChangeLog b/ChangeLog index 2fdc5c470..28988ea76 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,8 @@ 2006-10-09 Alex Roitman + * 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. 2006-10-09 Don Allingham diff --git a/src/ReportBase/_BareReportDialog.py b/src/ReportBase/_BareReportDialog.py index cbc0ccef1..83ad84048 100644 --- a/src/ReportBase/_BareReportDialog.py +++ b/src/ReportBase/_BareReportDialog.py @@ -306,7 +306,10 @@ class BareReportDialog(ManagedWindow.ManagedWindow): """Set up the title bar of the dialog. This function relies on the get_title() customization function for what the title 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()) def setup_header(self): diff --git a/src/ReportBase/_ReportDialog.py b/src/ReportBase/_ReportDialog.py index ea861e65a..110862b53 100644 --- a/src/ReportBase/_ReportDialog.py +++ b/src/ReportBase/_ReportDialog.py @@ -105,9 +105,12 @@ class ReportDialog(BareReportDialog): """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 report for the selected person. """ - return _("%(report_name)s for %(person_name)s") % { - 'report_name' : self.report_name, - 'person_name' : name} + if name.strip(): + return _("%(report_name)s for %(person_name)s") % { + 'report_name' : self.report_name, + 'person_name' : name} + else: + return _("%(report_name)s") % {'report_name' : self.report_name} #------------------------------------------------------------------------ #