diff --git a/gramps2/ChangeLog b/gramps2/ChangeLog index 3b2f5f5d8..30a08b372 100644 --- a/gramps2/ChangeLog +++ b/gramps2/ChangeLog @@ -1,8 +1,14 @@ +2007-04-15 Don Allingham + * src/GrampsDb/_WriteGedcom.py: use CONT to continue page info + * src/GrampsDb/_GrampsBSDDB.py: additional error checking + * src/QuestionDialog.py: enable markup + * src/DbLoader.py: additional error checking + 2007-04-14 Brian Matherly - * src/plugins/NarrativeWeb.py - * src/ReportBase/_ReportUtils.py - 0001012: Private source and private child references shown in narrative - website. + * src/plugins/NarrativeWeb.py + * src/ReportBase/_ReportUtils.py + 0001012: Private source and private child references shown in narrative + website. 2007-04-14 Brian Matherly * src\data\main4.css @@ -11,7 +17,7 @@ * src\data\main1.css * src\data\main2.css * src\data\main3.css - 0001017: Insufficient space in pedigree view of narrative website + 0001017: Insufficient space in pedigree view of narrative website 2007-04-12 Brian Matherly * src/docgen/GtkPrint.py: 0000908: GtkPrint doesn't parse if you don't have diff --git a/gramps2/src/DbLoader.py b/gramps2/src/DbLoader.py index 32663021e..9f9f4113f 100644 --- a/gramps2/src/DbLoader.py +++ b/gramps2/src/DbLoader.py @@ -446,23 +446,26 @@ class DbLoader: os.chdir(os.path.dirname(filename)) except: print "could not change directory" - except DBRunRecoveryError, msg: + except (DBAccessError, DBPageNotFoundError, + DBInvalidArgError, DBRunRecoveryError), msg: QuestionDialog.ErrorDialog( _("Low level database corruption detected"), _("GRAMPS has detected a problem in the underlying " - "Berkeley database. Please exit the program, and GRAMPS " + "Berkeley database. If you have renamed this file, " + "change the name back to its original name. If you have " + "copied the file from another machine, this file is not " + "usable. Export your data to XML on the original machine " + "and import it into a new database.\n\nOtherwise, " + "please exit the program, and GRAMPS " "will attempt to run the recovery repair operation " "the next time you open this database. If this " "problem persists, create a new database, import " "from a backup database, and report the problem to " "gramps-bugs@lists.sourceforge.net.")) - except (DBAccessError, DBPageNotFoundError,DBInvalidArgError), msg: + except: QuestionDialog.ErrorDialog( _("Could not open file: %s") % filename, str(msg[1])) - except Exception: - log.error("Failed to open database.", exc_info=True) - return True def open_saved_as(self, filename, filetype): diff --git a/gramps2/src/GrampsDb/_GrampsBSDDB.py b/gramps2/src/GrampsDb/_GrampsBSDDB.py index 16e1f5f16..05dcd973f 100644 --- a/gramps2/src/GrampsDb/_GrampsBSDDB.py +++ b/gramps2/src/GrampsDb/_GrampsBSDDB.py @@ -1451,7 +1451,7 @@ class GrampsBSDDB(GrampsDbBase,UpdateCallback): if self.UseTXN: self.txn = self.env.txn_begin() status = GrampsDbBase.undo(self,update_history) - if self.UseTXN: + if self.UseTXN and self.txn: if status: self.txn.commit() else: diff --git a/gramps2/src/GrampsDb/_WriteGedcom.py b/gramps2/src/GrampsDb/_WriteGedcom.py index 75153b593..06e2299e7 100644 --- a/gramps2/src/GrampsDb/_WriteGedcom.py +++ b/gramps2/src/GrampsDb/_WriteGedcom.py @@ -1388,8 +1388,9 @@ class GedcomWriter(UpdateCallback): # Reference to the source self.writeln("%d SOUR @%s@" % (level,src.get_gramps_id())) if ref.get_page() != "": - page_text = self.cnvtxt(ref.get_page().replace('\n',' ; ')) - self.writeln('%d PAGE %s' % (level+1,page_text)) + sep = "\n%d CONT " % (level+2) + page_text = self.cnvtxt(ref.get_page().replace('\n', sep)) + self.writeln('%d PAGE %s' % (level+1, page_text)) conf = ref.get_confidence_level() # Cap the maximum level conf = min(conf,RelLib.SourceRef.CONF_VERY_HIGH) diff --git a/gramps2/src/QuestionDialog.py b/gramps2/src/QuestionDialog.py index 55ac6519d..f351ebbe1 100644 --- a/gramps2/src/QuestionDialog.py +++ b/gramps2/src/QuestionDialog.py @@ -171,7 +171,7 @@ class ErrorDialog(gtk.MessageDialog): type=gtk.MESSAGE_ERROR, buttons=gtk.BUTTONS_CLOSE) self.set_markup('%s' % msg1) - self.format_secondary_text(msg2) + self.format_secondary_markup(msg2) self.set_icon(ICON) self.set_title("%s - GRAMPS" % msg1) self.show()