[server_status_icons] Remove plugin
@@ -1 +0,0 @@
|
|||||||
from .server_status_icons import ServerStatusIconsPlugin
|
|
||||||
|
Before Width: | Height: | Size: 721 B |
|
Before Width: | Height: | Size: 773 B |
|
Before Width: | Height: | Size: 699 B |
@@ -1,53 +0,0 @@
|
|||||||
<?xml version='1.0' encoding='UTF-8'?>
|
|
||||||
<icondef>
|
|
||||||
<version>1.0</version>
|
|
||||||
<name>Facebook</name>
|
|
||||||
<description>Facebook Iconset for Vacuum-IM</description>
|
|
||||||
<creation>2010-05-24</creation>
|
|
||||||
<author>Artem Rogudeev / [AKI]`Rodent</author>
|
|
||||||
|
|
||||||
<icon>
|
|
||||||
<key>online</key>
|
|
||||||
<object mime='image/png'>online.png</object>
|
|
||||||
</icon>
|
|
||||||
|
|
||||||
<icon>
|
|
||||||
<key>offline</key>
|
|
||||||
<object mime='image/png'>offline.png</object>
|
|
||||||
</icon>
|
|
||||||
|
|
||||||
<icon>
|
|
||||||
<key>away</key>
|
|
||||||
<object mime='image/png'>away.png</object>
|
|
||||||
</icon>
|
|
||||||
|
|
||||||
<icon>
|
|
||||||
<key>xa</key>
|
|
||||||
<object mime='image/png'>xa.png</object>
|
|
||||||
</icon>
|
|
||||||
|
|
||||||
<icon>
|
|
||||||
<key>dnd</key>
|
|
||||||
<object mime='image/png'>dnd.png</object>
|
|
||||||
</icon>
|
|
||||||
|
|
||||||
<icon>
|
|
||||||
<key>invisible</key>
|
|
||||||
<object mime='image/png'>invisible.png</object>
|
|
||||||
</icon>
|
|
||||||
|
|
||||||
<icon>
|
|
||||||
<key>chat</key>
|
|
||||||
<object mime='image/png'>chatty.png</object>
|
|
||||||
</icon>
|
|
||||||
|
|
||||||
<icon>
|
|
||||||
<key>ask</key>
|
|
||||||
<object mime='image/png'>ask.png</object>
|
|
||||||
</icon>
|
|
||||||
|
|
||||||
<icon>
|
|
||||||
<key>noauth</key>
|
|
||||||
<object mime='image/png'>noauth.png</object>
|
|
||||||
</icon>
|
|
||||||
</icondef>
|
|
||||||
|
Before Width: | Height: | Size: 789 B |
|
Before Width: | Height: | Size: 420 B |
|
Before Width: | Height: | Size: 502 B |
|
Before Width: | Height: | Size: 749 B |
|
Before Width: | Height: | Size: 850 B |
|
Before Width: | Height: | Size: 854 B |
|
Before Width: | Height: | Size: 809 B |
@@ -1,53 +0,0 @@
|
|||||||
<?xml version='1.0' encoding='UTF-8'?>
|
|
||||||
<icondef>
|
|
||||||
<version>1.0</version>
|
|
||||||
<name>Google Talk</name>
|
|
||||||
<description>Google Talk Iconset for Vacuum-IM</description>
|
|
||||||
<creation>2010-06-12</creation>
|
|
||||||
<author>Artem Rogudeev / [AKI]`Rodent</author>
|
|
||||||
|
|
||||||
<icon>
|
|
||||||
<key>online</key>
|
|
||||||
<object mime='image/png'>online.png</object>
|
|
||||||
</icon>
|
|
||||||
|
|
||||||
<icon>
|
|
||||||
<key>offline</key>
|
|
||||||
<object mime='image/png'>offline.png</object>
|
|
||||||
</icon>
|
|
||||||
|
|
||||||
<icon>
|
|
||||||
<key>away</key>
|
|
||||||
<object mime='image/png'>away.png</object>
|
|
||||||
</icon>
|
|
||||||
|
|
||||||
<icon>
|
|
||||||
<key>xa</key>
|
|
||||||
<object mime='image/png'>xa.png</object>
|
|
||||||
</icon>
|
|
||||||
|
|
||||||
<icon>
|
|
||||||
<key>dnd</key>
|
|
||||||
<object mime='image/png'>dnd.png</object>
|
|
||||||
</icon>
|
|
||||||
|
|
||||||
<icon>
|
|
||||||
<key>invisible</key>
|
|
||||||
<object mime='image/png'>invisible.png</object>
|
|
||||||
</icon>
|
|
||||||
|
|
||||||
<icon>
|
|
||||||
<key>chat</key>
|
|
||||||
<object mime='image/png'>chatty.png</object>
|
|
||||||
</icon>
|
|
||||||
|
|
||||||
<icon>
|
|
||||||
<key>ask</key>
|
|
||||||
<object mime='image/png'>ask.png</object>
|
|
||||||
</icon>
|
|
||||||
|
|
||||||
<icon>
|
|
||||||
<key>noauth</key>
|
|
||||||
<object mime='image/png'>noauth.png</object>
|
|
||||||
</icon>
|
|
||||||
</icondef>
|
|
||||||
|
Before Width: | Height: | Size: 823 B |
|
Before Width: | Height: | Size: 747 B |
|
Before Width: | Height: | Size: 794 B |
|
Before Width: | Height: | Size: 865 B |
|
Before Width: | Height: | Size: 769 B |
|
Before Width: | Height: | Size: 762 B |
|
Before Width: | Height: | Size: 712 B |
@@ -1,53 +0,0 @@
|
|||||||
<?xml version='1.0' encoding='UTF-8'?>
|
|
||||||
<icondef>
|
|
||||||
<version>1.0</version>
|
|
||||||
<name>LiveJournal</name>
|
|
||||||
<description>LiveJournal Iconset for Vacuum-IM</description>
|
|
||||||
<creation>2010-08-15</creation>
|
|
||||||
<author>Artem Rogudeev / [AKI]`Rodent</author>
|
|
||||||
|
|
||||||
<icon>
|
|
||||||
<key>online</key>
|
|
||||||
<object mime='image/png'>online.png</object>
|
|
||||||
</icon>
|
|
||||||
|
|
||||||
<icon>
|
|
||||||
<key>offline</key>
|
|
||||||
<object mime='image/png'>offline.png</object>
|
|
||||||
</icon>
|
|
||||||
|
|
||||||
<icon>
|
|
||||||
<key>away</key>
|
|
||||||
<object mime='image/png'>away.png</object>
|
|
||||||
</icon>
|
|
||||||
|
|
||||||
<icon>
|
|
||||||
<key>xa</key>
|
|
||||||
<object mime='image/png'>xa.png</object>
|
|
||||||
</icon>
|
|
||||||
|
|
||||||
<icon>
|
|
||||||
<key>dnd</key>
|
|
||||||
<object mime='image/png'>dnd.png</object>
|
|
||||||
</icon>
|
|
||||||
|
|
||||||
<icon>
|
|
||||||
<key>invisible</key>
|
|
||||||
<object mime='image/png'>invisible.png</object>
|
|
||||||
</icon>
|
|
||||||
|
|
||||||
<icon>
|
|
||||||
<key>chat</key>
|
|
||||||
<object mime='image/png'>chatty.png</object>
|
|
||||||
</icon>
|
|
||||||
|
|
||||||
<icon>
|
|
||||||
<key>ask</key>
|
|
||||||
<object mime='image/png'>ask.png</object>
|
|
||||||
</icon>
|
|
||||||
|
|
||||||
<icon>
|
|
||||||
<key>noauth</key>
|
|
||||||
<object mime='image/png'>noauth.png</object>
|
|
||||||
</icon>
|
|
||||||
</icondef>
|
|
||||||
|
Before Width: | Height: | Size: 732 B |
|
Before Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 766 B |
@@ -1,11 +0,0 @@
|
|||||||
[info]
|
|
||||||
name: Server Status Icons
|
|
||||||
short_name: server_status_icons
|
|
||||||
version: 1.3.0
|
|
||||||
description: Replace standard Gajim status icons with server
|
|
||||||
specific for known XMPP server accounts (vk.com, …).
|
|
||||||
authors = Denis Fomin <fominde@gmail.com>
|
|
||||||
Pavel Suslov
|
|
||||||
homepage = https://dev.gajim.org/gajim/gajim-plugins/wikis/ServerStatusIconsPlugin
|
|
||||||
min_gajim_version: 1.2.91
|
|
||||||
max_gajim_version: 1.3.90
|
|
||||||
|
Before Width: | Height: | Size: 830 B |
|
Before Width: | Height: | Size: 843 B |
|
Before Width: | Height: | Size: 832 B |
|
Before Width: | Height: | Size: 728 B |
|
Before Width: | Height: | Size: 730 B |
|
Before Width: | Height: | Size: 696 B |
|
Before Width: | Height: | Size: 870 B |
|
Before Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 762 B |
@@ -1,123 +0,0 @@
|
|||||||
import os
|
|
||||||
|
|
||||||
from gajim.plugins import GajimPlugin
|
|
||||||
from gajim.plugins.helpers import log_calls
|
|
||||||
from gajim import gtkgui_helpers
|
|
||||||
from gajim.common import app
|
|
||||||
from gajim.common import helpers
|
|
||||||
from gajim.common import ged
|
|
||||||
from gajim.plugins.plugins_i18n import _
|
|
||||||
|
|
||||||
class ServerStatusIconsPlugin(GajimPlugin):
|
|
||||||
|
|
||||||
@log_calls('ServerStatusIconsPlugin')
|
|
||||||
def init(self):
|
|
||||||
self.description = _('Replace standard Gajim status icons with server'
|
|
||||||
' specific for known XMPP server accounts (vk.com, ...)')
|
|
||||||
self.pos_list = [_('after statusicon'), _('before avatar')]
|
|
||||||
self.gui_extension_points = {
|
|
||||||
'roster_draw_contact': (self.connect_with_roster_draw_contact,
|
|
||||||
self.disconnect_from_roster_draw_contact)}
|
|
||||||
self.known_servers = {'chat.facebook.com': 'facebook',
|
|
||||||
'gmail.com': 'gtalk',
|
|
||||||
'livejournal.com': 'livejournal',
|
|
||||||
'odnoklassniki.ru': 'odnoklassniki',
|
|
||||||
'vk.com': 'vkontakte',
|
|
||||||
'ya.ru': 'yaonline'}
|
|
||||||
self.config_dialog = None
|
|
||||||
|
|
||||||
@log_calls('ServerStatusIconsPlugin')
|
|
||||||
def connect_with_roster_draw_contact(self, roster, jid, account, contact):
|
|
||||||
if not self.active:
|
|
||||||
return
|
|
||||||
if app.jid_is_transport(jid):
|
|
||||||
return
|
|
||||||
|
|
||||||
child_iters = roster._get_contact_iter(jid, account, contact,
|
|
||||||
roster.model)
|
|
||||||
if not child_iters:
|
|
||||||
return
|
|
||||||
|
|
||||||
icon_name = helpers.get_icon_name_to_show(contact, account)
|
|
||||||
if app.events.get_events(account, jid) or icon_name == 'requested':
|
|
||||||
return
|
|
||||||
|
|
||||||
host = jid.split('@')[1]
|
|
||||||
server = self.known_servers.get(host, False)
|
|
||||||
if not server:
|
|
||||||
return
|
|
||||||
|
|
||||||
if server not in roster.transports_state_images['16']:
|
|
||||||
# we don't have iconset for this transport loaded yet. Let's do it
|
|
||||||
self.make_transport_state_images(roster, server)
|
|
||||||
if server in roster.transports_state_images['16'] and \
|
|
||||||
icon_name in roster.transports_state_images['16'][server]:
|
|
||||||
state_images = roster.transports_state_images['16'][server]
|
|
||||||
img = state_images[icon_name]
|
|
||||||
for child_iter in child_iters:
|
|
||||||
roster.model[child_iter][0] = img
|
|
||||||
|
|
||||||
def make_transport_state_images(self, roster, transport):
|
|
||||||
"""
|
|
||||||
Initialize opened and closed 'transport' iconset dict
|
|
||||||
"""
|
|
||||||
|
|
||||||
folder = os.path.join(self.local_file_path(transport), '16x16')
|
|
||||||
pixo, pixc = gtkgui_helpers.load_icons_meta()
|
|
||||||
roster.transports_state_images['opened'][transport] = \
|
|
||||||
gtkgui_helpers.load_iconset(folder, pixo, transport=True)
|
|
||||||
roster.transports_state_images['closed'][transport] = \
|
|
||||||
gtkgui_helpers.load_iconset(folder, pixc, transport=True)
|
|
||||||
roster.transports_state_images['16'][transport] = \
|
|
||||||
gtkgui_helpers.load_iconset(folder, transport=True)
|
|
||||||
folder = os.path.join(self.local_file_path(transport), '32x32')
|
|
||||||
roster.transports_state_images['32'][transport] = \
|
|
||||||
gtkgui_helpers.load_iconset(folder, transport=True)
|
|
||||||
|
|
||||||
def _nec_our_show(self, obj):
|
|
||||||
account = obj.conn.name
|
|
||||||
roster = app.interface.roster
|
|
||||||
status = app.connections[account].connected
|
|
||||||
|
|
||||||
if account not in app.contacts.get_accounts():
|
|
||||||
return
|
|
||||||
child_iterA = roster._get_account_iter(account, roster.model)
|
|
||||||
if not child_iterA:
|
|
||||||
return
|
|
||||||
|
|
||||||
hostname = app.config.get_per('accounts', account, 'hostname')
|
|
||||||
server = self.known_servers.get(hostname, False)
|
|
||||||
if not server:
|
|
||||||
return
|
|
||||||
|
|
||||||
if not roster.regroup:
|
|
||||||
show = app.SHOW_LIST[status]
|
|
||||||
else: # accounts merged
|
|
||||||
show = helpers.get_global_show()
|
|
||||||
|
|
||||||
if server not in roster.transports_state_images['16']:
|
|
||||||
# we don't have iconset for this transport loaded yet. Let's do it
|
|
||||||
self.make_transport_state_images(roster, server)
|
|
||||||
if server in roster.transports_state_images['16'] and \
|
|
||||||
show in roster.transports_state_images['16'][server]:
|
|
||||||
roster.model[child_iterA][0] = roster.transports_state_images[
|
|
||||||
'16'][server][show]
|
|
||||||
|
|
||||||
@log_calls('ServerStatusIconsPlugin')
|
|
||||||
def disconnect_from_roster_draw_contact(self, roster, jid, account,
|
|
||||||
contact):
|
|
||||||
pass
|
|
||||||
|
|
||||||
@log_calls('ServerStatusIconsPlugin')
|
|
||||||
def activate(self):
|
|
||||||
self.active = True
|
|
||||||
app.interface.roster.setup_and_draw_roster()
|
|
||||||
app.ged.register_event_handler('our-show', ged.GUI2,
|
|
||||||
self._nec_our_show)
|
|
||||||
|
|
||||||
@log_calls('ServerStatusIconsPlugin')
|
|
||||||
def deactivate(self):
|
|
||||||
self.active = None
|
|
||||||
app.ged.remove_event_handler('our-show', ged.GUI2,
|
|
||||||
self._nec_our_show)
|
|
||||||
app.interface.roster.setup_and_draw_roster()
|
|
||||||
|
Before Width: | Height: | Size: 726 B |
|
Before Width: | Height: | Size: 750 B |
|
Before Width: | Height: | Size: 702 B |
@@ -1,53 +0,0 @@
|
|||||||
<?xml version='1.0' encoding='UTF-8'?>
|
|
||||||
<icondef>
|
|
||||||
<version>1.0</version>
|
|
||||||
<name>Vkontakte</name>
|
|
||||||
<description>Vkontakte Iconset for Vacuum-IM</description>
|
|
||||||
<creation>2010-05-24</creation>
|
|
||||||
<author>Artem Rogudeev / [AKI]`Rodent</author>
|
|
||||||
|
|
||||||
<icon>
|
|
||||||
<key>online</key>
|
|
||||||
<object mime='image/png'>online.png</object>
|
|
||||||
</icon>
|
|
||||||
|
|
||||||
<icon>
|
|
||||||
<key>offline</key>
|
|
||||||
<object mime='image/png'>offline.png</object>
|
|
||||||
</icon>
|
|
||||||
|
|
||||||
<icon>
|
|
||||||
<key>away</key>
|
|
||||||
<object mime='image/png'>away.png</object>
|
|
||||||
</icon>
|
|
||||||
|
|
||||||
<icon>
|
|
||||||
<key>xa</key>
|
|
||||||
<object mime='image/png'>xa.png</object>
|
|
||||||
</icon>
|
|
||||||
|
|
||||||
<icon>
|
|
||||||
<key>dnd</key>
|
|
||||||
<object mime='image/png'>dnd.png</object>
|
|
||||||
</icon>
|
|
||||||
|
|
||||||
<icon>
|
|
||||||
<key>invisible</key>
|
|
||||||
<object mime='image/png'>invisible.png</object>
|
|
||||||
</icon>
|
|
||||||
|
|
||||||
<icon>
|
|
||||||
<key>chat</key>
|
|
||||||
<object mime='image/png'>chatty.png</object>
|
|
||||||
</icon>
|
|
||||||
|
|
||||||
<icon>
|
|
||||||
<key>ask</key>
|
|
||||||
<object mime='image/png'>ask.png</object>
|
|
||||||
</icon>
|
|
||||||
|
|
||||||
<icon>
|
|
||||||
<key>noauth</key>
|
|
||||||
<object mime='image/png'>noauth.png</object>
|
|
||||||
</icon>
|
|
||||||
</icondef>
|
|
||||||
|
Before Width: | Height: | Size: 798 B |
|
Before Width: | Height: | Size: 445 B |
|
Before Width: | Height: | Size: 446 B |
|
Before Width: | Height: | Size: 764 B |
|
Before Width: | Height: | Size: 933 B |
|
Before Width: | Height: | Size: 920 B |
|
Before Width: | Height: | Size: 863 B |
@@ -1,53 +0,0 @@
|
|||||||
<?xml version='1.0' encoding='UTF-8'?>
|
|
||||||
<icondef>
|
|
||||||
<version>1.0</version>
|
|
||||||
<name>Ya.Online</name>
|
|
||||||
<description>Ya.Online Iconset for Vacuum-IM</description>
|
|
||||||
<creation>2010-09-04</creation>
|
|
||||||
<author>Artem Rogudeev / [AKI]`Rodent</author>
|
|
||||||
|
|
||||||
<icon>
|
|
||||||
<key>online</key>
|
|
||||||
<object mime='image/png'>online.png</object>
|
|
||||||
</icon>
|
|
||||||
|
|
||||||
<icon>
|
|
||||||
<key>offline</key>
|
|
||||||
<object mime='image/png'>offline.png</object>
|
|
||||||
</icon>
|
|
||||||
|
|
||||||
<icon>
|
|
||||||
<key>away</key>
|
|
||||||
<object mime='image/png'>away.png</object>
|
|
||||||
</icon>
|
|
||||||
|
|
||||||
<icon>
|
|
||||||
<key>xa</key>
|
|
||||||
<object mime='image/png'>xa.png</object>
|
|
||||||
</icon>
|
|
||||||
|
|
||||||
<icon>
|
|
||||||
<key>dnd</key>
|
|
||||||
<object mime='image/png'>dnd.png</object>
|
|
||||||
</icon>
|
|
||||||
|
|
||||||
<icon>
|
|
||||||
<key>invisible</key>
|
|
||||||
<object mime='image/png'>invisible.png</object>
|
|
||||||
</icon>
|
|
||||||
|
|
||||||
<icon>
|
|
||||||
<key>chat</key>
|
|
||||||
<object mime='image/png'>chatty.png</object>
|
|
||||||
</icon>
|
|
||||||
|
|
||||||
<icon>
|
|
||||||
<key>ask</key>
|
|
||||||
<object mime='image/png'>ask.png</object>
|
|
||||||
</icon>
|
|
||||||
|
|
||||||
<icon>
|
|
||||||
<key>noauth</key>
|
|
||||||
<object mime='image/png'>noauth.png</object>
|
|
||||||
</icon>
|
|
||||||
</icondef>
|
|
||||||
|
Before Width: | Height: | Size: 902 B |
|
Before Width: | Height: | Size: 714 B |
|
Before Width: | Height: | Size: 865 B |
|
Before Width: | Height: | Size: 921 B |