Never load avatars for roster and gc-roster if we don't want them.
See #3718. See also [9287].
This commit is contained in:
parent
dea4d9f745
commit
4d675c42b1
|
@ -943,15 +943,12 @@ class GroupchatControl(ChatControlBase):
|
|||
iter = self.get_contact_iter(nick)
|
||||
if not iter:
|
||||
return
|
||||
if gajim.config.get('show_avatars_in_roster'):
|
||||
pixbuf = gtkgui_helpers.get_avatar_pixbuf_from_cache(self.room_jid + \
|
||||
'/' + nick, True)
|
||||
if pixbuf in ('ask', None):
|
||||
scaled_pixbuf = None
|
||||
else:
|
||||
scaled_pixbuf = gtkgui_helpers.get_scaled_pixbuf(pixbuf, 'roster')
|
||||
else:
|
||||
scaled_pixbuf = None
|
||||
model[iter][C_AVATAR] = scaled_pixbuf
|
||||
|
||||
def chg_contact_status(self, nick, show, status, role, affiliation, jid,
|
||||
|
@ -1198,6 +1195,7 @@ class GroupchatControl(ChatControlBase):
|
|||
affiliation = affiliation, jid = j, resource = resource)
|
||||
gajim.contacts.add_gc_contact(self.account, gc_contact)
|
||||
self.draw_contact(nick)
|
||||
if gajim.config.get('show_avatars_in_roster'):
|
||||
self.draw_avatar(nick)
|
||||
# Do not ask avatar to irc rooms as irc transports reply with messages
|
||||
server = gajim.get_server_from_jid(self.room_jid)
|
||||
|
|
|
@ -482,6 +482,7 @@ class RosterWindow:
|
|||
jid = gajim.get_jid_from_account(account)
|
||||
if self.get_self_contact_iter(account):
|
||||
self.draw_contact(jid, account)
|
||||
if gajim.config.get('show_avatars_in_roster'):
|
||||
self.draw_avatar(jid, account)
|
||||
return
|
||||
|
||||
|
@ -498,6 +499,7 @@ class RosterWindow:
|
|||
model.append(iterAcct, (None, gajim.nicks[account], 'self_contact', jid,
|
||||
account, None, None))
|
||||
self.draw_contact(jid, account)
|
||||
if gajim.config.get('show_avatars_in_roster'):
|
||||
self.draw_avatar(jid, account)
|
||||
|
||||
def add_transport_to_roster(self, account, transport):
|
||||
|
@ -1932,6 +1934,7 @@ class RosterWindow:
|
|||
|
||||
def update_avatar_in_gui(self, jid, account):
|
||||
# Update roster
|
||||
if gajim.config.get('show_avatars_in_roster'):
|
||||
self.draw_avatar(jid, account)
|
||||
# Update chat window
|
||||
if gajim.interface.msg_win_mgr.has_window(jid, account):
|
||||
|
|
Loading…
Reference in New Issue