From 0ee5d8eaa3a6054420a2cc9dd3fe804f6d54a421 Mon Sep 17 00:00:00 2001 From: Don Allingham Date: Tue, 13 Nov 2001 18:28:59 +0000 Subject: [PATCH] Fixed GdkImlib problem with XPM data for some versions of python 2.X svn: r566 --- gramps/src/EditPerson.py | 5 +++-- gramps/src/MediaView.py | 3 ++- gramps/src/const.py | 9 --------- 3 files changed, 5 insertions(+), 12 deletions(-) diff --git a/gramps/src/EditPerson.py b/gramps/src/EditPerson.py index 96e041f8a..9c967ea95 100644 --- a/gramps/src/EditPerson.py +++ b/gramps/src/EditPerson.py @@ -619,7 +619,7 @@ class EditPerson: """loads, scales, and displays the person's main photo""" self.load_obj = photo if photo == None: - self.get_widget("personPix").load_imlib(const.empty_image) + self.get_widget("personPix").hide() else: try: i = GdkImlib.Image(photo) @@ -628,8 +628,9 @@ class EditPerson: y = int(scale*(i.rgb_height)) i = i.clone_scaled_image(x,y) self.get_widget("personPix").load_imlib(i) + self.get_widget("personPix").show() except: - self.get_widget("personPix").load_imlib(const.empty_image) + self.get_widget("personPix").hide() def update_lists(self): """Updates the person's lists if anything has changed""" diff --git a/gramps/src/MediaView.py b/gramps/src/MediaView.py index acbe5ffb8..41ebfd6fd 100644 --- a/gramps/src/MediaView.py +++ b/gramps/src/MediaView.py @@ -181,13 +181,14 @@ class MediaView: if index > 0: self.media_list.select_row(current_row,0) self.media_list.moveto(current_row) + self.preview.show() else: self.mid.set_text("") self.mtype.set_text("") self.mdesc.set_text("") self.mpath.set_text("") self.mdetails.set_text("") - self.preview.load_imlib(const.empty_image) + self.preview.hide() if current_row < self.media_list.rows: self.media_list.moveto(current_row) diff --git a/gramps/src/const.py b/gramps/src/const.py index ac5609c8e..306453a6f 100644 --- a/gramps/src/const.py +++ b/gramps/src/const.py @@ -518,12 +518,3 @@ familyAttributes = initialize_family_attribute_list() familyRelations = initialize_family_relation_list() places = [] surnames = [] - -xpm_data = [ - '/* XPM */', - 'static char * foo_xpm[] = {', - '"1 1 1 1"', - '" c None"', - '" "};'] - -empty_image = create_image_from_xpm(xpm_data)