From 5eb387daaffeb86e61c643028c8a7db89a77d9e0 Mon Sep 17 00:00:00 2001 From: Don Allingham Date: Wed, 8 Dec 2004 22:54:26 +0000 Subject: [PATCH] * src/DbPrompter.py: destroy filechooser if open cancelled. * src/Report.py: Use markup in dialog * src/Utils.py: fix year handling * src/plugins/Webpage.py: use markup svn: r3791 --- gramps2/ChangeLog | 6 ++++++ gramps2/src/DbPrompter.py | 3 ++- gramps2/src/Report.py | 4 +++- gramps2/src/Utils.py | 4 ++-- gramps2/src/plugins/WebPage.py | 4 +++- 5 files changed, 16 insertions(+), 5 deletions(-) diff --git a/gramps2/ChangeLog b/gramps2/ChangeLog index e204bc84e..98ea9653a 100644 --- a/gramps2/ChangeLog +++ b/gramps2/ChangeLog @@ -1,3 +1,9 @@ +2004-12-07 Don Allingham + * src/DbPrompter.py: destroy filechooser if open cancelled. + * src/Report.py: Use markup in dialog + * src/Utils.py: fix year handling + * src/plugins/Webpage.py: use markup + 2004-12-07 Alex Roitman * src/data/Makefile.am: Replace dist_data_DATA with EXTRA_DIST. diff --git a/gramps2/src/DbPrompter.py b/gramps2/src/DbPrompter.py index 44829c4af..f0d1705ff 100644 --- a/gramps2/src/DbPrompter.py +++ b/gramps2/src/DbPrompter.py @@ -202,7 +202,7 @@ class ExistingDbPrompter: QuestionDialog.ErrorDialog( _("Could not open file: %s") % filename, _('The type "%s" is not in the list of known file types') % filetype ) - #choose.destroy() + choose.destroy() return False #------------------------------------------------------------------------- @@ -365,6 +365,7 @@ class NewNativeDbPrompter: else: choose.destroy() return False + choose.destroy() return False #------------------------------------------------------------------------- diff --git a/gramps2/src/Report.py b/gramps2/src/Report.py index d0e249c73..08ccae04b 100644 --- a/gramps2/src/Report.py +++ b/gramps2/src/Report.py @@ -151,7 +151,9 @@ class Report: self.ptop = gtk.Dialog() self.ptop.set_has_separator(gtk.FALSE) self.ptop.set_title(title) - self.ptop.vbox.add(gtk.Label(header)) + lbl = gtk.Label(header) + lbl.set_use_markup(True) + self.ptop.vbox.add(lbl) self.ptop.vbox.set_spacing(10) self.pbar = gtk.ProgressBar() self.pbar_max = total diff --git a/gramps2/src/Utils.py b/gramps2/src/Utils.py index 5625eaf3a..494e323d3 100644 --- a/gramps2/src/Utils.py +++ b/gramps2/src/Utils.py @@ -538,7 +538,7 @@ def probably_alive(person,db): # These are fairly good indications that someone's not alive. for ev_handle in person.event_list: ev = db.get_event_from_handle(ev_handle) - if ev.name in ["Cause Of Death", "Burial", "Cremation"]: + if ev and ev.name in ["Cause Of Death", "Burial", "Cremation"]: return False if person.birth_handle: @@ -564,7 +564,7 @@ def probably_alive(person,db): if dobj.get_start_date() != Date.EMPTY: d = Date.Date(dobj) val = d.get_start_date() - val = (val[0],val[1],d.get_year() - years,val[3]) + val = d.get_year() - years d.set_year(val) if not not_too_old (d): return True diff --git a/gramps2/src/plugins/WebPage.py b/gramps2/src/plugins/WebPage.py index 5f1b86995..180326bda 100644 --- a/gramps2/src/plugins/WebPage.py +++ b/gramps2/src/plugins/WebPage.py @@ -770,7 +770,9 @@ class WebReport(Report.Report): self.sort = Sort.Sort(self.db) def get_progressbar_data(self): - return (_("Generate HTML reports - GRAMPS"), _("Creating Web Pages")) + return (_("Generate HTML reports - GRAMPS"), + '%s' % + _("Creating Web Pages")) def dump_gendex(self,person_handle_list,html_dir): fname = "%s/gendex.txt" % html_dir