Fixed GdkImlib problem with XPM data for some versions of python 2.X
svn: r566
This commit is contained in:
parent
857c294647
commit
0ee5d8eaa3
@ -619,7 +619,7 @@ class EditPerson:
|
|||||||
"""loads, scales, and displays the person's main photo"""
|
"""loads, scales, and displays the person's main photo"""
|
||||||
self.load_obj = photo
|
self.load_obj = photo
|
||||||
if photo == None:
|
if photo == None:
|
||||||
self.get_widget("personPix").load_imlib(const.empty_image)
|
self.get_widget("personPix").hide()
|
||||||
else:
|
else:
|
||||||
try:
|
try:
|
||||||
i = GdkImlib.Image(photo)
|
i = GdkImlib.Image(photo)
|
||||||
@ -628,8 +628,9 @@ class EditPerson:
|
|||||||
y = int(scale*(i.rgb_height))
|
y = int(scale*(i.rgb_height))
|
||||||
i = i.clone_scaled_image(x,y)
|
i = i.clone_scaled_image(x,y)
|
||||||
self.get_widget("personPix").load_imlib(i)
|
self.get_widget("personPix").load_imlib(i)
|
||||||
|
self.get_widget("personPix").show()
|
||||||
except:
|
except:
|
||||||
self.get_widget("personPix").load_imlib(const.empty_image)
|
self.get_widget("personPix").hide()
|
||||||
|
|
||||||
def update_lists(self):
|
def update_lists(self):
|
||||||
"""Updates the person's lists if anything has changed"""
|
"""Updates the person's lists if anything has changed"""
|
||||||
|
@ -181,13 +181,14 @@ class MediaView:
|
|||||||
if index > 0:
|
if index > 0:
|
||||||
self.media_list.select_row(current_row,0)
|
self.media_list.select_row(current_row,0)
|
||||||
self.media_list.moveto(current_row)
|
self.media_list.moveto(current_row)
|
||||||
|
self.preview.show()
|
||||||
else:
|
else:
|
||||||
self.mid.set_text("")
|
self.mid.set_text("")
|
||||||
self.mtype.set_text("")
|
self.mtype.set_text("")
|
||||||
self.mdesc.set_text("")
|
self.mdesc.set_text("")
|
||||||
self.mpath.set_text("")
|
self.mpath.set_text("")
|
||||||
self.mdetails.set_text("")
|
self.mdetails.set_text("")
|
||||||
self.preview.load_imlib(const.empty_image)
|
self.preview.hide()
|
||||||
|
|
||||||
if current_row < self.media_list.rows:
|
if current_row < self.media_list.rows:
|
||||||
self.media_list.moveto(current_row)
|
self.media_list.moveto(current_row)
|
||||||
|
@ -518,12 +518,3 @@ familyAttributes = initialize_family_attribute_list()
|
|||||||
familyRelations = initialize_family_relation_list()
|
familyRelations = initialize_family_relation_list()
|
||||||
places = []
|
places = []
|
||||||
surnames = []
|
surnames = []
|
||||||
|
|
||||||
xpm_data = [
|
|
||||||
'/* XPM */',
|
|
||||||
'static char * foo_xpm[] = {',
|
|
||||||
'"1 1 1 1"',
|
|
||||||
'" c None"',
|
|
||||||
'" "};']
|
|
||||||
|
|
||||||
empty_image = create_image_from_xpm(xpm_data)
|
|
||||||
|
Loading…
Reference in New Issue
Block a user