diff --git a/ChangeLog b/ChangeLog index 9f89b2ae6..9aa0b8c60 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2004-08-31 Alex Roitman + * src/Sources.py (SourceTab.redraw, SourceSelector.redraw): + Use gramps ID instead of handle for display. + * src/ImageSelect.py (GlobalMediaProperties.display_refs): + Use gramps ID instead of handle for display. + 2004-08-30 Don Allingham * src/AddMedia.py: use new MediaList update routine * src/DisplayModels.py: new update list routine diff --git a/src/ImageSelect.py b/src/ImageSelect.py index 0304716f5..f4baf2360 100644 --- a/src/ImageSelect.py +++ b/src/ImageSelect.py @@ -28,6 +28,8 @@ import os import string import urlparse +from gettext import gettext as _ + #------------------------------------------------------------------------- # # GTK/Gnome modules @@ -54,9 +56,7 @@ import ListModel import SelectObject import GrampsMime import Sources - from QuestionDialog import ErrorDialog -from gettext import gettext as _ _IMAGEX = 140 _IMAGEY = 150 @@ -201,7 +201,7 @@ class ImageSelect: def savephoto(self, photo): """Save the photo in the dataobj object - must be overridden""" - pass + pass _drag_targets = [ ('STRING', 0, 0), @@ -233,7 +233,7 @@ class Gallery(ImageSelect): _iconlist_refs.append(icon_list) self.in_event = 0 - + # Remember arguments self.path = path; self.dataobj = dataobj; @@ -1059,25 +1059,25 @@ class GlobalMediaProperties: p = self.db.get_person_from_handle(key) for o in p.get_media_list(): if o.get_reference_handle() == self.obj.get_handle(): - self.refmodel.add([_("Person"),p.get_handle(),GrampsCfg.get_nameof()(p)]) + self.refmodel.add([_("Person"),p.get_gramps_id(),GrampsCfg.get_nameof()(p)]) any = 1 for key in self.db.get_family_handles(): p = self.db.get_family_from_handle(key) for o in p.get_media_list(): if o.get_reference_handle() == self.obj.get_handle(): - self.refmodel.add([_("Family"),p.get_handle(),Utils.family_name(p,self.db)]) + self.refmodel.add([_("Family"),p.get_gramps_id(),Utils.family_name(p,self.db)]) any = 1 for key in self.db.get_source_handles(): p = self.db.get_source_from_handle(key) for o in p.get_media_list(): if o.get_reference_handle() == self.obj.get_handle(): - self.refmodel.add([_("Source"),p.get_handle(),p.get_title()]) + self.refmodel.add([_("Source"),p.get_gramps_id(),p.get_title()]) any = 1 for key in self.db.get_place_handles(): p = self.db.get_place_from_handle(key) for o in p.get_media_list(): if o.get_reference_handle() == self.obj.get_handle(): - self.refmodel.add([_("Place"),p.get_handle(),p.get_title()]) + self.refmodel.add([_("Place"),p.get_gramps_id(),p.get_title()]) any = 1 if any: Utils.bold_label(self.refs_label) @@ -1224,4 +1224,3 @@ class DeleteMediaQuery: self.db.transaction_commit(trans,_("Remove Media Object")) if self.update: self.update() - diff --git a/src/Sources.py b/src/Sources.py index 1cfb1988f..6c0f94327 100644 --- a/src/Sources.py +++ b/src/Sources.py @@ -164,7 +164,7 @@ class SourceSelector: base_handle = s.get_base_handle() base = self.db.get_source_from_handle(base_handle) node = self.model.append() - self.model.set(node,0,base_handle,1,base.get_title()) + self.model.set(node,0,base.get_gramps_id(),1,base.get_title()) def src_ok_clicked(self,obj): del self.orig[:] @@ -245,7 +245,7 @@ class SourceTab: base_handle = s.get_base_handle() node = self.model.append() base = self.db.get_source_from_handle(base_handle) - self.model.set(node,0,base_handle,1,base.get_title()) + self.model.set(node,0,base.get_gramps_id(),1,base.get_title()) if self.list: Utils.bold_label(self.parent.sources_label) else: