Do not mess up vcard window when there is no user avatar or when it is resized. Fixes #3674

This commit is contained in:
Stephan Erb 2008-01-11 17:23:26 +00:00
parent ce3fe8da97
commit 40af7bfc1c
2 changed files with 9 additions and 30 deletions

View File

@ -54,6 +54,7 @@
<property name="xpad">5</property> <property name="xpad">5</property>
<property name="ypad">5</property> <property name="ypad">5</property>
<property name="selectable">True</property> <property name="selectable">True</property>
<property name="ellipsize">PANGO_ELLIPSIZE_END</property>
</widget> </widget>
</child> </child>
</widget> </widget>
@ -218,8 +219,8 @@
<property name="visible">True</property> <property name="visible">True</property>
<property name="spacing">6</property> <property name="spacing">6</property>
<child> <child>
<widget class="GtkLabel" id="label59"> <widget class="GtkLabel" id="user_avatar_label">
<property name="visible">True</property> <property name="no_show_all">True</property>
<property name="label" translatable="yes">User avatar:</property> <property name="label" translatable="yes">User avatar:</property>
</widget> </widget>
<packing> <packing>
@ -227,17 +228,6 @@
<property name="fill">False</property> <property name="fill">False</property>
</packing> </packing>
</child> </child>
<child>
<widget class="GtkLabel" id="no_user_avatar_label">
<property name="no_show_all">True</property>
<property name="label" translatable="yes">None</property>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
<child> <child>
<widget class="GtkEventBox" id="PHOTO_eventbox"> <widget class="GtkEventBox" id="PHOTO_eventbox">
<property name="visible">True</property> <property name="visible">True</property>
@ -254,7 +244,7 @@
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
<property name="fill">False</property> <property name="fill">False</property>
<property name="position">2</property> <property name="position">1</property>
</packing> </packing>
</child> </child>
<child> <child>
@ -265,7 +255,7 @@
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
<property name="fill">False</property> <property name="fill">False</property>
<property name="position">3</property> <property name="position">2</property>
</packing> </packing>
</child> </child>
<child> <child>
@ -277,11 +267,12 @@
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
<property name="fill">False</property> <property name="fill">False</property>
<property name="position">4</property> <property name="position">3</property>
</packing> </packing>
</child> </child>
</widget> </widget>
<packing> <packing>
<property name="expand">False</property>
<property name="position">1</property> <property name="position">1</property>
</packing> </packing>
</child> </child>
@ -384,9 +375,6 @@
</packing> </packing>
</child> </child>
</widget> </widget>
<packing>
<property name="tab_expand">False</property>
</packing>
</child> </child>
<child> <child>
<widget class="GtkLabel" id="label3"> <widget class="GtkLabel" id="label3">
@ -397,7 +385,6 @@
</widget> </widget>
<packing> <packing>
<property name="type">tab</property> <property name="type">tab</property>
<property name="tab_expand">False</property>
<property name="tab_fill">False</property> <property name="tab_fill">False</property>
</packing> </packing>
</child> </child>
@ -1014,7 +1001,6 @@
</widget> </widget>
<packing> <packing>
<property name="position">1</property> <property name="position">1</property>
<property name="tab_expand">False</property>
</packing> </packing>
</child> </child>
<child> <child>
@ -1027,7 +1013,6 @@
<packing> <packing>
<property name="type">tab</property> <property name="type">tab</property>
<property name="position">1</property> <property name="position">1</property>
<property name="tab_expand">False</property>
<property name="tab_fill">False</property> <property name="tab_fill">False</property>
</packing> </packing>
</child> </child>
@ -1459,7 +1444,6 @@
</widget> </widget>
<packing> <packing>
<property name="position">2</property> <property name="position">2</property>
<property name="tab_expand">False</property>
</packing> </packing>
</child> </child>
<child> <child>
@ -1472,7 +1456,6 @@
<packing> <packing>
<property name="type">tab</property> <property name="type">tab</property>
<property name="position">2</property> <property name="position">2</property>
<property name="tab_expand">False</property>
<property name="tab_fill">False</property> <property name="tab_fill">False</property>
</packing> </packing>
</child> </child>
@ -1497,7 +1480,6 @@
</widget> </widget>
<packing> <packing>
<property name="position">3</property> <property name="position">3</property>
<property name="tab_expand">False</property>
</packing> </packing>
</child> </child>
<child> <child>
@ -1510,7 +1492,6 @@
<packing> <packing>
<property name="type">tab</property> <property name="type">tab</property>
<property name="position">3</property> <property name="position">3</property>
<property name="tab_expand">False</property>
<property name="tab_fill">False</property> <property name="tab_fill">False</property>
</packing> </packing>
</child> </child>
@ -1533,7 +1514,6 @@
</widget> </widget>
<packing> <packing>
<property name="position">4</property> <property name="position">4</property>
<property name="tab_expand">False</property>
</packing> </packing>
</child> </child>
<child> <child>
@ -1544,7 +1524,6 @@
<packing> <packing>
<property name="type">tab</property> <property name="type">tab</property>
<property name="position">4</property> <property name="position">4</property>
<property name="tab_expand">False</property>
<property name="tab_fill">False</property> <property name="tab_fill">False</property>
</packing> </packing>
</child> </child>
@ -1588,6 +1567,7 @@
</child> </child>
</widget> </widget>
<packing> <packing>
<property name="expand">False</property>
<property name="position">2</property> <property name="position">2</property>
</packing> </packing>
</child> </child>

View File

@ -178,8 +178,6 @@ class VcardWindow:
pass pass
def set_values(self, vcard): def set_values(self, vcard):
if not 'PHOTO' in vcard:
self.xml.get_widget('no_user_avatar_label').show()
for i in vcard.keys(): for i in vcard.keys():
if i == 'PHOTO' and self.xml.get_widget('information_notebook').\ if i == 'PHOTO' and self.xml.get_widget('information_notebook').\
get_n_pages() > 4: get_n_pages() > 4:
@ -187,6 +185,7 @@ class VcardWindow:
get_avatar_pixbuf_encoded_mime(vcard[i]) get_avatar_pixbuf_encoded_mime(vcard[i])
image = self.xml.get_widget('PHOTO_image') image = self.xml.get_widget('PHOTO_image')
image.show() image.show()
self.xml.get_widget('user_avatar_label').show()
if not pixbuf: if not pixbuf:
image.set_from_icon_name('stock_person', image.set_from_icon_name('stock_person',
gtk.ICON_SIZE_DIALOG) gtk.ICON_SIZE_DIALOG)