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
2 changed files with 13 additions and 12 deletions
|
@ -943,15 +943,12 @@ class GroupchatControl(ChatControlBase):
|
||||||
iter = self.get_contact_iter(nick)
|
iter = self.get_contact_iter(nick)
|
||||||
if not iter:
|
if not iter:
|
||||||
return
|
return
|
||||||
if gajim.config.get('show_avatars_in_roster'):
|
|
||||||
pixbuf = gtkgui_helpers.get_avatar_pixbuf_from_cache(self.room_jid + \
|
pixbuf = gtkgui_helpers.get_avatar_pixbuf_from_cache(self.room_jid + \
|
||||||
'/' + nick, True)
|
'/' + nick, True)
|
||||||
if pixbuf in ('ask', None):
|
if pixbuf in ('ask', None):
|
||||||
scaled_pixbuf = None
|
scaled_pixbuf = None
|
||||||
else:
|
else:
|
||||||
scaled_pixbuf = gtkgui_helpers.get_scaled_pixbuf(pixbuf, 'roster')
|
scaled_pixbuf = gtkgui_helpers.get_scaled_pixbuf(pixbuf, 'roster')
|
||||||
else:
|
|
||||||
scaled_pixbuf = None
|
|
||||||
model[iter][C_AVATAR] = scaled_pixbuf
|
model[iter][C_AVATAR] = scaled_pixbuf
|
||||||
|
|
||||||
def chg_contact_status(self, nick, show, status, role, affiliation, jid,
|
def chg_contact_status(self, nick, show, status, role, affiliation, jid,
|
||||||
|
@ -1198,6 +1195,7 @@ class GroupchatControl(ChatControlBase):
|
||||||
affiliation = affiliation, jid = j, resource = resource)
|
affiliation = affiliation, jid = j, resource = resource)
|
||||||
gajim.contacts.add_gc_contact(self.account, gc_contact)
|
gajim.contacts.add_gc_contact(self.account, gc_contact)
|
||||||
self.draw_contact(nick)
|
self.draw_contact(nick)
|
||||||
|
if gajim.config.get('show_avatars_in_roster'):
|
||||||
self.draw_avatar(nick)
|
self.draw_avatar(nick)
|
||||||
# Do not ask avatar to irc rooms as irc transports reply with messages
|
# Do not ask avatar to irc rooms as irc transports reply with messages
|
||||||
server = gajim.get_server_from_jid(self.room_jid)
|
server = gajim.get_server_from_jid(self.room_jid)
|
||||||
|
|
|
@ -482,6 +482,7 @@ class RosterWindow:
|
||||||
jid = gajim.get_jid_from_account(account)
|
jid = gajim.get_jid_from_account(account)
|
||||||
if self.get_self_contact_iter(account):
|
if self.get_self_contact_iter(account):
|
||||||
self.draw_contact(jid, account)
|
self.draw_contact(jid, account)
|
||||||
|
if gajim.config.get('show_avatars_in_roster'):
|
||||||
self.draw_avatar(jid, account)
|
self.draw_avatar(jid, account)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
@ -498,6 +499,7 @@ class RosterWindow:
|
||||||
model.append(iterAcct, (None, gajim.nicks[account], 'self_contact', jid,
|
model.append(iterAcct, (None, gajim.nicks[account], 'self_contact', jid,
|
||||||
account, None, None))
|
account, None, None))
|
||||||
self.draw_contact(jid, account)
|
self.draw_contact(jid, account)
|
||||||
|
if gajim.config.get('show_avatars_in_roster'):
|
||||||
self.draw_avatar(jid, account)
|
self.draw_avatar(jid, account)
|
||||||
|
|
||||||
def add_transport_to_roster(self, account, transport):
|
def add_transport_to_roster(self, account, transport):
|
||||||
|
@ -1932,6 +1934,7 @@ class RosterWindow:
|
||||||
|
|
||||||
def update_avatar_in_gui(self, jid, account):
|
def update_avatar_in_gui(self, jid, account):
|
||||||
# Update roster
|
# Update roster
|
||||||
|
if gajim.config.get('show_avatars_in_roster'):
|
||||||
self.draw_avatar(jid, account)
|
self.draw_avatar(jid, account)
|
||||||
# Update chat window
|
# Update chat window
|
||||||
if gajim.interface.msg_win_mgr.has_window(jid, account):
|
if gajim.interface.msg_win_mgr.has_window(jid, account):
|
||||||
|
|
Loading…
Add table
Reference in a new issue