ClientsIconsPlugin. Fix icon if contact in several groups
This commit is contained in:
@@ -371,12 +371,13 @@ class ClientsIconsPlugin(GajimPlugin):
|
|||||||
roster.model)
|
roster.model)
|
||||||
if not child_iters:
|
if not child_iters:
|
||||||
return
|
return
|
||||||
if roster.model[child_iters[0]][self.renderer_num] is None:
|
for iter_ in child_iters:
|
||||||
caps = contact.client_caps._node
|
if roster.model[iter_][self.renderer_num] is None:
|
||||||
if not caps:
|
caps = contact.client_caps._node
|
||||||
caps = self.check_jid(jid)
|
if not caps:
|
||||||
self.set_icon(roster.model, child_iters[0], self.renderer_num,
|
caps = self.check_jid(jid)
|
||||||
caps)
|
self.set_icon(roster.model, iter_, self.renderer_num,
|
||||||
|
caps)
|
||||||
|
|
||||||
@log_calls('ClientsIconsPlugin')
|
@log_calls('ClientsIconsPlugin')
|
||||||
def connect_with_groupchat_control(self, chat_control):
|
def connect_with_groupchat_control(self, chat_control):
|
||||||
@@ -510,8 +511,9 @@ class ClientsIconsPlugin(GajimPlugin):
|
|||||||
# zeroconf
|
# zeroconf
|
||||||
return
|
return
|
||||||
|
|
||||||
iter_ = roster._get_contact_iter(iq_obj.jid, iq_obj.conn.name, contact,
|
iters = roster._get_contact_iter(iq_obj.jid, iq_obj.conn.name, contact,
|
||||||
roster.model)[0]
|
roster.model)
|
||||||
|
iter_ = iters[0]
|
||||||
|
|
||||||
if contact.show == 'error':
|
if contact.show == 'error':
|
||||||
self.set_icon(roster.model, iter_, self.renderer_num, None)
|
self.set_icon(roster.model, iter_, self.renderer_num, None)
|
||||||
@@ -539,7 +541,8 @@ class ClientsIconsPlugin(GajimPlugin):
|
|||||||
if caps_from_jid:
|
if caps_from_jid:
|
||||||
caps = caps_from_jid
|
caps = caps_from_jid
|
||||||
|
|
||||||
self.set_icon(roster.model, iter_, self.renderer_num, caps)
|
for iter_ in iters:
|
||||||
|
self.set_icon(roster.model, iter_, self.renderer_num, caps)
|
||||||
|
|
||||||
def gc_presence_received(self, iq_obj):
|
def gc_presence_received(self, iq_obj):
|
||||||
if not self.config['show_in_groupchats']:
|
if not self.config['show_in_groupchats']:
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
[info]
|
[info]
|
||||||
name: Clients icons
|
name: Clients icons
|
||||||
short_name: clients_icons
|
short_name: clients_icons
|
||||||
version: 4.1
|
version: 4.2
|
||||||
description: Shows the client icons in the roster
|
description: Shows the client icons in the roster
|
||||||
and in groupchats.
|
and in groupchats.
|
||||||
For icons in tooltip support, you need to install Gajim r14117 or above.
|
For icons in tooltip support, you need to install Gajim r14117 or above.
|
||||||
|
|||||||
Reference in New Issue
Block a user