don't put contact's avatar in a button. Fixes #2381
This commit is contained in:
parent
63b3c93a6f
commit
3399924761
|
@ -587,26 +587,19 @@
|
|||
<property name="spacing">0</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkButton" id="set_avatar_button">
|
||||
<property name="can_focus">True</property>
|
||||
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||
<property name="focus_on_click">True</property>
|
||||
<widget class="GtkEventBox" id="PHOTO_eventbox">
|
||||
<property name="visible">True</property>
|
||||
<property name="visible_window">False</property>
|
||||
<property name="above_child">False</property>
|
||||
<signal name="button_press_event" handler="on_PHOTO_eventbox_button_press_event" last_modification_time="Fri, 08 Sep 2006 21:34:18 GMT"/>
|
||||
|
||||
<child>
|
||||
<widget class="GtkEventBox" id="PHOTO_eventbox3">
|
||||
<widget class="GtkImage" id="PHOTO_image">
|
||||
<property name="visible">True</property>
|
||||
<property name="visible_window">False</property>
|
||||
<property name="above_child">False</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkImage" id="PHOTO_image">
|
||||
<property name="visible">True</property>
|
||||
<property name="xalign">0.5</property>
|
||||
<property name="yalign">0</property>
|
||||
<property name="xpad">0</property>
|
||||
<property name="ypad">0</property>
|
||||
</widget>
|
||||
</child>
|
||||
<property name="xalign">0.5</property>
|
||||
<property name="yalign">0</property>
|
||||
<property name="xpad">0</property>
|
||||
<property name="ypad">0</property>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
|
|
13
src/vcard.py
13
src/vcard.py
|
@ -68,16 +68,9 @@ class VcardWindow:
|
|||
|
||||
self.avatar_mime_type = None
|
||||
self.avatar_encoded = None
|
||||
self.avatar_save_as_id = None
|
||||
|
||||
self.fill_jabber_page()
|
||||
|
||||
button = self.xml.get_widget('set_avatar_button')
|
||||
button.set_no_show_all(True)
|
||||
button.connect('clicked',
|
||||
gtkgui_helpers.on_avatar_save_as_menuitem_activate,
|
||||
self.contact.jid, self.account, self.contact.name + '.jpeg')
|
||||
|
||||
self.xml.signal_autoconnect(self)
|
||||
self.window.show_all()
|
||||
|
||||
|
@ -104,7 +97,7 @@ class VcardWindow:
|
|||
gajim.config.set_per('accounts', self.account, 'no_log_for',
|
||||
' '.join(no_log_for))
|
||||
|
||||
def on_PHOTO_button_press_event(self, widget, event):
|
||||
def on_PHOTO_eventbox_button_press_event(self, widget, event):
|
||||
'''If right-clicked, show popup'''
|
||||
if event.button == 3: # right click
|
||||
menu = gtk.Menu()
|
||||
|
@ -136,10 +129,6 @@ class VcardWindow:
|
|||
continue
|
||||
pixbuf = gtkgui_helpers.get_scaled_pixbuf(pixbuf, 'vcard')
|
||||
image.set_from_pixbuf(pixbuf)
|
||||
button = self.xml.get_widget('set_avatar_button')
|
||||
self.avatar_save_as_id = button.connect('button-press-event',
|
||||
self.on_PHOTO_button_press_event)
|
||||
button.show()
|
||||
continue
|
||||
if i == 'ADR' or i == 'TEL' or i == 'EMAIL':
|
||||
for entry in vcard[i]:
|
||||
|
|
Loading…
Reference in New Issue