...
 
Commits (447)
Gajim 0.15 (XX XX 2011)
Gajim 0.15.4 (25 May 2013)
* Fix usage of OTR plugin
* Fix connection to non-SSL server
* Fix receiving GPG-encrypted messages while offline.
Gajim 0.15.3 (17 March 2013)
* Better handling of SSL errors
* Better handling of canceling file transfer
* Improve farstream calls
* Minor fixes and improvements
Gajim 0.15.2 (30 October 2012)
* Show punycode encoded urls if they contain non-ascii chars
* Fix crash when pressing Esc in chat window
* Support Network Manager 0.9
* decrypt GPG messages in the correct order
Gajim 0.15.1 (29 August 2012)
* Switch from python-farsight to python-farstream
* improve performances
* Fix roster filter with unicode chars
* Fix connection to msn jabber server
* Fix some GPG issues
* Fix other small issues
Gajim 0.15 (18 March 2012)
* Plugin system
* Whiteboard (via a plugin)
......@@ -7,6 +36,9 @@ Gajim 0.15 (XX XX 2011)
* IBB
* Nested roster group
* Roster filtrering
* UPower support
* GPG support for windows
* Spell checking support for windows
Gajim 0.14.4 (22 July 2011)
......
SUBDIRS = src data plugins po icons
SUBDIRS = src data po icons plugins
ACLOCAL_AMFLAGS = -I m4
......
......@@ -15,12 +15,13 @@
<h2>Runtime Requirements</h2>
<ul>
<li>python2.5 or higher</li>
<li>pygtk2.16 or higher</li>
<li>pygtk2.22 or higher</li>
</ul>
<h2>Optional Runtime Requirements</h2>
<ul>
<li><a href="http://pyopenssl.sourceforge.net/">PyOpenSSL</a> (python-pyopenssl package in Debian) (>=0.9) for <em>secure</em> SSL/TLS. Python's default SSL is insecure, so this package is highly recommended!</li>
<li><a href="http://pyopenssl.sourceforge.net/">PyOpenSSL</a> (python-pyopenssl package in Debian) (>=0.12) for <em>secure</em> SSL/TLS. Python's default SSL is insecure, so this package is highly recommended!</li>
<li>python-pyasn1 to check SSL/TLS certificate</li>
<li>python-crypto to enable End to end encryption</li>
<li>For idle module, libxss library</li>
<li>For zeroconf (bonjour), the "enable link-local messaging" checkbox, you need dbus-glib, python-avahi</li>
......@@ -72,7 +73,7 @@ or if you use hg version and you didn't 'make install' you can also run from gaj
</ul>
<p>steps to compile gajim:</p>
<pre>
$ sh autogen.sh
$ ./autogen.sh
$ ./configure
$ make
</pre>
......@@ -95,7 +96,7 @@ If you want to remove it from custom directory provide it as:
<h2>Miscellaneous</h2>
<h3>XML &amp; Debugging</h3>
<p>If you want to see the xml stanzas and/or help us debugging
<p>If you want to see the xml stanzas and/or help us debugging
you're advised to enable verbose via advanced configuration window.
If you don't want to make this permanent, execute gajim with --verbose
everytime you want to have verbose output.</p>
......@@ -111,7 +112,7 @@ Wiki can be found at <a href="http://trac.gajim.org/wiki">http://trac.gajim.org/
<br/>
<br/>
<br/>
(C) 2003-2011<br/>
(C) 2003-2012<br/>
The Gajim Team<br/>
http://gajim.org<br/>
<br/>
......
#!/usr/bin/env bash
gajimversion="0.15-alpha1"
gajimversion="0.15.4"
if [ -d ".hg" ]; then
node=$(hg tip --template "{node}")
hgversion="-${node:0:12}"
......@@ -10,18 +10,17 @@
AM_ARGS="--add-missing --gnu --copy -Wno-portability"
CONF_ARGS=""
if test x`uname -s 2>/dev/null` = 'xDarwin' -a -f /Library/Frameworks/GTK+.framework/Versions/Current/env; then
. /Library/Frameworks/GTK+.framework/Versions/Current/env
AM_ARGS="${AM_ARGS} --ignore-deps"
CONF_ARGS="${CONF_ARGS} --disable-idle --without-x"
fi
echo "[encoding: UTF-8]" > po/POTFILES.in \
&& for p in `ls data/gui/*.ui`; do echo "[type: gettext/glade]$p" >> \
po/POTFILES.in; done \
&& ls -1 data/gajim.desktop.in.in \
src/*py src/common/*py src/common/zeroconf/*.py src/plugins/*.py| grep -v ipython_view.py >> \
po/POTFILES.in || exit 1
src/*.py src/common/*.py src/command_system/*.py src/command_system/implementation/*.py src/common/zeroconf/*.py src/plugins/*.py | grep -v ipython_view.py >> \
po/POTFILES.in \
&& echo -e "data/gajim.desktop.in\nsrc/ipython_view.py" > po/POTFILES.skip || exit 1
if [ $(find plugins/ -name '*.py' | wc -l) -gt 0 ];then
ls -1 plugins/*/*.py plugins/*/*.ui >> po/POTFILES.skip
fi
if test -z `which pkg-config 2>/dev/null`;then
echo "***Error: pkg-config not found***"
echo "See README.html for build requirements."
......
......@@ -47,12 +47,12 @@ AC_ARG_ENABLE(site-packages,
instead of DATADIR/gajim/src.])]
,
AC_SUBST([gajim_srcdir], [\${pkgpythondir}])
AC_SUBST([gajim_pluginsdir], [\${pkgpythondir}])
,
AC_SUBST([gajim_srcdir], [\${datadir}/\${PACKAGE}/src])
AC_SUBST([gajim_pluginsdir], [\${datadir}/\${PACKAGE}/plugins])
)
AC_SUBST([gajim_pluginsdir], [\${datadir}/\${PACKAGE}/plugins])
AS_AC_EXPAND(GAJIM_SRCDIR, "${gajim_srcdir}")
AS_AC_EXPAND(PKGDATADIR, "${datadir}/${PACKAGE}")
AS_AC_EXPAND(DOCDIR, "${docdir}")
......
[Desktop Entry]
Categories=Network;InstantMessaging;GTK;GNOME;
_Name=Gajim Instant Messenger
_Name=Gajim
_GenericName=Jabber IM Client
_Comment=A GTK+ Jabber client
Version=1.0
......
This diff is collapsed.
......@@ -172,6 +172,7 @@
<object class="GtkLabel" id="notes_label">
<property name="visible">True</property>
<property name="label" translatable="yes">Please wait while the command is sending...</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="expand">False</property>
......
......@@ -450,7 +450,7 @@
<property name="visible">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="stock">gtk-info</property>
<property name="icon-size">2</property>
<property name="icon-size">1</property>
</object>
</child>
</object>
......
......@@ -98,7 +98,7 @@
</child>
<child>
<object class="GtkImageMenuItem" id="manage_contact">
<property name="label" translatable="yes">_Manage Contact</property>
<property name="label" translatable="yes">M_anage Contact</property>
<property name="visible">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="use_underline">True</property>
......
......@@ -20,6 +20,7 @@
<object class="GtkNotebook" id="plugins_notebook">
<property name="visible">True</property>
<property name="can_focus">True</property>
<signal name="switch_page" handler="on_plugins_notebook_switch_page"/>
<child>
<object class="GtkHPaned" id="hpaned1">
<property name="visible">True</property>
......
This diff is collapsed.
This diff is collapsed.
......@@ -7,7 +7,7 @@
<property name="height_request">200</property>
<property name="title" translatable="yes">Gajim</property>
<property name="role">roster</property>
<property name="default_width">200</property>
<property name="default_width">250</property>
<property name="default_height">400</property>
<accel-groups>
<group name="accelgroup1"/>
......@@ -202,7 +202,7 @@
<child>
<object class="GtkCheckMenuItem" id="show_transports_menuitem">
<property name="visible">True</property>
<property name="label" translatable="yes">Show Trans_ports</property>
<property name="label" translatable="yes">Show T_ransports</property>
<property name="use_underline">True</property>
<signal name="activate" handler="on_show_transports_menuitem_activate"/>
</object>
......
This diff is collapsed.
<?xml version="1.0"?>
<?xml version="1.0" encoding="UTF-8"?>
<!--
This file lists the open XMPP servers registered with the XSF.
The format of this file is defined by the Service Discovery
......@@ -6,76 +6,4 @@
To add your server to the list, follow the instructions at
http://xmpp.org/services/register.shtml
-->
<query>
<item jid="0nl1ne.at"/>
<item jid="binaryfreedom.info"/>
<item jid="boese-ban.de"/>
<item jid="brauchen.info"/>
<item jid="cassilis.net"/>
<item jid="chatmask.com"/>
<item jid="climm.org"/>
<item jid="codingteam.net"/>
<item jid="darkdna.net"/>
<item jid="default.rs"/>
<item jid="deshalbfrei.org"/>
<item jid="draugr.de"/>
<item jid="im.apinc.org"/>
<item jid="im.flosoft.biz"/>
<item jid="internet-exception.de"/>
<item jid="jabber.ccc.de"/>
<item jid="jabber.chaotic.de"/>
<item jid="jabber.co.nz"/>
<item jid="jabber.cz"/>
<item jid="jabber.fourecks.de"/>
<item jid="jabber.fsinf.at"/>
<item jid="jabber.hot-chilli.net"/>
<item jid="jabber.iitsp.com"/>
<item jid="jabber.i-pobox.net"/>
<item jid="jabber.loudas.com"/>
<item jid="jabber.minus273.org"/>
<item jid="jabber.no"/>
<item jid="jabber.org"/>
<item jid="jabber.rootbash.com"/>
<item jid="jabber.rueckgr.at"/>
<item jid="jabber.scha.de"/>
<item jid="jabber.second-home.de"/>
<item jid="jabber.sow.as"/>
<item jid="jabber.tmkis.com"/>
<item jid="jabber.yeahnah.co.nz"/>
<item jid="jabber-br.org"/>
<item jid="jabber-hispano.org"/>
<item jid="jabberbr.com"/>
<item jid="jabberd.eu"/>
<item jid="jabberes.org"/>
<item jid="jabberim.de"/>
<item jid="jabbim.com"/>
<item jid="jabbim.cz"/>
<item jid="jabbim.pl"/>
<item jid="jabbim.sk"/>
<item jid="jabme.de"/>
<item jid="jabster.pl"/>
<item jid="jaim.at"/>
<item jid="lethyro.net"/>
<item jid="limun.org"/>
<item jid="linuxlovers.at"/>
<item jid="macjabber.de"/>
<item jid="na-di.de"/>
<item jid="neko.im"/>
<item jid="netmindz.net"/>
<item jid="njs.netlab.cz"/>
<item jid="pandion.im"/>
<item jid="programmer-art.org"/>
<item jid="richim.org"/>
<item jid="sternenschweif.de"/>
<item jid="swissjabber.ch"/>
<item jid="ubuntu-jabber.de"/>
<item jid="thiessen.im"/>
<item jid="thiessen.it"/>
<item jid="thiessen.org"/>
<item jid="ubuntu-jabber.net"/>
<item jid="verdammung.org"/>
<item jid="xabber.de"/>
<item jid="xmpp.jp"/>
<item jid="xmppnet.de"/>
<item jid="zsim.de"/>
</query>
<query xmlns:reg="urn:xmpp:vcard:registration:1"><item jid="0nl1ne.at"/><item jid="blah.im"/><item jid="boese-ban.de"/><item jid="brauchen.info"/><item jid="chatme.im"/><item jid="chrome.pl"/><item jid="climm.org"/><item jid="coderollers.com"/><item jid="codingteam.net"/><item jid="comm.unicate.me"/><item jid="deshalbfrei.org"/><item jid="draugr.de"/><item jid="einfachjabber.de"/><item jid="forumanalogue.fr"/><item jid="im.apinc.org"/><item jid="im.flosoft.biz"/><item jid="internet-exception.de"/><item jid="jabb3r.net"/><item jid="jabber-br.org"/><item jid="jabber-hosting.de"/><item jid="jabber.at"/><item jid="jabber.ccc.de"/><item jid="jabber.chaotic.de"/><item jid="jabber.co.nz"/><item jid="jabber.cz"/><item jid="jabber.de"/><item jid="jabber.earth.li"/><item jid="jabber.etighichat.com"/><item jid="jabber.fourecks.de"/><item jid="jabber.gate31.net"/><item jid="jabber.hot-chilli.net"/><item jid="jabber.i-pobox.net"/><item jid="jabber.iitsp.com"/><item jid="jabber.loudas.com"/><item jid="jabber.me"/><item jid="jabber.meta.net.nz"/><item jid="jabber.minus273.org"/><item jid="jabber.no-sense.net"/><item jid="jabber.no"/><item jid="jabber.rootbash.com"/><item jid="jabber.rueckgr.at"/><item jid="jabber.scha.de"/><item jid="jabber.schnied.net"/><item jid="jabber.second-home.de"/><item jid="jabber.smash-net.org"/><item jid="jabber.sow.as"/><item jid="jabber.theforest.us"/><item jid="jabber.tmkis.com"/><item jid="jabber.yeahnah.co.nz"/><item jid="jabberd.eu"/><item jid="jabberes.org"/><item jid="jabbim.com"/><item jid="jabbim.cz"/><item jid="jabbim.pl"/><item jid="jabbim.sk"/><item jid="jabin.org"/><item jid="jabme.de"/><item jid="jabster.pl"/><item jid="jaim.at"/><item jid="jappix.com"/><item jid="jisshi.com"/><item jid="labnote.org"/><item jid="lightwitch.org"/><item jid="limun.org"/><item jid="macjabber.de"/><item jid="mayplaces.com"/><item jid="na-di.de"/><item jid="neko.im"/><item jid="netmindz.net"/><item jid="njs.netlab.cz"/><item jid="palita.net"/><item jid="pandion.im"/><item jid="pidgin.su"/><item jid="programmer-art.org"/><item jid="prosody.de"/><item jid="richim.org"/><item jid="rkquery.de"/><item jid="sss.chaoslab.ru"/><item jid="sternenschweif.de"/><item jid="swissjabber.ch"/><item jid="swissjabber.de"/><item jid="swissjabber.eu"/><item jid="swissjabber.li"/><item jid="swissjabber.org"/><item jid="tcweb.org"/><item jid="tekst.me"/><item jid="thiessen.im"/><item jid="thiessen.it"/><item jid="thiessen.org"/><item jid="tigase.im"/><item jid="twattle.net"/><item jid="ubuntu-jabber.de"/><item jid="ubuntu-jabber.net"/><item jid="univers-libre.net"/><item jid="verdammung.org"/><item jid="wtfismyip.com"/><item jid="xabber.de"/><item jid="xmpp-hosting.de"/><item jid="xmpp.jp"/><item jid="xmppnet.de"/><item jid="zauris.ru"/><item jid="zsim.de"/></query>
gajim for Debian
----------------
For video chat support, you have to install python-farsight.
For video chat support, you have to install python-farstream.
-- Yann Le Boulanger <asterix@lagaule.org>, Mon, 20 Jun 2005 12:02:31 +0200
-- Julien Valroff <julien@debian.org> Sat, 07 May 2011 13:50:27 +0200
gajim (0.15~alpha1-1) unstable; urgency=low
gajim (0.15.3-1) unstable; urgency=low
* New upstream release
* Switch to 3.0 (quilt) source format.
-- Yann Leboulanger <yann@leboulanger.org> Sun, 17 Mar 2013 18:32:12 +0200
gajim (0.15.1-4) unstable; urgency=low
* apply patches using dpatch in debian/rules
-- Yann Leboulanger <asterix@lagaule.org> Fri, 15 Feb 2013 23:34:36 +0200
gajim (0.15.1-3) unstable; urgency=low
* Go back to old patch format so that Gajim can go in testing.
-- Yann Leboulanger <asterix@lagaule.org> Sun, 02 Dec 2012 19:42:34 +0200
gajim (0.15.1-2) unstable; urgency=low
* re-add missing 0.15-1.1 changelog entry
* add a patch to prevent a traceback.
* add a patch to fix a crash. Closes: #690937
-- Yann Leboulanger <asterix@lagaule.org> Sun, 14 Oct 2012 18:02:36 +0200
gajim (0.15.1-1) unstable; urgency=low
* New upstream release.
* change python-farsight to python-farstream in suggests list. Closes: #682598
* Add python-gupnp-igd to suggests list. Closes: #668194
* Fix shortcut behaviour in roster window. Closes: #667870
* Improve GPG status handling. Closes: #670243
-- Yann Leboulanger <asterix@lagaule.org> Tue, 29 Aug 2012 09:51:52 +0200
gajim (0.15-1.1) unstable; urgency=high
* Non-maintainer upload by the Security Team.
* Fix CVE-2012-2093: insecure use of temporary files when convering LaTeX
IM messages to png images. Closes: #668710
-- Luk Claes <luk@debian.org> Sat, 16 Jun 2012 18:22:00 +0200
gajim (0.15-1) unstable; urgency=low
* New upstream release.
* remove 00_debian-copying.diff because upstream doesn't install it anymore
* remove 01_configure-ac.diff because upstream changed configure dependencies
* remove python-gnupginterface from recommands list, it's no more used
-- Yann Leboulanger <asterix@lagaule.org> Fri, 26 Aug 2011 12:13:51 +0200
-- Yann Leboulanger <asterix@lagaule.org> Sat, 18 Mar 2012 10:32:38 +0100
gajim (0.14.4-1) unstable; urgency=low
......
......@@ -2,17 +2,17 @@ Source: gajim
Section: net
Priority: optional
Maintainer: Yann Leboulanger <asterix@lagaule.org>
Build-Depends: debhelper (>= 7.0.50~), python (>= 2.6.6-3~), gettext (>= 0.17-4), intltool (>= 0.40.1), imagemagick, libglib2.0-dev
Standards-Version: 3.9.2
Build-Depends: debhelper (>= 7.0.50~), python (>= 2.6.6-3~), gettext (>= 0.17-4), intltool (>= 0.40.1), imagemagick, libglib2.0-dev, dpatch
Standards-Version: 3.9.3
Homepage: http://www.gajim.org
Vcs-Hg: http://hg.gajim.org/gajim/
Vcs-Browser: http://hg.gajim.org/gajim/file
Package: gajim
Architecture: all
Depends: ${misc:Depends}, ${python:Depends}, python-gtk2 (>= 2.16.0), dnsutils
Recommends: dbus, python-dbus, notification-daemon, python-openssl (>= 0.9), python-crypto
Suggests: python-gconf, python-gnome2, nautilus-sendto, avahi-daemon, python-avahi, network-manager, libgtkspell0, aspell-en, python-gnomekeyring, gnome-keyring, python-kerberos (>= 1.1), texlive-latex-base, dvipng, python-farsight, gstreamer0.10-plugins-ugly
Depends: ${misc:Depends}, ${python:Depends}, python-gtk2 (>= 2.22.0), dnsutils
Recommends: dbus, python-dbus, notification-daemon, python-openssl (>= 0.12), python-crypto, python-pyasn1
Suggests: python-gconf, python-gnome2, nautilus-sendto, avahi-daemon, python-avahi, network-manager, libgtkspell0, aspell-en, python-gnomekeyring, gnome-keyring, python-kerberos (>= 1.1), texlive-latex-base, dvipng, python-farstream, gstreamer0.10-plugins-ugly, python-pycurl, python-gupnp-igd
Description: Jabber client written in PyGTK
Gajim is a Jabber client. It has a tabbed user interface with normal chats,
group chats, and has many features such as, TLS, GPG, SSL, multiple accounts,
......
......@@ -9,7 +9,7 @@ Upstream Authors:
- Yann Leboulanger <asterix@lagaule.org>
Copyright: (c) 2003-2011 Gajim Team
Copyright: (c) 2003-2012 Gajim Team
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
......
Description: don't install useless COPYING file
Forwarded: not-neded
--- a/Makefile.am
+++ b/Makefile.am
@@ -7,8 +7,6 @@
docfilesdir = $(docdir)
docfiles_DATA = README \
README.html \
- ChangeLog \
- COPYING \
THANKS \
THANKS.artists \
AUTHORS
--- a/Makefile.in
+++ b/Makefile.in
@@ -298,8 +298,6 @@
docfilesdir = $(docdir)
docfiles_DATA = README \
README.html \
- ChangeLog \
- COPYING \
THANKS \
THANKS.artists \
AUTHORS
Description: don't require python headers to remove build-dep on python-dev and python-gtk2-dev
Author: Yann Leboulanger <asterix@lagaule.org>
Origin: upstream,http://hg.gajim.org/gajim/diff/252bb3cf2c59/configure.ac
Last-Update: 2011-05-07
--- a/configure.ac
+++ b/configure.ac
@@ -36,25 +36,10 @@
AM_NLS
-dnl ****
-dnl pygtk and gtk+
-dnl ****
-PKG_CHECK_MODULES([PYGTK], [gtk+-2.0 >= 2.16.0 pygtk-2.0 >= 2.16.0])
-AC_SUBST(PYGTK_CFLAGS)
-AC_SUBST(PYGTK_LIBS)
-PYGTK_DEFS=`$PKG_CONFIG --variable=defsdir pygtk-2.0`
-AC_SUBST(PYGTK_DEFS)
-
-AM_PATH_PYTHON([2.5])
-if test "x$PYTHON" = "x:"; then
- AC_MSG_ERROR([Python not found])
-fi
-
ACLOCAL_AMFLAGS="\${ACLOCAL_FLAGS}"
AC_SUBST(ACLOCAL_AMFLAGS)
-AM_CHECK_PYTHON_HEADERS(,[AC_MSG_ERROR(could not find Python headers)])
-AC_SUBST([PYTHON_INCLUDES])
+AM_PATH_PYTHON([2.5])
dnl ****
dnl enable installation in python-2.x/site-packages/gajim
00_debian-copying.diff
01_configure-ac.diff
This diff is collapsed.
......@@ -3,15 +3,13 @@ INCLUDES = \
gajimpluginsdir = $(gajim_pluginsdir)
installedplugins = acronyms_expander banner_tweaks length_notifier plugin_installer triggers whiteboard
dist_gajimplugins_PYTHON =
installedpluginsfiles = $(wildcard ${srcdir}/${p}/*.py ${srcdir}/${p}/manifest.ini ${srcdir}/${p}/*.ui ${srcdir}/${p}/*.png)
pluginsdirs = ${sort ${dir ${wildcard ${srcdir}/*/ ${srcdir}/*/*/}}}
nobase_dist_gajimplugins_PYTHON = $(foreach p, ${installedplugins}, $(installedpluginsfiles))
pluginsfiles = $(wildcard ${p}/*.py ${p}/manifest.ini ${p}/*.ui ${p}/*.png)
nobase_gajimplugins_DATA = $(foreach p, ${pluginsdirs}, $(pluginsfiles))
EXTRA_DIST = \
$(srcdir)/*/*.py \
$(srcdir)/*/manifest.ini \
$(srcdir)/*/*.ui
MAINTAINERCLEANFILES = Makefile.in
from acronyms_expander import AcronymsExpanderPlugin
# -*- coding: utf-8 -*-
## 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; version 3 only.
##
## 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/>.
##
'''
Acronyms expander plugin.
:author: Mateusz Biliński <mateusz@bilinski.it>
:since: 9th June 2008
:copyright: Copyright (2008) Mateusz Biliński <mateusz@bilinski.it>
:license: GPL
'''
import sys
import gtk
import gobject
from plugins import GajimPlugin
from plugins.helpers import log, log_calls
class AcronymsExpanderPlugin(GajimPlugin):
@log_calls('AcronymsExpanderPlugin')
def init(self):
self.config_dialog = None
self.gui_extension_points = {
'chat_control_base': (self.connect_with_chat_control_base,
self.disconnect_from_chat_control_base)
}
self.config_default_values = {
'INVOKER': (' ', _('')),
'ACRONYMS': ({'RTFM': 'Read The Friendly Manual',
'/slap': '/me slaps',
'PS-': 'plug-in system',
'G-': 'Gajim',
'GNT-': 'http://trac.gajim.org/newticket',
'GW-': 'http://trac.gajim.org/',
'GTS-': 'http://trac.gajim.org/report',
},
_('')),
}
@log_calls('AcronymsExpanderPlugin')
def textbuffer_live_acronym_expander(self, tb):
"""
@param tb gtk.TextBuffer
"""
#assert isinstance(tb,gtk.TextBuffer)
ACRONYMS = self.config['ACRONYMS']
INVOKER = self.config['INVOKER']
t = tb.get_text(tb.get_start_iter(), tb.get_end_iter())
#log.debug('%s %d'%(t, len(t)))
if t and t[-1] == INVOKER:
#log.debug('changing msg text')
base, sep, head=t[:-1].rpartition(INVOKER)
log.debug('%s | %s | %s'%(base, sep, head))
if head in ACRONYMS:
head = ACRONYMS[head]
#log.debug('head: %s'%(head))
t = ''.join((base, sep, head, INVOKER))
#log.debug("setting text: '%s'"%(t))
gobject.idle_add(tb.set_text, t)
@log_calls('AcronymsExpanderPlugin')
def connect_with_chat_control_base(self, chat_control):
d = {}
tv = chat_control.msg_textview
tb = tv.get_buffer()
h_id = tb.connect('changed', self.textbuffer_live_acronym_expander)
d['h_id'] = h_id
chat_control.acronyms_expander_plugin_data = d
return True
@log_calls('AcronymsExpanderPlugin')
def disconnect_from_chat_control_base(self, chat_control):
d = chat_control.acronyms_expander_plugin_data
tv = chat_control.msg_textview
tv.get_buffer().disconnect(d['h_id'])
[info]
name: Acronyms Expander
short_name: acronyms_expander
version: 0.1
description: Replaces acronyms (or other strings) with given expansions/substitutes.
authors: Mateusz Biliński <mateusz@bilinski.it>
homepage: http://blog.bilinski.it
from plugin import BannerTweaksPlugin
<?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="banner_tweaks_config_vbox">
<property name="visible">True</property>
<property name="border_width">9</property>
<property name="orientation">vertical</property>
<property name="spacing">4</property>
<child>
<object class="GtkCheckButton" id="show_banner_image_checkbutton">
<property name="label" translatable="yes">Display status icon</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="tooltip_text" translatable="yes">If checked, status icon will be displayed in chat window banner.</property>
<property name="draw_indicator">True</property>
<signal name="toggled" handler="on_show_banner_image_checkbutton_toggled"/>
</object>
<packing>
<property name="expand">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="show_banner_online_msg_checkbutton">
<property name="label" translatable="yes">Display status message of contact</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="tooltip_text" translatable="yes">If checked, status message of contact will be displayed in chat window banner.</property>
<property name="draw_indicator">True</property>
<signal name="toggled" handler="on_show_banner_online_msg_checkbutton_toggled"/>
</object>
<packing>
<property name="expand">False</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="show_banner_resource_checkbutton">
<property name="label" translatable="yes">Display resource name of contact</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="tooltip_text" translatable="yes">If checked, resource name of contact will be displayed in chat window banner.</property>
<property name="draw_indicator">True</property>
<signal name="toggled" handler="on_show_banner_resource_checkbutton_toggled"/>
</object>
<packing>
<property name="expand">False</property>
<property name="position">2</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="banner_small_fonts_checkbutton">
<property name="label" translatable="yes">Use small fonts for contact name and resource name</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="tooltip_text" translatable="yes">If checked, smaller font will be used to display resource name and contact name in chat window banner.</property>
<property name="draw_indicator">True</property>
<signal name="toggled" handler="on_banner_small_fonts_checkbutton_toggled"/>
</object>
<packing>
<property name="expand">False</property>
<property name="position">3</property>
</packing>
</child>
</object>
</child>
</object>
</interface>
[info]
name: Banner Tweaks
short_name: banner_tweaks
version: 0.1
description: Allows user to tweak chat window banner appearance (eg. make it compact).
Based on patch by pb in ticket #4133:
http://trac.gajim.org/attachment/ticket/4133.
authors = Mateusz Biliński <mateusz@bilinski.it>
homepage = http://blog.bilinski.it
# -*- coding: utf-8 -*-
## 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; version 3 only.
##
## 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/>.
##
'''
Adjustable chat window banner.
Includes tweaks to make it compact.
Based on patch by pb in ticket #4133:
http://trac.gajim.org/attachment/ticket/4133/gajim-chatbanneroptions-svn10008.patch
:author: Mateusz Biliński <mateusz@bilinski.it>
:since: 30 July 2008
:copyright: Copyright (2008) Mateusz Biliński <mateusz@bilinski.it>
:license: GPL
'''
import sys
import gtk
import gobject
import message_control
from common import i18n
from common import gajim
from common import helpers
from plugins import GajimPlugin
from plugins.helpers import log, log_calls
from plugins.gui import GajimPluginConfigDialog
class BannerTweaksPlugin(GajimPlugin):
@log_calls('BannerTweaksPlugin')
def init(self):
self.config_dialog = BannerTweaksPluginConfigDialog(self)
self.gui_extension_points = {
'chat_control_base_draw_banner': (self.chat_control_base_draw_banner_called,
self.chat_control_base_draw_banner_deactivation)
}
self.config_default_values = {
'show_banner_image': (True, _('If True, Gajim will display a status icon in the banner of chat windows.')),
'show_banner_online_msg': (True, _('If True, Gajim will display the status message of the contact in the banner of chat windows.')),
'show_banner_resource': (False, _('If True, Gajim will display the resource name of the contact in the banner of chat windows.')),
'banner_small_fonts': (False, _('If True, Gajim will use small fonts for contact name and resource name in the banner of chat windows.')),
'old_chat_avatar_height': (52, _('chat_avatar_height value before plugin was activated')),
}
@log_calls('BannerTweaksPlugin')
def activate(self):
self.config['old_chat_avatar_height'] = gajim.config.get('chat_avatar_height')
#gajim.config.set('chat_avatar_height', 28)
@log_calls('BannerTweaksPlugin')
def deactivate(self):
gajim.config.set('chat_avatar_height', self.config['old_chat_avatar_height'])
@log_calls('BannerTweaksPlugin')
def chat_control_base_draw_banner_called(self, chat_control):
if not self.config['show_banner_online_msg']:
chat_control.banner_status_label.hide()
chat_control.banner_status_label.set_no_show_all(True)
status_text = ''
chat_control.banner_status_label.set_markup(status_text)
if not self.config['show_banner_image']:
if chat_control.TYPE_ID == message_control.TYPE_GC:
banner_status_img = chat_control.xml.get_object(
'gc_banner_status_image')
else:
banner_status_img = chat_control.xml.get_object(
'banner_status_image')
banner_status_img.clear()
# TODO: part below repeats a lot of code from ChatControl.draw_banner_text()
# This could be rewritten using re module: getting markup text from
# banner_name_label and replacing some elements based on plugin config.
# Would it be faster?
if self.config['show_banner_resource'] or self.config['banner_small_fonts']:
banner_name_label = chat_control.xml.get_object('banner_name_label')
label_text = banner_name_label.get_label()
contact = chat_control.contact
jid = contact.jid
name = contact.get_shown_name()
if chat_control.resource:
name += '/' + chat_control.resource
elif contact.resource and self.config['show_banner_resource']:
name += '/' + contact.resource
if chat_control.TYPE_ID == message_control.TYPE_PM:
name = _('%(nickname)s from group chat %(room_name)s') %\
{'nickname': name, 'room_name': chat_control.room_name}
name = gobject.markup_escape_text(name)
# We know our contacts nick, but if another contact has the same nick
# in another account we need to also display the account.
# except if we are talking to two different resources of the same contact
acct_info = ''
for account in gajim.contacts.get_accounts():
if account == chat_control.account:
continue
if acct_info: # We already found a contact with same nick
break
for jid in gajim.contacts.get_jid_list(account):
other_contact_ = \
gajim.contacts.get_first_contact_from_jid(account, jid)
if other_contact_.get_shown_name() == chat_control.contact.get_shown_name():
acct_info = ' (%s)' % \
gobject.markup_escape_text(chat_control.account)
break
font_attrs, font_attrs_small = chat_control.get_font_attrs()
if self.config['banner_small_fonts']:
font_attrs = font_attrs_small
st = gajim.config.get('displayed_chat_state_notifications')
cs = contact.chatstate
if cs and st in ('composing_only', 'all'):
if contact.show == 'offline':
chatstate = ''
elif contact.composing_xep == 'XEP-0085':
if st == 'all' or cs == 'composing':
chatstate = helpers.get_uf_chatstate(cs)
else:
chatstate = ''
elif contact.composing_xep == 'XEP-0022':
if cs in ('composing', 'paused'):
# only print composing, paused
chatstate = helpers.get_uf_chatstate(cs)
else:
chatstate = ''
else:
# When does that happen ? See [7797] and [7804]
chatstate = helpers.get_uf_chatstate(cs)
label_text = '<span %s>%s</span><span %s>%s %s</span>' % \
(font_attrs, name, font_attrs_small, acct_info, chatstate)
else:
# weight="heavy" size="x-large"
label_text = '<span %s>%s</span><span %s>%s</span>' % \
(font_attrs, name, font_attrs_small, acct_info)
banner_name_label.set_markup(label_text)
@log_calls('BannerTweaksPlugin')
def chat_control_base_draw_banner_deactivation(self, chat_control):
pass
#chat_control.draw_banner()
class BannerTweaksPluginConfigDialog(GajimPluginConfigDialog):
def init(self):
self.GTK_BUILDER_FILE_PATH = self.plugin.local_file_path(
'config_dialog.ui')
self.xml = gtk.Builder()
self.xml.set_translation_domain(i18n.APP)
self.xml.add_objects_from_file(self.GTK_BUILDER_FILE_PATH,
['banner_tweaks_config_vbox'])
self.config_vbox = self.xml.get_object('banner_tweaks_config_vbox')
self.child.pack_start(self.config_vbox)
self.show_banner_image_checkbutton = self.xml.get_object('show_banner_image_checkbutton')
self.show_banner_online_msg_checkbutton = self.xml.get_object('show_banner_online_msg_checkbutton')
self.show_banner_resource_checkbutton = self.xml.get_object('show_banner_resource_checkbutton')
self.banner_small_fonts_checkbutton = self.xml.get_object('banner_small_fonts_checkbutton')
self.xml.connect_signals(self)
def on_run(self):
self.show_banner_image_checkbutton.set_active(self.plugin.config['show_banner_image'])
self.show_banner_online_msg_checkbutton.set_active(self.plugin.config['show_banner_online_msg'])
self.show_banner_resource_checkbutton.set_active(self.plugin.config['show_banner_resource'])
self.banner_small_fonts_checkbutton.set_active(self.plugin.config['banner_small_fonts'])
def on_show_banner_image_checkbutton_toggled(self, button):
self.plugin.config['show_banner_image'] = button.get_active()
def on_show_banner_online_msg_checkbutton_toggled(self, button):
self.plugin.config['show_banner_online_msg'] = button.get_active()
def on_show_banner_resource_checkbutton_toggled(self, button):
self.plugin.config['show_banner_resource'] = button.get_active()
def on_banner_small_fonts_checkbutton_toggled(self, button):
self.plugin.config['banner_small_fonts'] = button.get_active()
from plugin import DBusPlugin
[info]
name: D-Bus Support
short_name: dbus
version: 0.1
description: D-Bus support. Based on remote_control module from
Gajim core but uses new events handling system.
authors = Mateusz Biliński <mateusz@bilinski.it>
homepage = http://blog.bilinski.it
This diff is collapsed.
from plugin import EventsDumpPlugin
[info]
name: Events Dump
short_name: events_dump
version: 0.1
description: Dumps info about selected events to console.
authors = Mateusz Biliński <mateusz@bilinski.it>
homepage = http://blog.bilinski.it
# -*- coding: utf-8 -*-
##
## 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; version 3 only.
##
## 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/>.
##
'''
Events Dump plugin.
Dumps info about selected events to console.
:author: Mateusz Biliński <mateusz@bilinski.it>
:since: 10th August 2008
:copyright: Copyright (2008) Mateusz Biliński <mateusz@bilinski.it>
:license: GPL
'''
import new
from pprint import pformat
from plugins import GajimPlugin
from plugins.helpers import log_calls, log
from common import ged
class EventsDumpPlugin(GajimPlugin):
@log_calls('EventsDumpPlugin')
def init(self):
self.config_dialog = None
#self.gui_extension_points = {}
#self.config_default_values = {}
events_from_old_dbus_support = [
'Roster', 'AccountPresence', 'ContactPresence',
'ContactAbsence', 'ContactStatus', 'NewMessage',
'Subscribe', 'Subscribed', 'Unsubscribed',
'NewAccount', 'VcardInfo', 'LastStatusTime',
'OsInfo', 'GCPresence', 'GCMessage', 'RosterInfo',
'NewGmail']
events_from_src_gajim = [
'ROSTER', 'WARNING', 'ERROR',
'INFORMATION', 'ERROR_ANSWER', 'STATUS',
'NOTIFY', 'MSGERROR', 'MSGSENT', 'MSGNOTSENT',
'SUBSCRIBED', 'UNSUBSCRIBED', 'SUBSCRIBE',
'AGENT_ERROR_INFO', 'AGENT_ERROR_ITEMS',
'AGENT_REMOVED', 'REGISTER_AGENT_INFO',
'AGENT_INFO_ITEMS', 'AGENT_INFO_INFO',
'QUIT', 'NEW_ACC_CONNECTED',
'NEW_ACC_NOT_CONNECTED', 'ACC_OK', 'ACC_NOT_OK',
'MYVCARD', 'VCARD', 'LAST_STATUS_TIME', 'OS_INFO',
'GC_NOTIFY', 'GC_MSG', 'GC_SUBJECT', 'GC_CONFIG',
'GC_CONFIG_CHANGE', 'GC_INVITATION',
'GC_AFFILIATION', 'GC_PASSWORD_REQUIRED',
'BAD_PASSPHRASE', 'ROSTER_INFO', 'BOOKMARKS',
'CON_TYPE', 'CONNECTION_LOST', 'FILE_REQUEST',
'GMAIL_NOTIFY', 'FILE_REQUEST_ERROR',
'FILE_SEND_ERROR', 'STANZA_ARRIVED', 'STANZA_SENT',
'HTTP_AUTH', 'VCARD_PUBLISHED',
'VCARD_NOT_PUBLISHED', 'ASK_NEW_NICK', 'SIGNED_IN',
'METACONTACTS', 'ATOM_ENTRY', 'FAILED_DECRYPT',
'PRIVACY_LISTS_RECEIVED', 'PRIVACY_LIST_RECEIVED',
'PRIVACY_LISTS_ACTIVE_DEFAULT',
'PRIVACY_LIST_REMOVED', 'ZC_NAME_CONFLICT',
'PING_SENT', 'PING_REPLY', 'PING_ERROR',
'SEARCH_FORM', 'SEARCH_RESULT',
'RESOURCE_CONFLICT', 'PEP_CONFIG',
'UNIQUE_ROOM_ID_UNSUPPORTED',
'UNIQUE_ROOM_ID_SUPPORTED', 'SESSION_NEG',
'GPG_PASSWORD_REQUIRED', 'SSL_ERROR',
'FINGERPRINT_ERROR', 'PLAIN_CONNECTION',
'PUBSUB_NODE_REMOVED', 'PUBSUB_NODE_NOT_REMOVED']
network_events_from_core = ['raw-message-received',
'raw-iq-received',
'raw-pres-received']
network_events_generated_in_nec = [
'customized-message-received',
'more-customized-message-received',
'modify-only-message-received',
'enriched-chat-message-received']
self.events_names = []
self.events_names += network_events_from_core
self.events_names += network_events_generated_in_nec
self.events_handlers = {}
self._set_handling_methods()
@log_calls('EventsDumpPlugin')
def activate(self):
pass
@log_calls('EventsDumpPlugin')
def deactivate(self):
pass
@log_calls('EventsDumpPlugin')
def _set_handling_methods(self):
for event_name in self.events_names:
setattr(self, event_name,
new.instancemethod(
self._generate_handling_method(event_name),
self,
EventsDumpPlugin))
self.events_handlers[event_name] = (ged.POSTCORE,
getattr(self, event_name))
def _generate_handling_method(self, event_name):
def handler(self, *args):
print "Event '%s' occured. Arguments: %s\n\n===\n"%(event_name, pformat(args))
return handler
from plugin import GoogleTranslationPlugin
[info]
name: Google Translation
short_name: google_translation
version: 0.1
description: Translates (currently only incoming) messages using Google Translate.
authors = Mateusz Biliński <mateusz@bilinski.it>
homepage = http://blog.bilinski.it
# -*- coding: utf-8 -*-
##
## 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; version 3 only.
##
## 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/>.
##
'''
Google Translation plugin.
Translates (currently only incoming) messages using Google Translate.
:note: consider this as proof-of-concept
:author: Mateusz Biliński <mateusz@bilinski.it>
:since: 25th August 2008
:copyright: Copyright (2008) Mateusz Biliński <mateusz@bilinski.it>
:license: GPL
'''
import re
import urllib2
import new
from pprint import pformat
from sys import getfilesystemencoding
from common import helpers
from common import gajim
from plugins import GajimPlugin
from plugins.helpers import log_calls, log
from common import ged
from common import nec
class GoogleTranslationPlugin(GajimPlugin):
@log_calls('GoogleTranslationPlugin')
def init(self):
self.config_dialog = None
#self.gui_extension_points = {}
self.config_default_values = {
'from_lang' :
(u'en', _(u'Language of text to be translated')),
'to_lang' :
(u'fr', _(u'Language to which translation will be made')),
'user_agent' :
(u'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.12) '
'Gecko/20080213 Firefox/2.0.0.11',
_(u'User Agent data to be used with urllib2 '
'when connecting to Google Translate service'))}
#self.events_handlers = {}
self.events = [GoogleTranslateMessageReceivedEvent]
self.translated_text_re = re.compile(
r'google.language.callbacks.id100\(\'22\','
'{"translatedText":"(?P<text>[^"]*)"}, 200, null, 200\)')
@log_calls('GoogleTranslationPlugin')
def translate_text(self, text, from_lang, to_lang):
# Converts text so it can be used within URL as query to Google
# Translate.
quoted_text = urllib2.quote(text.encode(getfilesystemencoding()))
# prepare url
headers = { 'User-Agent' : self.config['user_agent'] }
translation_url = u'http://www.google.com/uds/Gtranslate?callback='\
'google.language.callbacks.id100&context=22&q=%(quoted_text)s&'\
'langpair=%(from_lang)s%%7C%(to_lang)s&key=notsupplied&v=1.0' % \
locals()
request = urllib2.Request(translation_url, headers=headers)
try:
response = urllib2.urlopen(request)
except urllib2.URLError, e:
# print e
return text
results = response.read()
translated_text = self.translated_text_re.search(results).group('text')
if translated_text:
return translated_text
return text
@log_calls('GoogleTranslationPlugin')
def activate(self):
pass
@log_calls('GoogleTranslationPlugin')
def deactivate(self):
pass
class GoogleTranslateMessageReceivedEvent(nec.NetworkIncomingEvent):
name = 'google-translate-message-received'
base_network_events = ['raw-message-received']
def generate(self):
msg_type = self.base_event.stanza.attrs.get('type', None)
if msg_type == u'chat':
msg_text = "".join(self.base_event.stanza.kids[0].data)
if msg_text:
from_lang = self.plugin.config['from_lang']
to_lang = self.plugin.config['to_lang']
self.base_event.stanza.kids[0].setData(
self.plugin.translate_text(msg_text, from_lang, to_lang))
# We only want to modify old event, not emit another, so we return False
# here.
return False
from length_notifier import LengthNotifierPlugin
<?xml version="1.0"?>
<interface>
<requires lib="gtk+" version="2.16"/>
<!-- interface-naming-policy toplevel-contextual -->
<object class="GtkWindow" id="window1">
<child>
<object class="GtkTable" id="length_notifier_config_table">
<property name="visible">True</property>
<property name="border_width">9</property>
<property name="n_rows">3</property>
<property name="n_columns">2</property>