Merge plugin-system with default branch.

This commit is contained in:
Mateusz Biliński 2009-06-13 23:25:46 +02:00
commit 7b0a099feb
9 changed files with 26 additions and 48 deletions

View File

@ -2,14 +2,7 @@ SUBDIRS = src data po
ACLOCAL_AMFLAGS = -I m4
if BUILD_REMOTE_CONTROL
OPTIONAL_BIN = scripts/gajim-remote
else
OPTIONAL_BIN =
endif
bin_SCRIPTS = scripts/gajim scripts/gajim-history-manager $(OPTIONAL_BIN)
bin_SCRIPTS = scripts/gajim scripts/gajim-history-manager scripts/gajim-remote
docfilesdir = $(docdir)
docfiles_DATA = README \

View File

@ -37,7 +37,7 @@ Gajim is a GTK+ app that loves GNOME. You can do 'make' so you don't require gno
<li>GnomePythonExtras 2.10 or above (aka gnome-python-desktop) so you can avoid compiling trayicon and gtkspell</li>
<li>gnome-python-desktop (for GnomeKeyring support)</li>
<li>notification-daemon or notify-python (and D-Bus) to get cooler popups</li>
<li>D-Bus running to have gajim-remote working. Some distributions split dbus-x11, which is needed for dbus to work with Gajim.</li>
<li>D-Bus running to have gajim-remote working. Some distributions split dbus-x11, which is needed for dbus to work with Gajim. Version >= 0.60 is required.</li>
<li>python-dbus bindings</li>
<li>python-sexy to have clickable URLs in chat windows</li>
<li>python-kerberos to use GSSAPI authentification. Note: version1.1 or higher is required</li>
@ -55,7 +55,6 @@ the xml lib that *comes* with python and not pyxml or whatever.
<li>python-gtk2-dev</li>
<li>libgtk2.0-dev aka. gtk2-devel</li>
<li>libgtkspell-dev (for the gtkspell module)</li>
<li>libdbus-1-dev (for the remote control module)</li>
<li>intltool (>= 0.40.1)</li>
</ul>

View File

@ -45,27 +45,6 @@ AC_SUBST(PYGTK_LIBS)
PYGTK_DEFS=`$PKG_CONFIG --variable=defsdir pygtk-2.0`
AC_SUBST(PYGTK_DEFS)
dnl *****
dnl dbus
dnl *****
AC_ARG_ENABLE([remote],
[ --disable-remote disable remote control via DBus [default auto]],
enable_remote=$enableval, enable_remote=auto)
if test "x$enable_remote" = "xauto"; then
PKG_CHECK_EXISTS([dbus-1],enable_remote=yes,enable_remote=no)
fi
if test "x$enable_remote" = "xyes";then
PKG_CHECK_MODULES([DBUS], [dbus-1 >= 0.60])
AC_SUBST(DBUS_CFLAGS)
AC_SUBST(DBUS_LIBS)
have_remote=true
else
have_remote=false
fi
AM_CONDITIONAL(BUILD_REMOTE_CONTROL, $have_remote)
AM_PATH_PYTHON([2.5])
if test "x$PYTHON" = "x:"; then
AC_MSG_ERROR([Python not found])
@ -184,7 +163,6 @@ AC_OUTPUT
echo "
*****************************
Build features:
remote control ... ${have_remote}
trayicon ......... ${have_trayicon}
idle module OSX .. ${have_idle_osx}
cocoa (OSX)....... ${have_cocoa}

View File

@ -14,13 +14,7 @@ sounds_DATA = $(srcdir)/sounds/*.wav
otherdir = $(pkgdatadir)/data/other
other_DATA = other/servers.xml other/cacerts.pem
if BUILD_REMOTE_CONTROL
OPTIONAL_MAN = gajim-remote.1
else
OPTIONAL_MAN =
endif
man_MANS = gajim.1 $(OPTIONAL_MAN)
man_MANS = gajim.1 gajim-remote.1
EXTRA_DIST = $(desktop_in_files) \

View File

@ -1,2 +1,3 @@
data/gajim.desktop.in
src/eggtrayicon.c
src/ipython_view.py

View File

@ -2524,8 +2524,9 @@ class ChatControl(ChatControlBase):
rows = gajim.logger.get_last_conversation_lines(jid, restore_how_many,
pending_how_many, timeout, self.account)
except exceptions.DatabaseMalformed:
import common.logger
dialogs.ErrorDialog(_('Database Error'),
_('The database file (%s) cannot be read. Try to repair it or remove it (all history will be lost).') % constants.LOG_DB_PATH)
_('The database file (%s) cannot be read. Try to repair it or remove it (all history will be lost).') % common.logger.LOG_DB_PATH)
rows = []
local_old_kind = None
for row in rows: # row[0] time, row[1] has kind, row[2] the message

View File

@ -2609,8 +2609,8 @@ class Interface:
#FIXME: recognize xmpp: and treat it specially
links = r"((?<=\()[A-Za-z][A-Za-z0-9\+\.\-]*:"\
r"([A-Za-z0-9\.\-_~:/\?#\[\]@!\$&'\(\)\*\+,;=]|%[A-Fa-f0-9]{2})+"\
r"(?=\)))|([A-Za-z][A-Za-z0-9\+\.\-]*:([A-Za-z0-9\.\-_~:/\?#\[\]@!\$&'\(\)\*\+,;=]|%[A-Fa-f0-9]{2})+)"
r"([\w\.\-_~:/\?#\[\]@!\$&'\(\)\*\+,;=]|%[A-Fa-f0-9]{2})+"\
r"(?=\)))|([A-Za-z][A-Za-z0-9\+\.\-]*:([\w\.\-_~:/\?#\[\]@!\$&'\(\)\*\+,;=]|%[A-Fa-f0-9]{2})+)"
#2nd one: at_least_one_char@at_least_one_char.at_least_one_char
mail = r'\bmailto:\S*[^\s\W]|' r'\b\S+@\S+\.\S*[^\s\W]'

View File

@ -962,11 +962,17 @@ def make_jabber_state_images():
'''initialise jabber_state_images dict'''
iconset = gajim.config.get('iconset')
if iconset:
path = os.path.join(helpers.get_iconset_path(iconset), '16x16')
if not os.path.exists(path):
if helpers.get_iconset_path(iconset):
path = os.path.join(helpers.get_iconset_path(iconset), '16x16')
if not os.path.exists(path):
iconset = gajim.config.DEFAULT_ICONSET
gajim.config.set('iconset', iconset)
else:
iconset = gajim.config.DEFAULT_ICONSET
gajim.config.set('iconset', iconset)
else:
iconset = gajim.config.DEFAULT_ICONSET
gajim.config.set('iconset', iconset)
path = os.path.join(helpers.get_iconset_path(iconset), '32x32')
gajim.interface.jabber_state_images['32'] = load_iconset(path)

View File

@ -24,6 +24,7 @@
import sys
from common import gajim
def device_now_active(self, *args):
'''For Network Manager 0.6'''
for connection in gajim.connections.itervalues():
@ -53,10 +54,15 @@ def state_changed(state):
supported = False
from common import dbus_support
if sys.platform == 'darwin':
supported = True
else:
try:
elif dbus_support.supported:
import dbus
import dbus.glib
try:
from common.dbus_support import system_bus
bus = system_bus.bus()
@ -71,8 +77,8 @@ else:
'org.freedesktop.NetworkManager',
'/org/freedesktop/NetworkManager')
supported = True
except Exception:
except dbus.DBusException:
try:
if 'org.freedesktop.NetworkManager' in bus.list_names():
supported = True