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:
parent
6f2f4bd8b3
commit
93ea5ab269
@ -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>
|
2006-10-08 Alex Roitman <shura@gramps-project.org>
|
||||||
* src/RelLib/_Location.py (set_county, get_county): Move into
|
* src/RelLib/_Location.py (set_county, get_county): Move into
|
||||||
LocationBase class.
|
LocationBase class.
|
||||||
|
@ -278,7 +278,6 @@ class EmbeddedList(ButtonTab):
|
|||||||
(model, node) = self.selection.get_selected()
|
(model, node) = self.selection.get_selected()
|
||||||
if node:
|
if node:
|
||||||
obj = self.model.get_value(node, self._HANDLE_COL)
|
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 model.get_value(node, self._HANDLE_COL)
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
@ -46,6 +46,5 @@ class SourceRefModel(gtk.ListStore):
|
|||||||
self.db = db
|
self.db = db
|
||||||
for sref in sref_list:
|
for sref in sref_list:
|
||||||
src = self.db.get_source_from_handle(sref.get_reference_handle())
|
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,
|
self.append(row=[src.gramps_id, src.title, src.author,
|
||||||
sref.page, sref, ])
|
sref.page, sref, ])
|
||||||
|
@ -98,12 +98,16 @@ class EditReference(ManagedWindow.ManagedWindow):
|
|||||||
else:
|
else:
|
||||||
return id(self)
|
return id(self)
|
||||||
|
|
||||||
def define_ok_button(self,button,function):
|
def define_ok_button(self, button, function):
|
||||||
button.connect('clicked',function)
|
button.connect('clicked',function)
|
||||||
button.set_sensitive(not self.db.readonly)
|
button.set_sensitive(not self.db.readonly)
|
||||||
|
|
||||||
def define_cancel_button(self,button):
|
def define_cancel_button(self, button):
|
||||||
button.connect('clicked',self.close)
|
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):
|
def define_help_button(self,button,tag):
|
||||||
import GrampsDisplay
|
import GrampsDisplay
|
||||||
@ -115,5 +119,4 @@ class EditReference(ManagedWindow.ManagedWindow):
|
|||||||
def close(self,*obj):
|
def close(self,*obj):
|
||||||
for key in self.signal_keys:
|
for key in self.signal_keys:
|
||||||
self.db.disconnect(key)
|
self.db.disconnect(key)
|
||||||
self._cleanup_on_exit()
|
|
||||||
ManagedWindow.ManagedWindow.close(self)
|
ManagedWindow.ManagedWindow.close(self)
|
||||||
|
Loading…
Reference in New Issue
Block a user