* 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
This commit is contained in:
parent
513f6706bf
commit
88c6831430
@ -5,6 +5,10 @@
|
||||
Correctly call gui_tool, fix wm.
|
||||
|
||||
2006-04-27 Don Allingham <don@gramps-project.org>
|
||||
* 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
|
||||
|
@ -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
|
||||
|
@ -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"):
|
||||
|
Loading…
Reference in New Issue
Block a user