From 66f712ae17343102eb9ebab46b91560fd1da5ef5 Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Wed, 27 May 2009 09:43:44 +0200 Subject: [PATCH 1/8] no need of IF NOT EXISTS when creating the database --- src/common/check_paths.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/check_paths.py b/src/common/check_paths.py index 8b24cccb9..3a539e85e 100644 --- a/src/common/check_paths.py +++ b/src/common/check_paths.py @@ -92,7 +92,7 @@ def create_log_db(): hash TEXT, data BLOB); - CREATE TABLE IF NOT EXISTS rooms_last_message_time( + CREATE TABLE rooms_last_message_time( jid_id INTEGER PRIMARY KEY UNIQUE, time INTEGER ); From 5da72ae74306361f83cd5a8bcd43fd16123ce673 Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Sun, 7 Jun 2009 20:46:39 +0200 Subject: [PATCH 2/8] don't require libdbus-1-dev to have gajim-remote. All distribution have libdbus > 0.60 now. Fizes #2992 --- Makefile.am | 9 +-------- README.html | 3 +-- configure.ac | 22 ---------------------- 3 files changed, 2 insertions(+), 32 deletions(-) diff --git a/Makefile.am b/Makefile.am index 6d7c3dcb1..9140f24f9 100644 --- a/Makefile.am +++ b/Makefile.am @@ -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 \ diff --git a/README.html b/README.html index b06d01061..3ddfa08d5 100644 --- a/README.html +++ b/README.html @@ -37,7 +37,7 @@ Gajim is a GTK+ app that loves GNOME. You can do 'make' so you don't require gno
  • GnomePythonExtras 2.10 or above (aka gnome-python-desktop) so you can avoid compiling trayicon and gtkspell
  • gnome-python-desktop (for GnomeKeyring support)
  • notification-daemon or notify-python (and D-Bus) to get cooler popups
  • -
  • D-Bus running to have gajim-remote working. Some distributions split dbus-x11, which is needed for dbus to work with Gajim.
  • +
  • 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.
  • python-dbus bindings
  • python-sexy to have clickable URLs in chat windows
  • python-kerberos to use GSSAPI authentification. Note: version1.1 or higher is required
  • @@ -55,7 +55,6 @@ the xml lib that *comes* with python and not pyxml or whatever.
  • python-gtk2-dev
  • libgtk2.0-dev aka. gtk2-devel
  • libgtkspell-dev (for the gtkspell module)
  • -
  • libdbus-1-dev (for the remote control module)
  • intltool (>= 0.40.1)
  • diff --git a/configure.ac b/configure.ac index b4e09eeb0..b6b63c166 100644 --- a/configure.ac +++ b/configure.ac @@ -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} From b583fa2479691af7e603665c4f5d3a36cb688fbd Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Sun, 7 Jun 2009 20:59:04 +0200 Subject: [PATCH 3/8] fix missing import in trunk. Fixes #5078 --- src/chat_control.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/chat_control.py b/src/chat_control.py index 533ef9f4f..1ac46edd1 100644 --- a/src/chat_control.py +++ b/src/chat_control.py @@ -2501,8 +2501,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 From c576e19f88411c720b347a65ee3be921ea1c2aaa Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Wed, 10 Jun 2009 09:33:21 +0200 Subject: [PATCH 4/8] don't translate ipython_view.py. It's only for developers. Fixes #4613 --- po/POTFILES.skip | 1 + 1 file changed, 1 insertion(+) diff --git a/po/POTFILES.skip b/po/POTFILES.skip index c7bedf35f..26c1c02d1 100644 --- a/po/POTFILES.skip +++ b/po/POTFILES.skip @@ -1,2 +1,3 @@ data/gajim.desktop.in src/eggtrayicon.c +src/ipython_view.py From 0ed983bd87b09663be5bf0de5b7b01cce9866dc2 Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Wed, 10 Jun 2009 09:47:06 +0200 Subject: [PATCH 5/8] we always build gajim-remote, so always built manpage for gajim-remote --- data/Makefile.am | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/data/Makefile.am b/data/Makefile.am index 806a1c008..541dcc85e 100644 --- a/data/Makefile.am +++ b/data/Makefile.am @@ -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) \ From e8b0090e9e593f1d64ee31d76e1d5f3557cee405 Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Wed, 10 Jun 2009 11:44:58 +0200 Subject: [PATCH 6/8] set iconset to DEFAULT_ICONSET when configured one doesn't exist. Fixes #5083 --- src/gtkgui_helpers.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/gtkgui_helpers.py b/src/gtkgui_helpers.py index 3983b6aba..78de6a79d 100644 --- a/src/gtkgui_helpers.py +++ b/src/gtkgui_helpers.py @@ -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) From 19a0f91bfc4d4bbfcedee8ee8315050ab30df822 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Bili=C5=84ski?= Date: Fri, 12 Jun 2009 01:50:43 +0200 Subject: [PATCH 7/8] Unicode characters are detected properly as part of URLs now. Fixes 4522. --- src/gajim.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gajim.py b/src/gajim.py index dbb51e205..6ef6ff830 100644 --- a/src/gajim.py +++ b/src/gajim.py @@ -2587,8 +2587,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]' From 5026aa96555c7465239a0535233ec809900f3e82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Bili=C5=84ski?= Date: Sat, 13 Jun 2009 20:31:40 +0200 Subject: [PATCH 8/8] Fixes #4536. NM 0.7 was never used because NameError for 'dbus' object was raised. Changed 'exception Exception' to catch only 'DBusException' from bus.get_object() method. --- src/network_manager_listener.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/network_manager_listener.py b/src/network_manager_listener.py index f8215e8f5..80c2cf86a 100644 --- a/src/network_manager_listener.py +++ b/src/network_manager_listener.py @@ -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