From ecf3f03e8bb416b5ce0e4e1db1e9cbccf6220fe3 Mon Sep 17 00:00:00 2001 From: Don Allingham Date: Tue, 3 Oct 2006 16:59:51 +0000 Subject: [PATCH] 2006-10-03 Don Allingham * src/GrampsLogger/_ErrorReportAssistant.py: capitalize "GRAMPS" * src/ViewManager.py: display buttons on first open * src/Editors/_EditSourceRef.py: fix cancelling of text (bug #450) * src/DisplayTabs/_NoteTab.py: fix cancelling of text * src/DisplayTabs/_TextTab.py: fix cancelling of text svn: r7345 --- gramps2/ChangeLog | 8 ++++++++ gramps2/src/DisplayTabs/_NoteTab.py | 5 +++++ gramps2/src/DisplayTabs/_TextTab.py | 4 ++++ gramps2/src/Editors/_EditSourceRef.py | 6 ++++++ gramps2/src/GrampsLogger/_ErrorReportAssistant.py | 2 +- gramps2/src/ViewManager.py | 2 +- 6 files changed, 25 insertions(+), 2 deletions(-) diff --git a/gramps2/ChangeLog b/gramps2/ChangeLog index eb2e34903..5647578e9 100644 --- a/gramps2/ChangeLog +++ b/gramps2/ChangeLog @@ -1,3 +1,11 @@ +2006-10-03 Don Allingham + * src/GrampsLogger/_ErrorReportAssistant.py: capitalize "GRAMPS" + * src/ViewManager.py: display buttons on first open + * src/Editors/_EditSourceRef.py: fix cancelling of text (bug #450) + * src/DisplayTabs/_NoteTab.py: fix cancelling of text + * src/DisplayTabs/_TextTab.py: fix cancelling of text + + 2006-10-02 Don Allingham * src/GrampsDb/_ReadXML.py: save description properly on read * src/RelLib/_Location.py: call parent class properly diff --git a/gramps2/src/DisplayTabs/_NoteTab.py b/gramps2/src/DisplayTabs/_NoteTab.py index 269d43426..314a2cc02 100644 --- a/gramps2/src/DisplayTabs/_NoteTab.py +++ b/gramps2/src/DisplayTabs/_NoteTab.py @@ -51,6 +51,8 @@ class NoteTab(GrampsTab): def __init__(self, dbstate, uistate, track, note_obj, title=_('Note')): self.note_obj = note_obj + self.original = note_obj.serialize() + GrampsTab.__init__(self, dbstate, uistate, track, title) self.show_all() @@ -141,3 +143,6 @@ class NoteTab(GrampsTab): def rebuild(self): self._set_label() + + def cancel(self): + self.note_obj.unserialize(self.original) diff --git a/gramps2/src/DisplayTabs/_TextTab.py b/gramps2/src/DisplayTabs/_TextTab.py index 8e4f52208..9b3731707 100644 --- a/gramps2/src/DisplayTabs/_TextTab.py +++ b/gramps2/src/DisplayTabs/_TextTab.py @@ -51,6 +51,7 @@ class TextTab(GrampsTab): def __init__(self, dbstate, uistate, track, obj, title=_('Text')): self.obj = obj + self.original = obj.serialize() GrampsTab.__init__(self, dbstate, uistate, track, title) self.show_all() @@ -106,3 +107,6 @@ class TextTab(GrampsTab): def rebuild(self): self._set_label() + + def cancel(self): + self.obj.unserialize(self.original) diff --git a/gramps2/src/Editors/_EditSourceRef.py b/gramps2/src/Editors/_EditSourceRef.py index 69bead2f7..4e231f2c7 100644 --- a/gramps2/src/Editors/_EditSourceRef.py +++ b/gramps2/src/Editors/_EditSourceRef.py @@ -72,6 +72,12 @@ class EditSourceRef(EditReference): def _connect_signals(self): self.define_ok_button(self.top.get_widget('ok'),self.ok_clicked) self.define_cancel_button(self.top.get_widget('cancel')) + + def close(self, *obj): + self.note_tab.cancel() + self.text_tab.cancel() + self.comment_tab.cancel() + EditReference.close(self,obj) def _setup_fields(self): self.ref_privacy = PrivacyButton( diff --git a/gramps2/src/GrampsLogger/_ErrorReportAssistant.py b/gramps2/src/GrampsLogger/_ErrorReportAssistant.py index a24f03cca..e9e1c1348 100644 --- a/gramps2/src/GrampsLogger/_ErrorReportAssistant.py +++ b/gramps2/src/GrampsLogger/_ErrorReportAssistant.py @@ -383,7 +383,7 @@ class ErrorReportAssistant: label = gtk.Label( "%s %s" % (_("Use one of the two methods below to send the "\ - "bug report to the Gramps bug reporting mailing "\ + "bug report to the GRAMPS bug reporting mailing "\ "list at "), "gramps-bugs@lists.sourceforge.net.")) label.set_alignment(0.01,0.5) diff --git a/gramps2/src/ViewManager.py b/gramps2/src/ViewManager.py index d0b8a73b2..6413cfb4b 100644 --- a/gramps2/src/ViewManager.py +++ b/gramps2/src/ViewManager.py @@ -716,7 +716,7 @@ class ViewManager: if grp in self.uimanager.get_action_groups(): self.uimanager.remove_action_group(grp) - if len(self.pages) > 0 and self.active_page != self.pages[num]: + if len(self.pages) > 0: self.active_page = self.pages[num] self.active_page.set_active() Config.set(Config.LAST_VIEW,num)