Dont get own avatar_sha from contacts
This commit is contained in:
parent
cf580c62de
commit
313b913ae4
1 changed files with 3 additions and 2 deletions
|
@ -156,12 +156,13 @@ class ProfileWindow(Gtk.ApplicationWindow):
|
||||||
menu = Gtk.Menu()
|
menu = Gtk.Menu()
|
||||||
|
|
||||||
nick = app.config.get_per('accounts', self.account, 'name')
|
nick = app.config.get_per('accounts', self.account, 'name')
|
||||||
sha = app.contacts.get_avatar_sha(self.account, self.jid)
|
if self.avatar_sha is None:
|
||||||
|
return
|
||||||
menuitem = Gtk.MenuItem.new_with_mnemonic(_('Save _As'))
|
menuitem = Gtk.MenuItem.new_with_mnemonic(_('Save _As'))
|
||||||
menuitem.connect(
|
menuitem.connect(
|
||||||
'activate',
|
'activate',
|
||||||
gtkgui_helpers.on_avatar_save_as_menuitem_activate,
|
gtkgui_helpers.on_avatar_save_as_menuitem_activate,
|
||||||
sha, nick)
|
self.avatar_sha, nick)
|
||||||
menu.append(menuitem)
|
menu.append(menuitem)
|
||||||
menu.connect('selection-done', lambda w: w.destroy())
|
menu.connect('selection-done', lambda w: w.destroy())
|
||||||
# show the menu
|
# show the menu
|
||||||
|
|
Loading…
Add table
Reference in a new issue