From 40af7bfc1ced89114a52d14aa0dca0b39cd509de Mon Sep 17 00:00:00 2001 From: Stephan Erb Date: Fri, 11 Jan 2008 17:23:26 +0000 Subject: [PATCH] Do not mess up vcard window when there is no user avatar or when it is resized. Fixes #3674 --- data/glade/vcard_information_window.glade | 36 +++++------------------ src/vcard.py | 3 +- 2 files changed, 9 insertions(+), 30 deletions(-) diff --git a/data/glade/vcard_information_window.glade b/data/glade/vcard_information_window.glade index 17685e322..dc4d1bacc 100644 --- a/data/glade/vcard_information_window.glade +++ b/data/glade/vcard_information_window.glade @@ -54,6 +54,7 @@ 5 5 True + PANGO_ELLIPSIZE_END @@ -218,8 +219,8 @@ True 6 - - True + + True User avatar: @@ -227,17 +228,6 @@ False - - - True - None - - - False - False - 1 - - True @@ -254,7 +244,7 @@ False False - 2 + 1 @@ -265,7 +255,7 @@ False False - 3 + 2 @@ -277,11 +267,12 @@ False False - 4 + 3 + False 1 @@ -384,9 +375,6 @@ - - False - @@ -397,7 +385,6 @@ tab - False False @@ -1014,7 +1001,6 @@ 1 - False @@ -1027,7 +1013,6 @@ tab 1 - False False @@ -1459,7 +1444,6 @@ 2 - False @@ -1472,7 +1456,6 @@ tab 2 - False False @@ -1497,7 +1480,6 @@ 3 - False @@ -1510,7 +1492,6 @@ tab 3 - False False @@ -1533,7 +1514,6 @@ 4 - False @@ -1544,7 +1524,6 @@ tab 4 - False False @@ -1588,6 +1567,7 @@ + False 2 diff --git a/src/vcard.py b/src/vcard.py index 4784d9f0d..b6fcc3695 100644 --- a/src/vcard.py +++ b/src/vcard.py @@ -178,8 +178,6 @@ class VcardWindow: pass def set_values(self, vcard): - if not 'PHOTO' in vcard: - self.xml.get_widget('no_user_avatar_label').show() for i in vcard.keys(): if i == 'PHOTO' and self.xml.get_widget('information_notebook').\ get_n_pages() > 4: @@ -187,6 +185,7 @@ class VcardWindow: get_avatar_pixbuf_encoded_mime(vcard[i]) image = self.xml.get_widget('PHOTO_image') image.show() + self.xml.get_widget('user_avatar_label').show() if not pixbuf: image.set_from_icon_name('stock_person', gtk.ICON_SIZE_DIALOG)