Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • gajim/gajim-plugins
  • lovetox/gajim-plugins
  • ag/gajim-plugins
  • FlorianMuenchbach/gajim-plugins
  • rom1dep/gajim-plugins
  • pitchum/gajim-plugins
  • wurstsalat/gajim-plugins
  • Dicson/gajim-plugins
  • andre/gajim-plugins
  • link2xt/gajim-plugins
  • marmistrz/gajim-plugins
  • Jens/gajim-plugins
  • muelli/gajim-plugins
  • asterix/gajim-plugins
  • orhideous/gajim-plugins
  • ngvelprz/gajim-plugins
  • appleorange1/gajim-plugins
  • Martin/gajim-plugins
  • maltel/gajim-plugins
  • Seve/gajim-plugins
  • evert-mouw/gajim-plugins
  • Yuki/gajim-plugins
  • mxre/gajim-plugins
  • ValdikSS/gajim-plugins
  • SaltyBones/gajim-plugins
  • comradekingu/gajim-plugins
  • ritzmann/gajim-plugins
  • genofire/gajim-plugins
  • jjrh/gajim-plugins
  • yarmak/gajim-plugins
  • PapaTutuWawa/gajim-plugins
  • weblate/gajim-plugins
  • XutaxKamay/gajim-plugins
  • nekk/gajim-plugins
  • principis/gajim-plugins
  • cbix/gajim-plugins
  • bodqhrohro/gajim-plugins
  • airtower-luna/gajim-plugins
  • toms/gajim-plugins
  • mesonium/gajim-plugins
  • lissine/gajim-plugins
  • anviar/gajim-plugins
42 results
Show changes
Showing
with 374 additions and 769 deletions
from clients_icons import ClientsIconsPlugin
from .clients_icons import ClientsIconsPlugin # pyright: ignore # noqa: F401
# This file is part of Gajim.
#
# Gajim is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Gajim is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Gajim. If not, see <http://www.gnu.org/licenses/>.
from __future__ import annotations
from typing import Any
from collections import UserDict
from dataclasses import dataclass
from gajim.plugins.plugins_i18n import _
@dataclass
class ClientData:
default: tuple[str, str] | None = None
variations: dict[str, str] | None = None
def get_variations(client_name: str | None) -> list[str]:
# get_variations('Conversation Legacy 1.2.3')
#
# Returns List:
# [Conversation Legacy 1.2.3,
# Conversation Legacy
# Conversation]
if client_name is None:
return []
alts = client_name.split()
alts = [" ".join(alts[: (i + 1)]) for i in range(len(alts))]
alts.reverse()
return alts
class ClientsDict(UserDict[str, ClientData]):
def get_client_data(self, name: str, node: str) -> tuple[str, str]:
client_data = self.get(node)
if client_data is None:
return _("Unknown"), "xmpp-client-unknown"
if client_data.variations is None:
assert client_data.default is not None
client_name, icon_name = client_data.default
return client_name, f"xmpp-client-{icon_name}"
variations = get_variations(name)
for var in variations:
try:
return var, f"xmpp-client-{client_data.variations[var]}"
except KeyError:
pass
assert client_data.default is not None
client_name, icon_name = client_data.default
return client_name, f"xmpp-client-{icon_name}"
# ClientData(
# default=(Shown name, icon name)
# variations={Shown name, icon name}
# )
# pylint: disable=too-many-lines
CLIENTS = ClientsDict(
{
"http://gajim.org": ClientData(("Gajim", "gajim")),
"https://gajim.org": ClientData(("Gajim", "gajim")),
"http://conversations.im": ClientData(
default=("Conversations", "conversations"),
variations={"Conversations Legacy": "conversations-legacy"},
),
"http://jabber.pix-art.de": ClientData(("Pix-Art Messenger", "pixart")),
"http://blabber.im": ClientData(("blabber.im", "blabber")),
"http://monocles.de": ClientData(("monocles chat", "monocles-chat")),
"http://pidgin.im/": ClientData(("Pidgin", "pidgin")),
"https://poez.io": ClientData(("Poezio", "poezio")),
"https://yaxim.org/": ClientData(("yaxim", "yaxim")),
"https://yaxim.org/bruno/": ClientData(("Bruno", "bruno")),
"http://mcabber.com/caps": ClientData(("MCabber", "mcabber")),
"http://psi-plus.com": ClientData(("Psi+", "psiplus")),
"https://psi-plus.com": ClientData(("Psi+", "psiplus")),
"https://dino.im": ClientData(("Dino", "dino")),
"http://monal.im/": ClientData(("Monal", "monal")),
"http://slixmpp.com/ver/1.2.4": ClientData(("Bot", "bot")),
"http://slixmpp.com/ver/1.3.0": ClientData(("Bot", "bot")),
"https://www.xabber.com/": ClientData(("Xabber", "xabber")),
"http://www.profanity.im": ClientData(("Profanity", "profanity")),
"http://swift.im": ClientData(("Swift", "swift")),
"https://salut-a-toi.org": ClientData(("Salut à Toi", "sat")),
"https://conversejs.org": ClientData(("Converse", "conversejs")),
"http://bitlbee.org/xmpp/caps": ClientData(("BitlBee", "bitlbee")),
"http://tkabber.jabber.ru/": ClientData(("Tkabber", "tkabber")),
"http://miranda-ng.org/caps": ClientData(("Miranda NG", "miranda_ng")),
"http://www.adium.im/": ClientData(("Adium", "adium")),
"http://www.adiumx.com/caps": ClientData(("Adium", "adium")),
"http://www.adiumx.com": ClientData(("Adium", "adium")),
"http://aqq.eu/": ClientData(("Aqq", "aqq")),
"http://www.asterisk.org/xmpp/client/caps": ClientData(
("Asterisk", "asterisk")
),
"http://ayttm.souceforge.net/caps": ClientData(("Ayttm", "ayttm")),
"http://www.barobin.com/caps": ClientData(("Bayanicq", "bayanicq")),
"http://simpleapps.ru/caps#blacksmith": ClientData(("Blacksmith", "bot")),
"http://blacksmith-2.googlecode.com/svn/": ClientData(("Blacksmith-2", "bot")),
"http://coccinella.sourceforge.net/protocol/caps": ClientData(
("Coccinella", "coccinella")
),
"http://digsby.com/caps": ClientData(("Digsby", "digsby")),
"http://emacs-jabber.sourceforge.net": ClientData(
("Emacs Jabber Client", "emacs")
),
"http://emess.eqx.su/caps": ClientData(("Emess", "emess")),
"http://live.gnome.org/empathy/caps": ClientData(
("Empathy", "telepathy.freedesktop.org")
),
"http://eqo.com/": ClientData(("Eqo", "libpurple")),
"http://exodus.jabberstudio.org/caps": ClientData(("Exodus", "exodus")),
"http://fatal-bot.spb.ru/caps": ClientData(("Fatal-bot", "bot")),
"http://svn.posix.ru/fatal-bot/trunk": ClientData(("Fatal-bot", "bot")),
"http://isida.googlecode.com": ClientData(("Isida", "isida-bot")),
"http://isida-bot.com": ClientData(("Isida", "isida-bot")),
"http://jabga.ru": ClientData(("Fin jabber", "fin")),
"http://chat.freize.org/caps": ClientData(("Freize", "freize")),
"http://gabber.sourceforge.net": ClientData(("Gabber", "gabber")),
"http://glu.net/": ClientData(("Glu", "glu")),
"http://mail.google.com/xmpp/client/caps": ClientData(("GMail", "google.com")),
"http://www.android.com/gtalk/client/caps": ClientData(
("GTalk", "talk.google.com")
),
"talk.google.com": ClientData(("GTalk", "talk.google.com")),
"http://talkgadget.google.com/client/caps": ClientData(("GTalk", "google")),
"http://talk.google.com/xmpp/bot/caps": ClientData(("GTalk", "google")),
"http://aspro.users.ru/historian-bot/": ClientData(("Historian-bot", "bot")),
"http://www.apple.com/ichat/caps": ClientData(("IChat", "ichat")),
"http://instantbird.com/": ClientData(("Instantbird", "instantbird")),
"http://j-tmb.ru/caps": ClientData(("J-tmb", "bot")),
"http://jabbroid.akuz.de": ClientData(("Jabbroid", "android")),
"http://jabbroid.akuz.de/caps": ClientData(("Jabbroid", "android")),
"http://dev.jabbim.cz/jabbim/caps": ClientData(("Jabbim", "jabbim")),
"http://jabbrik.ru/caps": ClientData(("Jabbrik", "bot")),
"http://jabrvista.net.ru": ClientData(("Jabvista", "bot")),
"http://jajc.jrudevels.org/caps": ClientData(("JAJC", "jajc")),
"http://qabber.ru/jame-bot": ClientData(("Jame-bot", "bot")),
"https://www.jappix.com/": ClientData(("Jappix", "jappix")),
"http://japyt.googlecode.com": ClientData(("Japyt", "japyt")),
"http://jasmineicq.ru/caps": ClientData(("Jasmine", "jasmine")),
"http://jimm.net.ru/caps": ClientData(("Jimm", "jimm-aspro")),
"http://jitsi.org": ClientData(("Jitsi", "jitsi")),
"http://jtalk.ustyugov.net/caps": ClientData(("Jtalk", "jtalk")),
"http://pjc.googlecode.com/caps": ClientData(("Jubo", "jubo")),
"http://juick.com/caps": ClientData(("Juick", "juick")),
"http://kopete.kde.org/jabber/caps": ClientData(("Kopete", "kopete")),
"http://bluendo.com/protocol/caps": ClientData(("Lampiro", "lampiro")),
"http://lytgeygen.ru/caps": ClientData(("Lytgeygen", "bot")),
"http://agent.mail.ru/caps": ClientData(("Mailruagent", "mailruagent")),
"http://agent.mail.ru/": ClientData(("Mailruagent", "mailruagent")),
"http://tomclaw.com/mandarin_im/caps": ClientData(("Mandarin", "mandarin")),
"http://mchat.mgslab.com/": ClientData(("Mchat", "mchat")),
"https://www.meebo.com/": ClientData(("Meebo", "meebo")),
"http://megafonvolga.ru/": ClientData(("Megafon", "megafon")),
"http://miranda-im.org/caps": ClientData(("Miranda", "miranda")),
"https://movim.eu/": ClientData(("Movim", "movim")),
"http://moxl.movim.eu/": ClientData(("Movim", "movim")),
"nimbuzz:caps": ClientData(("Nimbuzz", "nimbuzz")),
"http://nimbuzz.com/caps": ClientData(("Nimbuzz", "nimbuzz")),
"http://home.gna.org/": ClientData(("Omnipresence", "omnipresence")),
"http://oneteam.im/caps": ClientData(("OneTeam", "oneteamiphone")),
"http://www.process-one.net/en/solutions/oneteam_iphone/": ClientData(
("OneTeam-IPhone", "oneteamiphone")
),
"rss@isida-bot.com": ClientData(("Osiris", "osiris")),
"http://chat.ovi.com/caps": ClientData(("Ovi-chat", "ovi-chat")),
"http://opensource.palm.com/packages.html": ClientData(("Palm", "palm")),
"http://palringo.com/caps": ClientData(("Palringo", "palringo")),
"http://pandion.im/": ClientData(("Pandion", "pandion")),
"http://pigeon.vpro.ru/caps": ClientData(("Pigeon", "pigeon")),
"psto@psto.net": ClientData(("Psto", "psto")),
"http://qq-im.com/caps": ClientData(("QQ", "qq")),
"http://qq.com/caps": ClientData(("QQ", "qq")),
"http://2010.qip.ru/caps": ClientData(("Qip", "qip")),
"http://qip.ru/caps": ClientData(("Qip", "qip")),
"http://qip.ru/caps?QIP": ClientData(("Qip", "qip")),
"http://pda.qip.ru/caps": ClientData(("Qip-PDA", "qippda")),
"http://qutim.org": ClientData(("QutIM", "qutim")),
"http://qutim.org/": ClientData(("QutIM", "qutim")),
"http://apps.radio-t.com/caps": ClientData(("Radio-t", "radio-t")),
"http://sim-im.org/caps": ClientData(("Sim", "sim")),
"http://www.lonelycatgames.com/slick/caps": ClientData(("Slick", "slick")),
"http://snapi-bot.googlecode.com/caps": ClientData(("Snapi-bot", "bot")),
"http://www.igniterealtime.org/project/spark/caps": ClientData(
("Spark", "spark")
),
"http://spectrum.im/": ClientData(("Spectrum", "spectrum")),
"http://storm-bot.googlecode.com/svn/trunk": ClientData(("Storm-bot", "bot")),
"http://jabber-net.ru/caps/talisman-bot": ClientData(("Talisman-bot", "bot")),
"http://jabber-net.ru/talisman-bot/caps": ClientData(("Talisman-bot", "bot")),
"http://www.google.com/xmpp/client/caps": ClientData(
("Talkonaut", "talkonaut")
),
"http://telepathy.freedesktop.org/caps": ClientData(
("SlicTelepathyk", "telepathy.freedesktop.org")
),
"http://tigase.org/messenger": ClientData(("Tigase", "tigase")),
"http://trillian.im/caps": ClientData(("Trillian", "trillian")),
"http://vacuum-im.googlecode.com": ClientData(("Vacuum", "vacuum")),
"http://code.google.com/p/vacuum-im/": ClientData(("Vacuum", "vacuum")),
"http://witcher-team.ucoz.ru/": ClientData(("Witcher", "bot")),
"http://online.yandex.ru/caps": ClientData(("Yaonline", "yaonline")),
"http://www.igniterealtime.org/projects/smack/": ClientData(
("Xabber", "xabber")
),
"http://www.xfire.com/": ClientData(("Xfire", "xfire")),
"http://www.xfire.com/caps": ClientData(("Xfire", "xfire")),
"http://xu-6.jabbrik.ru/caps": ClientData(("XU-6", "bot")),
}
)
# pylint: enable=too-many-lines
def get_data(*args: Any) -> tuple[str, str]:
return CLIENTS.get_client_data(*args)
This diff is collapsed.
# This file is part of Gajim.
#
# Gajim is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Gajim is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Gajim. If not, see <http://www.gnu.org/licenses/>.
from __future__ import annotations
from typing import Any
from typing import TYPE_CHECKING
from gi.repository import Gtk
from gajim.gtk.const import Setting
from gajim.gtk.const import SettingKind
from gajim.gtk.const import SettingType
from gajim.gtk.settings import SettingsDialog
from gajim.plugins.plugins_i18n import _
if TYPE_CHECKING:
from .clients_icons import ClientsIconsPlugin
class ClientsIconsConfigDialog(SettingsDialog):
def __init__(self, plugin: ClientsIconsPlugin, parent: Gtk.Window) -> None:
self.plugin = plugin
settings = [
Setting(
SettingKind.SWITCH,
_("Show Icon for Unknown Clients"),
SettingType.VALUE,
self.plugin.config["show_unknown_icon"],
callback=self._on_setting,
data="show_unknown_icon",
),
]
SettingsDialog.__init__(
self,
parent,
_("Clients Icons Configuration"),
Gtk.DialogFlags.MODAL,
settings,
"",
)
def _on_setting(self, value: Any, data: Any) -> None:
self.plugin.config[data] = value
<?xml version="1.0"?>
<interface>
<requires lib="gtk+" version="2.16"/>
<!-- interface-naming-policy toplevel-contextual -->
<object class="GtkWindow" id="window1">
<child>
<object class="GtkVBox" id="vbox1">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkCheckButton" id="show_in_roster">
<property name="label" translatable="yes">Show icons in roster</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="receives_default">False</property>
<property name="draw_indicator">True</property>
<signal name="toggled" handler="on_show_in_roster_toggled"/>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="show_in_groupchats">
<property name="label" translatable="yes">Show icons in groupchats</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="receives_default">False</property>
<property name="draw_indicator">True</property>
<signal name="toggled" handler="on_show_in_groupchats_toggled"/>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="show_in_tooltip">
<property name="label" translatable="yes">Show icons in tooltip</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="receives_default">False</property>
<property name="draw_indicator">True</property>
<signal name="toggled" handler="on_show_in_tooltip_toggled"/>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">2</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="show_unknown_icon">
<property name="label" translatable="yes">Show icon for an unknown client</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="receives_default">False</property>
<property name="draw_indicator">True</property>
<signal name="toggled" handler="on_show_unknown_icon_toggled"/>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">3</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="show_facebook">
<property name="label" translatable="yes">Show icon for facebook.com and vk.com</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="receives_default">False</property>
<property name="draw_indicator">True</property>
<signal name="toggled" handler="on_show_facebook_toggled"/>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">4</property>
</packing>
</child>
<child>
<object class="GtkHBox" id="hbox1">
<property name="visible">True</property>
<child>
<object class="GtkLabel" id="label1">
<property name="visible">True</property>
<property name="xpad">3</property>
<property name="label" translatable="yes">Show icon:</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkComboBox" id="combobox1">
<property name="visible">True</property>
<signal name="changed" handler="on_combobox1_changed"/>
</object>
<packing>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">5</property>
</packing>
</child>
</object>
</child>
</object>
</interface>
clients_icons/hicolor/16x16/apps/xmpp-client-jitsi.png

594 B

clients_icons/hicolor/16x16/apps/xmpp-client-miranda_ng.png

827 B

gotr/gotr.png

3.33 KiB | W: 0px | H: 0px

clients_icons/hicolor/16x16/apps/xmpp-client-poezio.png

3.2 KiB | W: 0px | H: 0px

gotr/gotr.png
clients_icons/hicolor/16x16/apps/xmpp-client-poezio.png
gotr/gotr.png
clients_icons/hicolor/16x16/apps/xmpp-client-poezio.png
  • 2-up
  • Swipe
  • Onion skin