2006-10-08 Don Allingham <don@gramps-project.org>

* 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
This commit is contained in:
Don Allingham 2006-10-09 02:45:05 +00:00
parent fae1b7dfb2
commit 747ffa7f38
4 changed files with 13 additions and 6 deletions

View File

@ -1,3 +1,9 @@
2006-10-08 Don Allingham <don@gramps-project.org>
* 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 <shura@gramps-project.org>
* src/RelLib/_Location.py (set_county, get_county): Move into
LocationBase class.

View File

@ -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

View File

@ -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, ])

View File

@ -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)