Commit c51e8498 authored by Philipp Hörist's avatar Philipp Hörist

PrivateChatControl: Display show value with avatar

parent d15ec5e7
...@@ -233,22 +233,11 @@ def show_avatar(self): ...@@ -233,22 +233,11 @@ def show_avatar(self):
return return
scale = self.parent_win.window.get_scale_factor() scale = self.parent_win.window.get_scale_factor()
surface = app.interface.get_avatar( surface = self.gc_contact.get_avatar(AvatarSize.CHAT,
self.gc_contact, AvatarSize.CHAT, scale) scale,
image = self.xml.get_object('avatar_image')
if surface is None:
image.set_from_icon_name('avatar-default', Gtk.IconSize.DIALOG)
def _update_banner_state_image(self): self.xml.avatar_image.set_from_surface(surface)
# Set banner image
if self.gc_contact.presence.is_unavailable:
icon = get_icon_name('offline')
icon = get_icon_name(
banner_status_img = self.xml.get_object('banner_status_image')
banner_status_img.set_from_icon_name(icon, Gtk.IconSize.DND)
def get_tab_image(self, count_unread=True): def get_tab_image(self, count_unread=True):
jid = self.gc_contact.get_full_jid() jid = self.gc_contact.get_full_jid()
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment