From 88c68314301afd800e44dc71c8232b2450928a88 Mon Sep 17 00:00:00 2001 From: Don Allingham Date: Thu, 27 Apr 2006 21:56:36 +0000 Subject: [PATCH] * src/Editors/_EditPerson.py (EditPerson._create_tabbed_pages): initialize load_image callback * src/DisplayTabs.py (GalleryTab): call callback if defined when the list is updated, handle reorder inserting of None objects svn: r6476 --- ChangeLog | 4 ++++ src/DisplayTabs.py | 6 ++++-- src/Editors/_EditPerson.py | 2 -- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 42970cca7..94ed5d8dd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,10 @@ Correctly call gui_tool, fix wm. 2006-04-27 Don Allingham + * src/Editors/_EditPerson.py (EditPerson._create_tabbed_pages): + initialize load_image callback + * src/DisplayTabs.py (GalleryTab): call callback if defined when + the list is updated, handle reorder inserting of None objects * src/ViewManager.py: fix top on Config.set calls * data/gramps.schemas.in: remove toolbar, now unused * src/TipOfDay.py (TipOfDay.__init__): switch to ManagedWindow diff --git a/src/DisplayTabs.py b/src/DisplayTabs.py index da8b8d19d..ebb9cf944 100644 --- a/src/DisplayTabs.py +++ b/src/DisplayTabs.py @@ -1593,15 +1593,17 @@ class GalleryTab(ButtonTab): self.pack_start(scroll, True) def _update_internal_list(self, *obj): - node = self.iconmodel.get_iter_first() newlist = [] + node = self.iconmodel.get_iter_first() while node != None: newlist.append(self.iconmodel.get_value(node, 2)) node = self.iconmodel.iter_next(node) for i in xrange(len(self.media_list)): self.media_list.pop() for i in newlist: - self.media_list.append(i) + if i: + self.media_list.append(i) + if self.update: self.update() self.changed = True diff --git a/src/Editors/_EditPerson.py b/src/Editors/_EditPerson.py index ad615a858..edb4eca5a 100644 --- a/src/Editors/_EditPerson.py +++ b/src/Editors/_EditPerson.py @@ -564,12 +564,10 @@ class EditPerson(EditPrimary): Loads the primary image into the main form if it exists. """ media_list = self.obj.get_media_list() - print media_list if media_list: photo = media_list[0] object_handle = photo.get_reference_handle() obj = self.db.get_object_from_handle(object_handle) - print photo, obj.get_path() if self.load_obj != obj.get_path(): mime_type = obj.get_mime_type() if mime_type and mime_type.startswith("image"):