Show
Ignore:
Timestamp:
01/23/07 21:32:43 (22 months ago)
Author:
asterix
Message:

merge fixes from trunk

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/gajim_0.11/src/profile_window.py

    r7829 r7888  
    7878                image = gtk.Image() 
    7979                self.xml.get_widget('PHOTO_button').set_image(image) 
     80                text_button = self.xml.get_widget('NOPHOTO_button') 
     81                # We use 2 buttons because some GTK theme don't show images in buttons 
     82                text_button.set_no_show_all(True) 
     83                text_button.hide() 
    8084                self.xml.signal_autoconnect(self) 
    8185                self.window.show_all() 
     
    105109                image = button.get_image() 
    106110                image.set_from_pixbuf(None) 
    107                 button.set_label(_('Click to set your avatar')) 
     111                button.hide() 
     112                text_button = self.xml.get_widget('NOPHOTO_button') 
     113                text_button.show() 
    108114                self.avatar_encoded = None 
    109115                self.avatar_mime_type = None 
     
    153159                        image = button.get_image() 
    154160                        image.set_from_pixbuf(pixbuf) 
    155                         button.set_label('') 
     161                        button.show() 
     162                        text_button = self.xml.get_widget('NOPHOTO_button') 
     163                        text_button.hide() 
    156164                        self.avatar_encoded = base64.encodestring(data) 
    157165                        # returns None if unknown type 
     
    203211 
    204212        def set_values(self, vcard): 
     213                button = self.xml.get_widget('PHOTO_button') 
     214                image = button.get_image() 
     215                text_button = self.xml.get_widget('NOPHOTO_button') 
    205216                if not 'PHOTO' in vcard: 
    206217                        # set default image 
    207                         button = self.xml.get_widget('PHOTO_button') 
    208                         image = button.get_image() 
    209218                        image.set_from_pixbuf(None) 
    210                         button.set_label(_('Click to set your avatar')) 
     219                        button.hide() 
     220                        text_button.show() 
    211221                for i in vcard.keys(): 
    212222                        if i == 'PHOTO': 
    213223                                pixbuf, self.avatar_encoded, self.avatar_mime_type = \ 
    214224                                        get_avatar_pixbuf_encoded_mime(vcard[i]) 
    215                                 button = self.xml.get_widget('PHOTO_button') 
    216                                 image = button.get_image() 
    217225                                if not pixbuf: 
    218226                                        image.set_from_pixbuf(None) 
    219                                         button.set_label(_('Click to set your avatar')) 
     227                                        button.hide() 
     228                                        text_button.show() 
    220229                                        continue 
    221230                                pixbuf = gtkgui_helpers.get_scaled_pixbuf(pixbuf, 'vcard') 
    222231                                image.set_from_pixbuf(pixbuf) 
    223                                 button.set_label('') 
     232                                button.show() 
     233                                text_button.hide() 
    224234                                continue 
    225235                        if i == 'ADR' or i == 'TEL' or i == 'EMAIL':