clients_icons. fix metacontact. Changing the settings take effect without reconnect(roster icons.not in MUC)
This commit is contained in:
@@ -91,7 +91,10 @@ class ClientsIconsPlugin(GajimPlugin):
|
|||||||
(ged.POSTGUI, self.gc_presence_received),}
|
(ged.POSTGUI, self.gc_presence_received),}
|
||||||
self.gui_extension_points = {
|
self.gui_extension_points = {
|
||||||
'groupchat_control' : (self.connect_with_groupchat_control,
|
'groupchat_control' : (self.connect_with_groupchat_control,
|
||||||
self.disconnect_from_groupchat_control)}
|
self.disconnect_from_groupchat_control),
|
||||||
|
'roster_draw_contact' : (self.connect_with_roster_draw_contact,
|
||||||
|
self.disconnect_from_roster_draw_contact)
|
||||||
|
}
|
||||||
self.config_default_values = {
|
self.config_default_values = {
|
||||||
'show_in_roster': (True,''),
|
'show_in_roster': (True,''),
|
||||||
'show_in_groupchats': (True,''),
|
'show_in_groupchats': (True,''),
|
||||||
@@ -103,6 +106,22 @@ class ClientsIconsPlugin(GajimPlugin):
|
|||||||
self.default_pixbuf = gtk.gdk.pixbuf_new_from_file_at_size( icon_path,
|
self.default_pixbuf = gtk.gdk.pixbuf_new_from_file_at_size( icon_path,
|
||||||
16, 16)
|
16, 16)
|
||||||
|
|
||||||
|
@log_calls('ClientsIconsPlugin')
|
||||||
|
def connect_with_roster_draw_contact(self, roster, jid, account, contact):
|
||||||
|
if not self.active:
|
||||||
|
return
|
||||||
|
if not self.config['show_in_roster']:
|
||||||
|
return
|
||||||
|
child_iters = roster._get_contact_iter(jid, account, contact,
|
||||||
|
roster.model)
|
||||||
|
if not child_iters:
|
||||||
|
return
|
||||||
|
if roster.model[child_iters[0]][self.renderer_num] is None:
|
||||||
|
caps = contact.client_caps._node
|
||||||
|
if not caps and jid == 'juick@juick.com':
|
||||||
|
caps = 'http://juick.com/caps'
|
||||||
|
self.set_icon(roster.model, child_iters[0], 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):
|
||||||
chat_control.nb_ext_renderers += 1
|
chat_control.nb_ext_renderers += 1
|
||||||
@@ -138,6 +157,11 @@ class ClientsIconsPlugin(GajimPlugin):
|
|||||||
def disconnect_from_groupchat_control(self, chat_control):
|
def disconnect_from_groupchat_control(self, chat_control):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
@log_calls('ClientsIconsPlugin')
|
||||||
|
def disconnect_from_roster_draw_contact(self, roster, jid, account,
|
||||||
|
contact):
|
||||||
|
pass
|
||||||
|
|
||||||
@log_calls('ClientsIconsPlugin')
|
@log_calls('ClientsIconsPlugin')
|
||||||
def activate(self):
|
def activate(self):
|
||||||
roster = gajim.interface.roster
|
roster = gajim.interface.roster
|
||||||
@@ -280,7 +304,8 @@ class ClientsIconsPluginConfigDialog(GajimPluginConfigDialog):
|
|||||||
self.combo.set_active(self.plugin.config['pos_in_list'])
|
self.combo.set_active(self.plugin.config['pos_in_list'])
|
||||||
|
|
||||||
def on_hide(self, widget):
|
def on_hide(self, widget):
|
||||||
pass
|
self.plugin.deactivate()
|
||||||
|
self.plugin.activate()
|
||||||
|
|
||||||
def on_run(self):
|
def on_run(self):
|
||||||
self.xml.get_object('show_in_roster').set_active(
|
self.xml.get_object('show_in_roster').set_active(
|
||||||
|
|||||||
0
clients_icons/icons/coccinella.png
Executable file → Normal file
0
clients_icons/icons/coccinella.png
Executable file → Normal file
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
0
clients_icons/icons/juick.png
Executable file → Normal file
0
clients_icons/icons/juick.png
Executable file → Normal file
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
0
clients_icons/icons/pyicq-t.png
Executable file → Normal file
0
clients_icons/icons/pyicq-t.png
Executable file → Normal file
|
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.2 KiB |
@@ -1,8 +1,9 @@
|
|||||||
[info]
|
[info]
|
||||||
name: Clients icons
|
name: Clients icons
|
||||||
short_name: clients_icons
|
short_name: clients_icons
|
||||||
version: 0.3
|
version: 0.4
|
||||||
description: Shows the client icons in the roster
|
description: Shows the client icons in the roster
|
||||||
and in groupchats.
|
and in groupchats.
|
||||||
|
Depends: Gajim > r12506
|
||||||
authors = Denis Fomin <fominde@gmail.com>
|
authors = Denis Fomin <fominde@gmail.com>
|
||||||
homepage = http://trac-plugins.gajim.org/wiki/ClientsIcons
|
homepage = http://trac-plugins.gajim.org/wiki/ClientsIcons
|
||||||
|
|||||||
Reference in New Issue
Block a user