* 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.
|
Correctly call gui_tool, fix wm.
|
||||||
|
|
||||||
2006-04-27 Don Allingham <don@gramps-project.org>
|
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
|
* src/ViewManager.py: fix top on Config.set calls
|
||||||
* data/gramps.schemas.in: remove toolbar, now unused
|
* data/gramps.schemas.in: remove toolbar, now unused
|
||||||
* src/TipOfDay.py (TipOfDay.__init__): switch to ManagedWindow
|
* src/TipOfDay.py (TipOfDay.__init__): switch to ManagedWindow
|
||||||
|
@ -1593,15 +1593,17 @@ class GalleryTab(ButtonTab):
|
|||||||
self.pack_start(scroll, True)
|
self.pack_start(scroll, True)
|
||||||
|
|
||||||
def _update_internal_list(self, *obj):
|
def _update_internal_list(self, *obj):
|
||||||
node = self.iconmodel.get_iter_first()
|
|
||||||
newlist = []
|
newlist = []
|
||||||
|
node = self.iconmodel.get_iter_first()
|
||||||
while node != None:
|
while node != None:
|
||||||
newlist.append(self.iconmodel.get_value(node, 2))
|
newlist.append(self.iconmodel.get_value(node, 2))
|
||||||
node = self.iconmodel.iter_next(node)
|
node = self.iconmodel.iter_next(node)
|
||||||
for i in xrange(len(self.media_list)):
|
for i in xrange(len(self.media_list)):
|
||||||
self.media_list.pop()
|
self.media_list.pop()
|
||||||
for i in newlist:
|
for i in newlist:
|
||||||
self.media_list.append(i)
|
if i:
|
||||||
|
self.media_list.append(i)
|
||||||
|
|
||||||
if self.update:
|
if self.update:
|
||||||
self.update()
|
self.update()
|
||||||
self.changed = True
|
self.changed = True
|
||||||
|
@ -564,12 +564,10 @@ class EditPerson(EditPrimary):
|
|||||||
Loads the primary image into the main form if it exists.
|
Loads the primary image into the main form if it exists.
|
||||||
"""
|
"""
|
||||||
media_list = self.obj.get_media_list()
|
media_list = self.obj.get_media_list()
|
||||||
print media_list
|
|
||||||
if media_list:
|
if media_list:
|
||||||
photo = media_list[0]
|
photo = media_list[0]
|
||||||
object_handle = photo.get_reference_handle()
|
object_handle = photo.get_reference_handle()
|
||||||
obj = self.db.get_object_from_handle(object_handle)
|
obj = self.db.get_object_from_handle(object_handle)
|
||||||
print photo, obj.get_path()
|
|
||||||
if self.load_obj != obj.get_path():
|
if self.load_obj != obj.get_path():
|
||||||
mime_type = obj.get_mime_type()
|
mime_type = obj.get_mime_type()
|
||||||
if mime_type and mime_type.startswith("image"):
|
if mime_type and mime_type.startswith("image"):
|
||||||
|
Loading…
Reference in New Issue
Block a user