From 545e170e7f1069fa3c55220d8626d82c5b5701f3 Mon Sep 17 00:00:00 2001 From: Alex Roitman Date: Tue, 1 Aug 2006 02:24:49 +0000 Subject: [PATCH] 2006-07-31 Alex Roitman * src/UndoHistory.py (UndoHistory._build_model): Only show the initial entry is database is really opened. svn: r7100 --- gramps2/ChangeLog | 4 ++++ gramps2/src/UndoHistory.py | 16 ++++++++-------- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/gramps2/ChangeLog b/gramps2/ChangeLog index 3053bc766..601804732 100644 --- a/gramps2/ChangeLog +++ b/gramps2/ChangeLog @@ -1,3 +1,7 @@ +2006-07-31 Alex Roitman + * src/UndoHistory.py (UndoHistory._build_model): Only show the + initial entry is database is really opened. + 2006-07-31 Zsolt Foldvari * src/NameDisplay.py: Rewrite in more object oriented way; Interface change. diff --git a/gramps2/src/UndoHistory.py b/gramps2/src/UndoHistory.py index a04040ce8..eed6393e6 100644 --- a/gramps2/src/UndoHistory.py +++ b/gramps2/src/UndoHistory.py @@ -208,15 +208,15 @@ class UndoHistory(ManagedWindow.ManagedWindow): def _build_model(self): self.model.clear() - - if self.db.abort_possible: - mod_text = _('Database opened') - else: - mod_text = _('History cleared') - time_text = time.ctime(self.db.undo_history_timestamp) - fg = bg = None - self.model.append(row=[time_text,mod_text,fg,bg]) + + if self.db.undo_history_timestamp: + if self.db.abort_possible: + mod_text = _('Database opened') + else: + mod_text = _('History cleared') + time_text = time.ctime(self.db.undo_history_timestamp) + self.model.append(row=[time_text,mod_text,fg,bg]) # Get the not-None portion of transaction list translist = [item for item in self.db.translist if item]