From 747ffa7f384ada8a86cd99c33d139daef0ce8571 Mon Sep 17 00:00:00 2001 From: Don Allingham Date: Mon, 9 Oct 2006 02:45:05 +0000 Subject: [PATCH] 2006-10-08 Don Allingham * src/Editors/_EditReference.py: call cancel_and_close on window cancel * src/DisplayTabs/_SourceRefModel.py: remove debug * src/DisplayTabs/_EmbeddedList.py: remove debug svn: r7372 --- ChangeLog | 6 ++++++ src/DisplayTabs/_EmbeddedList.py | 1 - src/DisplayTabs/_SourceRefModel.py | 1 - src/Editors/_EditReference.py | 11 +++++++---- 4 files changed, 13 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 73cca81d3..2ee6a2af9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2006-10-08 Don Allingham + * src/Editors/_EditReference.py: call cancel_and_close on window + cancel + * src/DisplayTabs/_SourceRefModel.py: remove debug + * src/DisplayTabs/_EmbeddedList.py: remove debug + 2006-10-08 Alex Roitman * src/RelLib/_Location.py (set_county, get_county): Move into LocationBase class. diff --git a/src/DisplayTabs/_EmbeddedList.py b/src/DisplayTabs/_EmbeddedList.py index ed62f33dc..4ac9be545 100644 --- a/src/DisplayTabs/_EmbeddedList.py +++ b/src/DisplayTabs/_EmbeddedList.py @@ -278,7 +278,6 @@ class EmbeddedList(ButtonTab): (model, node) = self.selection.get_selected() if node: obj = self.model.get_value(node, self._HANDLE_COL) - print "Select", obj, obj.ref, obj.get_reference_handle() return model.get_value(node, self._HANDLE_COL) return None diff --git a/src/DisplayTabs/_SourceRefModel.py b/src/DisplayTabs/_SourceRefModel.py index f61798761..1360d7e5f 100644 --- a/src/DisplayTabs/_SourceRefModel.py +++ b/src/DisplayTabs/_SourceRefModel.py @@ -46,6 +46,5 @@ class SourceRefModel(gtk.ListStore): self.db = db for sref in sref_list: src = self.db.get_source_from_handle(sref.get_reference_handle()) - print "Model", sref, sref.ref, sref.get_reference_handle() self.append(row=[src.gramps_id, src.title, src.author, sref.page, sref, ]) diff --git a/src/Editors/_EditReference.py b/src/Editors/_EditReference.py index 6e9c03d0b..cda9f6692 100644 --- a/src/Editors/_EditReference.py +++ b/src/Editors/_EditReference.py @@ -98,12 +98,16 @@ class EditReference(ManagedWindow.ManagedWindow): else: return id(self) - def define_ok_button(self,button,function): + def define_ok_button(self, button, function): button.connect('clicked',function) button.set_sensitive(not self.db.readonly) - def define_cancel_button(self,button): - button.connect('clicked',self.close) + def define_cancel_button(self, button): + button.connect('clicked',self.close_and_cancel) + + def close_and_cancel(self, obj): + self._cleanup_on_exit() + self.close(obj) def define_help_button(self,button,tag): import GrampsDisplay @@ -115,5 +119,4 @@ class EditReference(ManagedWindow.ManagedWindow): def close(self,*obj): for key in self.signal_keys: self.db.disconnect(key) - self._cleanup_on_exit() ManagedWindow.ManagedWindow.close(self)