Hello community,

here is the log from the commit of package gajim for openSUSE:Factory checked 
in at 2015-09-30 05:52:43
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/gajim (Old)
 and      /work/SRC/openSUSE:Factory/.gajim.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "gajim"

Changes:
--------
--- /work/SRC/openSUSE:Factory/gajim/gajim.changes      2015-08-12 
15:14:21.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.gajim.new/gajim.changes 2015-09-30 
05:52:44.000000000 +0200
@@ -1,0 +2,8 @@
+Sun Sep 27 15:37:48 UTC 2015 - sor.ale...@meowr.ru
+
+- Update to 0.16.4:
+  * Fix trusting GPG keys.
+  * Ability to disable synchronisation of logs with server.
+  * Improve MAM usage.
+
+-------------------------------------------------------------------

Old:
----
  gajim-0.16.3.tar.gz

New:
----
  gajim-0.16.4.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ gajim.spec ++++++
--- /var/tmp/diff_new_pack.erDcrR/_old  2015-09-30 05:52:45.000000000 +0200
+++ /var/tmp/diff_new_pack.erDcrR/_new  2015-09-30 05:52:45.000000000 +0200
@@ -18,7 +18,7 @@
 
 %define _version 0.16
 Name:           gajim
-Version:        0.16.3
+Version:        0.16.4
 Release:        0
 Summary:        Full-featured XMPP client written in Python and Gtk2
 License:        GPL-3.0+

++++++ gajim-0.16.3.tar.gz -> gajim-0.16.4.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gajim-0.16.3/ChangeLog new/gajim-0.16.4/ChangeLog
--- old/gajim-0.16.3/ChangeLog  2015-07-31 14:27:49.000000000 +0200
+++ new/gajim-0.16.4/ChangeLog  2015-09-26 15:58:50.000000000 +0200
@@ -1,3 +1,9 @@
+Gajim 0.16.4 (26 September 2015)
+
+  * Fix trusting GPG keys
+  * Ability to disable synchronization of logs with server
+  * Improve MAM usage
+
 Gajim 0.16.3 (31 July 2015)
 
   * Fix reading secret file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gajim-0.16.3/autogen.sh new/gajim-0.16.4/autogen.sh
--- old/gajim-0.16.3/autogen.sh 2015-07-31 14:27:49.000000000 +0200
+++ new/gajim-0.16.4/autogen.sh 2015-09-26 15:58:50.000000000 +0200
@@ -1,5 +1,5 @@
 #!/usr/bin/env bash
-  gajimversion="0.16.3"
+  gajimversion="0.16.4"
   if [ -d ".hg" ]; then
     node=$(hg  tip --template "{node}")
     hgversion="-${node:0:12}"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gajim-0.16.3/configure new/gajim-0.16.4/configure
--- old/gajim-0.16.3/configure  2015-07-31 14:27:54.000000000 +0200
+++ new/gajim-0.16.4/configure  2015-09-26 15:58:56.000000000 +0200
@@ -590,7 +590,7 @@
 # Identity of this package.
 PACKAGE_NAME='Gajim - A Jabber Instant Messager'
 PACKAGE_TARNAME='gajim'
-PACKAGE_VERSION='0.16.3'
+PACKAGE_VERSION='0.16.4'
 PACKAGE_STRING='Gajim - A Jabber Instant Messager "version-set-in-hgversion"'
 PACKAGE_BUGREPORT='http://trac.gajim.org/'
 PACKAGE_URL=''
@@ -1585,7 +1585,7 @@
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-Gajim - A Jabber Instant Messager configure 0.16.3
+Gajim - A Jabber Instant Messager configure 0.16.4
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1954,7 +1954,7 @@
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by Gajim - A Jabber Instant Messager $as_me 0.16.3, which was
+It was created by Gajim - A Jabber Instant Messager $as_me 0.16.4, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -2823,7 +2823,7 @@
 
 # Define the identity of the package.
  PACKAGE='gajim'
- VERSION='0.16.3'
+ VERSION='0.16.4'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -15104,7 +15104,7 @@
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by Gajim - A Jabber Instant Messager $as_me 0.16.3, 
which was
+This file was extended by Gajim - A Jabber Instant Messager $as_me 0.16.4, 
which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -15170,7 +15170,7 @@
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; 
s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-Gajim - A Jabber Instant Messager config.status 0.16.3
+Gajim - A Jabber Instant Messager config.status 0.16.4
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gajim-0.16.3/data/gajim-history-manager.1 
new/gajim-0.16.4/data/gajim-history-manager.1
--- old/gajim-0.16.3/data/gajim-history-manager.1       2015-07-31 
14:27:49.000000000 +0200
+++ new/gajim-0.16.4/data/gajim-history-manager.1       2015-09-26 
15:58:50.000000000 +0200
@@ -1,4 +1,4 @@
-.Dd August 11, 2013
+.Dd August 26, 2015
 .Dt GAJIM-HISTORY-MANAGER 1 URM
 .Os UNIX
 .Sh NAME
@@ -27,7 +27,7 @@
 .El
 .Sh FILES
 .Bl -tag -width Ds
-.It ~/.local/share/gajim/logs.db
+.It $XDG_DATA_DIR/gajim/logs.db
 The history database log file used when
 .Op Fl c
 is not specified.
@@ -46,7 +46,7 @@
 .Pa THANKS ,
 for a complete list.
 .Sh COPYRIGHT
-Copyright (C) 2003-2013 Gajim Team
+Copyright (C) 2003-2015 Gajim Team
 .Pp
 .Nm
 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.
@@ -56,7 +56,7 @@
 .Pp
 You should have received a copy of the GNU General Public License along with
 .Nm .
-If not, see <http://www.gnu.org/licenses/>.
+If not, see <https://www.gnu.org/licenses/>.
 .Sh FEEDBACK
 You can report bugs or feature requests in our bug tracker at
 .Em trac.gajim.org
@@ -65,19 +65,19 @@
 mailing list; if you want to send us a patch, please do so in our bug tracker.
 You can also find us in our chat room.
 .Sh WWW
-http://www.gajim.org/
+https://www.gajim.org/
 .Sh XMPP
 You are welcome to join us at ga...@conference.gajim.org
 .Sh MAILING LIST
 Below are public mailing lists on lists.gajim.org
 .Bd -literal -offset indent
-http://lists.gajim.org/cgi-bin/listinfo/gajim-devel
-http://lists.gajim.org/cgi-bin/listinfo/translators
+https://lists.gajim.org/cgi-bin/listinfo/gajim-devel
+https://lists.gajim.org/cgi-bin/listinfo/translators
 .Ed
 .Pp
 More mailing lists at
 .Bd -literal -offset indent
-http://lists.gajim.org/cgi-bin/listinfo
+https://lists.gajim.org/cgi-bin/listinfo
 .Ed
 .Sh BUGS
 Please submit bugs at https://trac.gajim.org/
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gajim-0.16.3/data/gajim-remote.1 
new/gajim-0.16.4/data/gajim-remote.1
--- old/gajim-0.16.3/data/gajim-remote.1        2015-07-31 14:27:49.000000000 
+0200
+++ new/gajim-0.16.4/data/gajim-remote.1        2015-09-26 15:58:50.000000000 
+0200
@@ -1,4 +1,4 @@
-.Dd August 11, 2013
+.Dd August 26, 2015
 .Dt GAJIM-REMOTE 1 URM
 .Os UNIX
 .Sh NAME
@@ -99,7 +99,7 @@
 .Pa THANKS ,
 for a complete list.
 .Sh COPYRIGHT
-Copyright (C) 2003-2013 Gajim Team
+Copyright (C) 2003-2015 Gajim Team
 .Pp
 .Nm
 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.
@@ -109,7 +109,7 @@
 .Pp
 You should have received a copy of the GNU General Public License along with
 .Nm .
-If not, see <http://www.gnu.org/licenses/>.
+If not, see <https://www.gnu.org/licenses/>.
 .Sh FEEDBACK
 You can report bugs or feature requests in our bug tracker at
 .Em trac.gajim.org
@@ -118,19 +118,19 @@
 mailing list; if you want to send us a patch, please do so in our bug tracker.
 You can also find us in our chat room.
 .Sh WWW
-http://www.gajim.org/
+https://www.gajim.org/
 .Sh XMPP
 You are welcome to join us at ga...@conference.gajim.org
 .Sh MAILING LIST
 Below are public mailing lists on lists.gajim.org
 .Bd -literal -offset indent
-http://lists.gajim.org/cgi-bin/listinfo/gajim-devel
-http://lists.gajim.org/cgi-bin/listinfo/translators
+https://lists.gajim.org/cgi-bin/listinfo/gajim-devel
+https://lists.gajim.org/cgi-bin/listinfo/translators
 .Ed
 .Pp
 More mailing lists at
 .Bd -literal -offset indent
-http://lists.gajim.org/cgi-bin/listinfo
+https://lists.gajim.org/cgi-bin/listinfo
 .Ed
 .Sh BUGS
 Please submit bugs at https://trac.gajim.org/
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gajim-0.16.3/data/gajim.1 
new/gajim-0.16.4/data/gajim.1
--- old/gajim-0.16.3/data/gajim.1       2015-07-31 14:27:49.000000000 +0200
+++ new/gajim-0.16.4/data/gajim.1       2015-09-26 15:58:50.000000000 +0200
@@ -1,4 +1,4 @@
-.Dd August 11, 2013
+.Dd August 26, 2015
 .Dt GAJIM 1 URM
 .Os UNIX
 .Sh NAME
@@ -26,7 +26,7 @@
 technologies for instant messaging, presence, multi-party chat, voice
 and video calls, collaboration, lightweight middleware, content
 syndication, and generalized routing of XML data. For more information
-on the XMPP protocol see <http://xmpp.org/about-xmpp/>.
+on the XMPP protocol see <https://xmpp.org/about-xmpp/>.
 .Sh OPTIONS
 .Bl -tag -width Ds
 .It Fl h Fl Fl help
@@ -60,19 +60,19 @@
 .El
 .Sh FILES
 .Bl -tag -width Ds
-.It ~/.cache/gajim/cache.db
+.It $XDG_CACHE_DIR/gajim/cache.db
 Cache database file of transports, caps, roster entry, and roster group.
-.It ~/.cache/gajim/avatars/
+.It $XDG_CACHE_DIR/gajim/avatars/
 Cache directory of avatars.
-.It ~/.cache/gajim/vcards/
+.It $XDG_CACHE_DIR/gajim/vcards/
 Cache directory of vCards (virtual cards).
-.It ~/.config/gajim/
+.It $XDG_CONFIG_DIR/gajim/
 The config-path used when
 .Op Fl c
 is not specified.
-.It ~/.local/share/gajim/certs/
+.It $XDG_DATA_DIR/gajim/certs/
 Directory where certificates are stored.
-.It ~/.local/share/gajim/logs.db
+.It $XDG_DATA_DIR/gajim/logs.db
 The history database log file.
 For more information on database logs see 
<https://trac.gajim.org/wiki/LogsDatabase>.
 .El
@@ -90,7 +90,7 @@
 .Pa THANKS ,
 for a complete list.
 .Sh COPYRIGHT
-Copyright (C) 2003-2013 Gajim Team
+Copyright (C) 2003-2015 Gajim Team
 .Pp
 .Nm
 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.
@@ -100,7 +100,7 @@
 .Pp
 You should have received a copy of the GNU General Public License along with
 .Nm .
-If not, see <http://www.gnu.org/licenses/>.
+If not, see <https://www.gnu.org/licenses/>.
 .Sh FEEDBACK
 You can report bugs or feature requests in our bug tracker at
 .Em trac.gajim.org
@@ -109,26 +109,26 @@
 mailing list; if you want to send us a patch, please do so in our bug tracker.
 You can also find us in our chat room.
 .Sh WWW
-http://www.gajim.org/
+https://www.gajim.org/
 .Sh XMPP
 You are welcome to join us at ga...@conference.gajim.org
 .Sh MAILING LIST
 Below are public mailing lists on lists.gajim.org
 .Bd -literal -offset indent
-http://lists.gajim.org/cgi-bin/listinfo/gajim-devel
-http://lists.gajim.org/cgi-bin/listinfo/translators
+https://lists.gajim.org/cgi-bin/listinfo/gajim-devel
+https://lists.gajim.org/cgi-bin/listinfo/translators
 .Ed
 .Pp
 More mailing lists at
 .Bd -literal -offset indent
-http://lists.gajim.org/cgi-bin/listinfo
+https://lists.gajim.org/cgi-bin/listinfo
 .Ed
 .Sh BUGS
 Please submit bugs at
 .Bd -literal -offset indent
 https://trac.gajim.org/
-http://trac-plugins.gajim.org/
-http://python-nbxmpp.gajim.org/
+https://trac-plugins.gajim.org/
+https://python-nbxmpp.gajim.org/
 .Ed
 .Sh SEE ALSO
 .Xr gajim-remote 1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gajim-0.16.3/data/gui/accounts_window.ui 
new/gajim-0.16.4/data/gui/accounts_window.ui
--- old/gajim-0.16.3/data/gui/accounts_window.ui        2015-07-31 
14:27:49.000000000 +0200
+++ new/gajim-0.16.4/data/gui/accounts_window.ui        2015-09-26 
15:58:50.000000000 +0200
@@ -556,6 +556,23 @@
                               </packing>
                             </child>
                             <child>
+                              <object class="GtkCheckButton" 
id="sync_logs_with_server_checkbutton1">
+                                <property name="label" 
translatable="yes">Synchronize logs with server</property>
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property 
name="receives_default">False</property>
+                                <property name="use_underline">True</property>
+                                <property name="active">True</property>
+                                <property name="draw_indicator">True</property>
+                                <signal name="toggled" 
handler="on_sync_logs_with_server_checkbutton_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="sync_with_global_status_checkbutton1">
                                 <property name="label" 
translatable="yes">Synch_ronize account status with global status</property>
                                 <property name="visible">True</property>
@@ -569,7 +586,7 @@
                               <packing>
                                 <property name="expand">False</property>
                                 <property name="fill">False</property>
-                                <property name="position">3</property>
+                                <property name="position">4</property>
                               </packing>
                             </child>
                             <child>
@@ -585,7 +602,7 @@
                               <packing>
                                 <property name="expand">False</property>
                                 <property name="fill">False</property>
-                                <property name="position">4</property>
+                                <property name="position">5</property>
                               </packing>
                             </child>
                             <child>
@@ -602,7 +619,7 @@
                               <packing>
                                 <property name="expand">False</property>
                                 <property name="fill">False</property>
-                                <property name="position">5</property>
+                                <property name="position">6</property>
                               </packing>
                             </child>
                           </object>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gajim-0.16.3/gajim.nsi new/gajim-0.16.4/gajim.nsi
--- old/gajim-0.16.3/gajim.nsi  2015-07-31 14:27:49.000000000 +0200
+++ new/gajim-0.16.4/gajim.nsi  2015-09-26 15:58:51.000000000 +0200
@@ -156,6 +156,7 @@
 
        SetOutPath "$INSTDIR\bin"
        File "bin\_bsddb.pyd"
+    File "bin\_cffi_backend.pyd"
        File "bin\_ctypes.pyd"
        File "bin\_hashlib.pyd"
        File "bin\_socket.pyd"
@@ -171,6 +172,9 @@
        File "bin\Crypto.Random.OSRNG.winrandom.pyd"
        File "bin\Crypto.Util._counter.pyd"
        File "bin\Crypto.Util.strxor.pyd"
+    File "bin\cryptography.hazmat.bindings._constant_time.pyd"
+    File "bin\cryptography.hazmat.bindings._openssl.pyd"
+    File "bin\cryptography.hazmat.bindings._padding.pyd"
     File "bin\farstream.pyd"
        File "bin\gajim.exe"
        File "bin\gio._gio.pyd"
@@ -181,7 +185,6 @@
     File "bin\gst.interfaces.pyd"
        File "bin\gtk._gtk.pyd"
        File "bin\history_manager.exe"
-       File "bin\OpenSSL.crypto.pyd"
        File "bin\libeay32.dll"
        File "bin\libgoocanvas-3.dll"
        File "bin\library.zip"
@@ -194,11 +197,9 @@
        File "bin\python27.dll"
        File "bin\pythoncom27.dll"
        File "bin\pywintypes27.dll"
-       File "bin\OpenSSL.rand.pyd"
        File "bin\select.pyd"
        File "bin\sqlite3.dll"
        File "bin\ssleay32.dll"
-       File "bin\OpenSSL.SSL.pyd"
        File "bin\unicodedata.pyd"
        File "bin\win32api.pyd"
        File "bin\win32file.pyd"
@@ -212,7 +213,7 @@
        WriteRegStr HKLM 
"Software\Microsoft\Windows\CurrentVersion\Uninstall\Gajim" "DisplayName" 
"Gajim"
        WriteRegStr HKLM 
"Software\Microsoft\Windows\CurrentVersion\Uninstall\Gajim" "UninstallString" 
"$INSTDIR\Uninstall.exe"
        WriteRegStr HKLM 
"Software\Microsoft\Windows\CurrentVersion\Uninstall\Gajim" "DisplayIcon" 
"$INSTDIR\bin\Gajim.exe"
-       WriteRegStr HKLM 
"Software\Microsoft\Windows\CurrentVersion\Uninstall\Gajim" "DisplayVersion" 
"0.16.3"
+       WriteRegStr HKLM 
"Software\Microsoft\Windows\CurrentVersion\Uninstall\Gajim" "DisplayVersion" 
"0.16.4"
        WriteRegStr HKLM 
"Software\Microsoft\Windows\CurrentVersion\Uninstall\Gajim" "URLInfoAbout" 
"http://www.gajim.org/";
        WriteUninstaller "$INSTDIR\Uninstall.exe"
 
@@ -542,56 +543,6 @@
        RMDir /r "$INSTDIR\bin\gtk\share"
        RMDir "$INSTDIR\bin\gtk"
        RMDir "$INSTDIR\bin\win32com"
-       Delete "$INSTDIR\bin\_bsddb.pyd"
-       Delete "$INSTDIR\bin\_ctypes.pyd"
-       Delete "$INSTDIR\bin\_hashlib.pyd"
-       Delete "$INSTDIR\bin\_socket.pyd"
-       Delete "$INSTDIR\bin\_sqlite3.pyd"
-       Delete "$INSTDIR\bin\_ssl.pyd"
-       Delete "$INSTDIR\bin\atk.pyd"
-       Delete "$INSTDIR\bin\bz2.pyd"
-       Delete "$INSTDIR\bin\cairo._cairo.pyd"
-       Delete "$INSTDIR\bin\Crypto.Cipher._AES.pyd"
-    Delete "$INSTDIR\bin\Crypto.Cipher._DES.pyd"
-    Delete "$INSTDIR\bin\Crypto.Cipher._DES3.pyd"
-       Delete "$INSTDIR\bin\Crypto.Hash._SHA256.pyd"
-       Delete "$INSTDIR\bin\Crypto.Random.OSRNG.winrandom.pyd"
-       Delete "$INSTDIR\bin\Crypto.Util._counter.pyd"
-    Delete "$INSTDIR\bin\farstream.pyd"
-    Delete "$INSTDIR\bin\gajim.exe"
-       Delete "$INSTDIR\bin\gio._gio.pyd"
-       Delete "$INSTDIR\bin\glib._glib.pyd"
-       Delete "$INSTDIR\bin\gobject._gobject.pyd"
-       Delete "$INSTDIR\bin\goocanvas.pyd"
-       Delete "$INSTDIR\bin\gst._gst.pyd"
-    Delete "$INSTDIR\bin\gst.interfaces.pyd"
-       Delete "$INSTDIR\bin\gtk._gtk.pyd"
-       Delete "$INSTDIR\bin\history_manager.exe"
-       Delete "$INSTDIR\bin\libeay32.dll"
-       Delete "$INSTDIR\bin\libgoocanvas-3.dll"
-       Delete "$INSTDIR\bin\library.zip"
-       Delete "$INSTDIR\bin\libxml2mod.pyd"
-    Delete "$INSTDIR\bin\libxmlmods.libxml2mod.pyd"
-       Delete "$INSTDIR\bin\OpenSSL.crypto.pyd"
-       Delete "$INSTDIR\bin\OpenSSL.rand.pyd"
-       Delete "$INSTDIR\bin\OpenSSL.SSL.pyd"
-       Delete "$INSTDIR\bin\pango.pyd"
-       Delete "$INSTDIR\bin\pangocairo.pyd"
-       Delete "$INSTDIR\bin\pycurl.pyd"
-       Delete "$INSTDIR\bin\pyexpat.pyd"
-       Delete "$INSTDIR\bin\python27.dll"
-       Delete "$INSTDIR\bin\pythoncom27.dll"
-       Delete "$INSTDIR\bin\pywintypes27.dll"
-       Delete "$INSTDIR\bin\select.pyd"
-       Delete "$INSTDIR\bin\sqlite3.dll"
-       Delete "$INSTDIR\bin\ssleay32.dll"
-       Delete "$INSTDIR\bin\unicodedata.pyd"
-       Delete "$INSTDIR\bin\win32api.pyd"
-       Delete "$INSTDIR\bin\win32file.pyd"
-       Delete "$INSTDIR\bin\win32pipe.pyd"
-       Delete "$INSTDIR\bin\win32ui.pyd"
-       Delete "$INSTDIR\bin\winsound.pyd"
-       Delete "$INSTDIR\bin\msvcr90.dll"
        RMDir /r "$INSTDIR\bin"
        RMDir /r "$INSTDIR\data\gui"
        RMDir /r "$INSTDIR\data\moods"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gajim-0.16.3/m4/hgversion.m4 
new/gajim-0.16.4/m4/hgversion.m4
--- old/gajim-0.16.3/m4/hgversion.m4    2015-07-31 14:27:50.000000000 +0200
+++ new/gajim-0.16.4/m4/hgversion.m4    2015-09-26 15:58:52.000000000 +0200
@@ -1 +1 @@
-define([AC_PACKAGE_VERSION], [0.16.3])
+define([AC_PACKAGE_VERSION], [0.16.4])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gajim-0.16.3/setup_win32.py 
new/gajim-0.16.4/setup_win32.py
--- old/gajim-0.16.3/setup_win32.py     2015-07-31 14:27:50.000000000 +0200
+++ new/gajim-0.16.4/setup_win32.py     2015-09-26 15:58:52.000000000 +0200
@@ -35,6 +35,7 @@
             'goocanvas', 'Crypto.PublicKey.DSA', 'Crypto.Hash.HMAC',
             'numbers', 'win32com.client', 'win32com.server', 'HTMLParser'],
        'base': 'Win32GUI',
+       'packages': ['cffi', 'cryptography'],
           'bin_excludes': [
             'iconv.dll', 'intl.dll', 'libatk-1.0-0.dll',
             'libgdk_pixbuf-2.0-0.dll', 'libgdk-win32-2.0-0.dll',
@@ -56,7 +57,7 @@
 
 setup(
     name='Gajim',
-    version='0.16.3',
+    version='0.16.4',
     description='A full featured Jabber client',
     author='Gajim Development Team',
     url='http://gajim.org/',
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gajim-0.16.3/src/common/check_paths.py 
new/gajim-0.16.4/src/common/check_paths.py
--- old/gajim-0.16.3/src/common/check_paths.py  2015-07-31 14:27:50.000000000 
+0200
+++ new/gajim-0.16.4/src/common/check_paths.py  2015-09-26 15:58:52.000000000 
+0200
@@ -330,6 +330,8 @@
     check_and_possibly_move_config()
 
     if not os.path.exists(LOG_DB_PATH):
+        if os.path.exists(CACHE_DB_PATH):
+            os.remove(CACHE_DB_PATH)
         create_log_db()
         gajim.logger.init_vars()
     elif os.path.isdir(LOG_DB_PATH):
@@ -344,7 +346,7 @@
         print _('%s is a directory but should be a file') % CACHE_DB_PATH
         print _('Gajim will now exit')
         sys.exit()
-        
+
     if not os.path.exists(XTLS_CERTS):
         create_path(XTLS_CERTS)
     if not os.path.exists(LOCAL_XTLS_CERTS):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gajim-0.16.3/src/common/config.py 
new/gajim-0.16.4/src/common/config.py
--- old/gajim-0.16.3/src/common/config.py       2015-07-31 14:27:50.000000000 
+0200
+++ new/gajim-0.16.4/src/common/config.py       2015-09-26 15:58:52.000000000 
+0200
@@ -362,6 +362,7 @@
                     'custom_host': [ opt_str, '', '', True ],
                     'sync_with_global_status': [ opt_bool, False, ],
                     'no_log_for': [ opt_str, '', _('Space separated list of 
JIDs for which you do not want to store logs. You can also add account name to 
log nothing for this account.')],
+                    'sync_logs_with_server': [ opt_bool, True, _('Download 
logs stored on server on Gajim startup if server supports XEP-0136 or 
XEP-0313')],
                     'allow_no_log_for': [ opt_str, '', _('Space separated list 
of JIDs for which you accept to not log conversations if he does not want 
to.')],
                     'minimized_gc': [ opt_str, '' ],
                     'attached_gpg_keys': [ opt_str, '' ],
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gajim-0.16.3/src/common/connection.py 
new/gajim-0.16.4/src/common/connection.py
--- old/gajim-0.16.3/src/common/connection.py   2015-07-31 14:27:50.000000000 
+0200
+++ new/gajim-0.16.4/src/common/connection.py   2015-09-26 15:58:52.000000000 
+0200
@@ -425,7 +425,7 @@
 
         if msgenc:
             msg_iq.setTag(nbxmpp.NS_ENCRYPTED + ' x').setData(msgenc)
-            msg_iq.addChild(name='no-permanent-storage',
+            msg_iq.addChild(name='no-permanent-store',
                 namespace=nbxmpp.NS_MSG_HINTS)
 
         if form_node:
@@ -505,7 +505,7 @@
                     if self.carbons_enabled:
                         msg_iq.addChild(name='private',
                             namespace=nbxmpp.NS_CARBONS)
-                    msg_iq.addChild(name='no-permanent-storage',
+                    msg_iq.addChild(name='no-permanent-store',
                         namespace=nbxmpp.NS_MSG_HINTS)
                     msg_iq.addChild(name='no-copy',
                         namespace=nbxmpp.NS_MSG_HINTS)
@@ -817,6 +817,8 @@
             self._nec_message_outgoing)
         gajim.ged.register_event_handler('gc-message-outgoing', ged.OUT_CORE,
             self._nec_gc_message_outgoing)
+        gajim.ged.register_event_handler('stanza-message-outgoing',
+            ged.OUT_CORE, self._nec_stanza_message_outgoing)
     # END __init__
 
     def cleanup(self):
@@ -831,6 +833,8 @@
             self._nec_message_outgoing)
         gajim.ged.remove_event_handler('gc-message-outgoing', ged.OUT_CORE,
             self._nec_gc_message_outgoing)
+        gajim.ged.remove_event_handler('stanza-message-outgoing', ged.OUT_CORE,
+            self._nec_stanza_message_outgoing)
 
     def get_config_values_or_default(self):
         if gajim.config.get_per('accounts', self.name, 'keep_alives_enabled'):
@@ -2111,9 +2115,11 @@
         subject, type_, msg_iq, xhtml):
             if isinstance(msg_iq, list):
                 for iq in msg_iq:
-                    msg_id = self.connection.send(iq, now=obj.now)
+                    gajim.nec.push_incoming_event(StanzaMessageOutgoingEvent(
+                        None, conn=self, msg_iq=iq, now=obj.now))
             else:
-                msg_id = self.connection.send(msg_iq, now=obj.now)
+                gajim.nec.push_incoming_event(StanzaMessageOutgoingEvent(None,
+                    conn=self, msg_iq=msg_iq, now=obj.now))
             gajim.nec.push_incoming_event(MessageSentEvent(None, conn=self,
                 jid=jid, message=msg, keyID=keyID, chatstate=obj.chatstate))
             if obj.callback:
@@ -2139,6 +2145,11 @@
             delayed=obj.delayed, attention=obj.attention,
             correction_msg=obj.correction_msg, callback=cb)
 
+    def _nec_stanza_message_outgoing(self, obj):
+        if obj.conn.name != self.name:
+            return
+        obj.msg_id = self.connection.send(obj.msg_iq, now=obj.now)
+
     def send_contacts(self, contacts, fjid, type_='message'):
         """
         Send contacts with RosterX (Xep-0144)
@@ -2838,6 +2849,12 @@
         self.connection.send(iq)
 
     def get_password(self, callback, type_):
+        if gajim.config.get_per('accounts', self.name, 'anonymous_auth') and \
+        type_ != 'ANONYMOUS':
+            gajim.nec.push_incoming_event(NonAnonymousServerErrorEvent(None,
+                conn=self))
+            self._on_disconnected()
+            return
         self.pasword_callback = (callback, type_)
         if type_ == 'X-MESSENGER-OAUTH2':
             client_id = gajim.config.get_per('accounts', self.name,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gajim-0.16.3/src/common/connection_handlers.py 
new/gajim-0.16.4/src/common/connection_handlers.py
--- old/gajim-0.16.3/src/common/connection_handlers.py  2015-07-31 
14:27:50.000000000 +0200
+++ new/gajim-0.16.4/src/common/connection_handlers.py  2015-09-26 
15:58:52.000000000 +0200
@@ -894,6 +894,8 @@
             self._nec_gc_presence_received)
         gajim.ged.register_event_handler('message-received', ged.CORE,
             self._nec_message_received)
+        gajim.ged.register_event_handler('mam-message-received', ged.CORE,
+            self._nec_mam_message_received)
         gajim.ged.register_event_handler('decrypted-message-received', 
ged.CORE,
             self._nec_decrypted_message_received)
 
@@ -906,6 +908,8 @@
             self._nec_gc_presence_received)
         gajim.ged.remove_event_handler('message-received', ged.CORE,
             self._nec_message_received)
+        gajim.ged.remove_event_handler('mam-message-received', ged.CORE,
+            self._nec_mam_message_received)
         gajim.ged.remove_event_handler('decrypted-message-received', ged.CORE,
             self._nec_decrypted_message_received)
 
@@ -1118,14 +1122,46 @@
         gajim.nec.push_incoming_event(DecryptedMessageReceivedEvent(None,
             conn=self, msg_obj=obj))
 
+    def _nec_mam_message_received(self, obj):
+        if obj.conn.name != self.name:
+            return
+        if obj.enc_tag and self.USE_GPG:
+            encmsg = obj.enc_tag.getData()
+
+            keyID = gajim.config.get_per('accounts', self.name, 'keyid')
+            if keyID:
+                self.gpg_messages_to_decrypt.append([encmsg, keyID, obj])
+                if len(self.gpg_messages_to_decrypt) == 1:
+                    gajim.thread_interface(self.decrypt_thread, [encmsg, keyID,
+                        obj], self._on_mam_message_decrypted, [obj])
+                return
+        gajim.nec.push_incoming_event(MamDecryptedMessageReceivedEvent(None,
+            conn=self, msg_obj=obj))
+
     def _on_message_decrypted(self, output, obj):
         if len(self.gpg_messages_to_decrypt):
             encmsg, keyID, obj2 = self.gpg_messages_to_decrypt[0]
+            if type(obj2) == MessageReceivedEvent:
+                cb = self._on_message_decrypted
+            else:
+                cb = self._on_mam_message_decrypted
             gajim.thread_interface(self.decrypt_thread, [encmsg, keyID, obj2],
-                self._on_message_decrypted, [obj2])
+                cb, [obj2])
         gajim.nec.push_incoming_event(DecryptedMessageReceivedEvent(None,
             conn=self, msg_obj=obj))
 
+    def _on_mam_message_decrypted(self, output, obj):
+        if len(self.gpg_messages_to_decrypt):
+            encmsg, keyID, obj2 = self.gpg_messages_to_decrypt[0]
+            if type(obj2) == MessageReceivedEvent:
+                cb = self._on_message_decrypted
+            else:
+                cb = self._on_mam_message_decrypted
+            gajim.thread_interface(self.decrypt_thread, [encmsg, keyID, obj2],
+                cb, [obj2])
+        gajim.nec.push_incoming_event(MamDecryptedMessageReceivedEvent(None,
+            conn=self, msg_obj=obj))
+
     def _nec_decrypted_message_received(self, obj):
         if obj.conn.name != self.name:
             return
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/gajim-0.16.3/src/common/connection_handlers_events.py 
new/gajim-0.16.4/src/common/connection_handlers_events.py
--- old/gajim-0.16.3/src/common/connection_handlers_events.py   2015-07-31 
14:27:50.000000000 +0200
+++ new/gajim-0.16.4/src/common/connection_handlers_events.py   2015-09-26 
15:58:52.000000000 +0200
@@ -1011,6 +1011,77 @@
     name = 'before-change-show'
     base_network_events = []
 
+class MamMessageReceivedEvent(nec.NetworkIncomingEvent, HelperEvent):
+    name = 'mam-message-received'
+    base_network_events = []
+
+    def generate(self):
+        if not self.stanza:
+            return
+        account = self.conn.name
+        delay = self.stanza.getTag('delay', namespace=nbxmpp.NS_DELAY2)
+        if not delay:
+            return
+        tim = delay.getAttr('stamp')
+        tim = helpers.datetime_tuple(tim)
+        self.tim = localtime(timegm(tim))
+        self.msg_ = self.stanza.getTag('message')
+        to_ = self.msg_.getAttr('to')
+        if to_:
+            to_ = gajim.get_jid_without_resource(to_)
+        else:
+            to_ = gajim.get_jid_from_account(account)
+        frm_ = gajim.get_jid_without_resource(self.msg_.getAttr('from'))
+        self.msgtxt = self.msg_.getTagData('body')
+        if to_ == gajim.get_jid_from_account(account):
+            self.with_ = frm_
+            self.direction = 'from'
+            self.resource = gajim.get_resource_from_jid(
+                self.msg_.getAttr('from'))
+        else:
+            self.with_ = to_
+            self.direction = 'to'
+            self.resource = 
gajim.get_resource_from_jid(self.msg_.getAttr('to'))
+        self.enc_tag = self.msg_.getTag('x', namespace=nbxmpp.NS_ENCRYPTED)
+        return True
+
+class MamDecryptedMessageReceivedEvent(nec.NetworkIncomingEvent, HelperEvent):
+    name = 'mam-decrypted-message-received'
+    base_network_events = []
+
+    def generate(self):
+        self.nick = None
+        msg_ = self.msg_obj.msg_
+        self.with_ = self.msg_obj.with_
+        self.direction = self.msg_obj.direction
+        self.tim = self.msg_obj.tim
+        res = self.msg_obj.resource
+        self.msgtxt = self.msg_obj.msgtxt
+        is_pm = gajim.logger.jid_is_room_jid(self.with_)
+        if msg_.getAttr('type') == 'groupchat':
+            if is_pm == False:
+                log.warn('JID %s is marked as normal contact in database '
+                         'but we got a groupchat message from it.')
+                return
+            if is_pm == None:
+                gajim.logger.get_jid_id(self.with_, 'ROOM')
+            self.nick = res
+        else:
+            if is_pm == None:
+                # we don't know this JID, we need to disco it.
+                server = gajim.get_server_from_jid(self.with_)
+                if server not in self.conn.mam_awaiting_disco_result:
+                    self.conn.mam_awaiting_disco_result[server] = [
+                        [self.with_, self.direction, self.tim, self.msgtxt,
+                        res]]
+                    self.conn.discoverInfo(server)
+                else:
+                    self.conn.mam_awaiting_disco_result[server].append(
+                        [self.with_, self.direction, self.tim, self.msgtxt,
+                        res])
+                return
+        return True
+
 class MessageReceivedEvent(nec.NetworkIncomingEvent, HelperEvent):
     name = 'message-received'
     base_network_events = ['raw-message-received']
@@ -1092,55 +1163,8 @@
         result = self.stanza.getTag('result', namespace=nbxmpp.NS_MAM)
         if result:
             forwarded = result.getTag('forwarded', namespace=nbxmpp.NS_FORWARD)
-            if not forwarded:
-                return
-            delay = forwarded.getTag('delay', namespace=nbxmpp.NS_DELAY2)
-            if not delay:
-                return
-            tim = delay.getAttr('stamp')
-            tim = helpers.datetime_tuple(tim)
-            tim = localtime(timegm(tim))
-            msg_ = forwarded.getTag('message')
-            to_ = msg_.getAttr('to')
-            if to_:
-                to_ = gajim.get_jid_without_resource(to_)
-            else:
-                to_ = gajim.get_jid_from_account(account)
-            frm_ = gajim.get_jid_without_resource(msg_.getAttr('from'))
-            nick = None
-            msg_txt = msg_.getTagData('body')
-            if to_ == gajim.get_jid_from_account(account):
-                with_ = frm_
-                direction = 'from'
-                res = gajim.get_resource_from_jid(msg_.getAttr('from'))
-            else:
-                with_ = to_
-                direction = 'to'
-                res = gajim.get_resource_from_jid(msg_.getAttr('to'))
-            is_pm = gajim.logger.jid_is_room_jid(with_)
-            if msg_.getAttr('type') == 'groupchat':
-                if is_pm == False:
-                    log.warn('JID %s is marked as normal contact in database '
-                        'but we got a groupchat message from it.')
-                    return
-                if is_pm == None:
-                    gajim.logger.get_jid_id(with_, 'ROOM')
-                nick = res
-            else:
-                if is_pm == None:
-                    # we don't know this JID, we need to disco it.
-                    server = gajim.get_server_from_jid(with_)
-                    if server not in self.conn.mam_awaiting_disco_result:
-                        self.conn.mam_awaiting_disco_result[server] = [
-                            [with_, direction, tim, msg_txt, res]]
-                        self.conn.discoverInfo(server)
-                    else:
-                        self.conn.mam_awaiting_disco_result[server].append(
-                            [with_, direction, tim, msg_txt, res])
-                    return
-
-            gajim.logger.save_if_not_exists(with_, direction, tim,
-                msg=msg_txt, nick=nick)
+            gajim.nec.push_incoming_event(MamMessageReceivedEvent(None,
+                conn=self.conn, stanza=forwarded))
             return
 
         self.enc_tag = self.stanza.getTag('x', namespace=nbxmpp.NS_ENCRYPTED)
@@ -1922,6 +1946,10 @@
     name = 'privacy-list-active-default'
     base_network_events = []
 
+class NonAnonymousServerErrorEvent(nec.NetworkIncomingEvent):
+    name = 'non-anonymous-server-error'
+    base_network_events = []
+
 class VcardReceivedEvent(nec.NetworkIncomingEvent):
     name = 'vcard-received'
     base_network_events = []
@@ -2564,6 +2592,12 @@
     def generate(self):
         return True
 
+class StanzaMessageOutgoingEvent(nec.NetworkOutgoingEvent):
+    name='stanza-message-outgoing'
+    base_network_events = []
+
+    def generate(self):
+        return True
 
 class GcMessageOutgoingEvent(nec.NetworkOutgoingEvent):
     name = 'gc-message-outgoing'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gajim-0.16.3/src/common/defs.py 
new/gajim-0.16.4/src/common/defs.py
--- old/gajim-0.16.3/src/common/defs.py 2015-07-31 14:27:50.000000000 +0200
+++ new/gajim-0.16.4/src/common/defs.py 2015-09-26 15:58:52.000000000 +0200
@@ -27,7 +27,7 @@
 basedir   = '../'
 localedir = '../po'
 
-version = '0.16.3'
+version = '0.16.4'
 import subprocess
 try:
     node = subprocess.Popen('hg tip --template "{node|short}"', shell=True,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gajim-0.16.3/src/common/gpg.py 
new/gajim-0.16.4/src/common/gpg.py
--- old/gajim-0.16.3/src/common/gpg.py  2015-07-31 14:27:50.000000000 +0200
+++ new/gajim-0.16.4/src/common/gpg.py  2015-09-26 15:58:52.000000000 +0200
@@ -56,8 +56,7 @@
                         trust = False
             if not trust:
                 # check that we'll be able to encrypt
-                result = super(GnuPG, self).list_keys(recipients,
-                    keys=recipients)
+                result = super(GnuPG, self).list_keys(keys=recipients)
                 for key in result:
                     if key['trust'] not in ('f', 'u'):
                         return '', 'NOT_TRUSTED'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gajim-0.16.3/src/common/helpers.py 
new/gajim-0.16.4/src/common/helpers.py
--- old/gajim-0.16.3/src/common/helpers.py      2015-07-31 14:27:50.000000000 
+0200
+++ new/gajim-0.16.4/src/common/helpers.py      2015-09-26 15:58:52.000000000 
+0200
@@ -1459,9 +1459,11 @@
     """
     Download an image. This function should be launched in a separated thread.
     """
-    mem, alt = '', ''
-    # Wait maximum 5s for connection
-    socket.setdefaulttimeout(5)
+    mem, alt, max_size = '', '', 2*1024*1024
+    if 'max_size' in attrs:
+        max_size = attrs['max_size']
+    # Wait maximum 10s for connection
+    socket.setdefaulttimeout(10)
     try:
         req = urllib2.Request(attrs['src'])
         req.add_header('User-Agent', 'Gajim ' + gajim.version)
@@ -1471,13 +1473,13 @@
         pixbuf = None
         alt = attrs.get('alt', 'Broken image')
     else:
-        # Wait 0.5s between each byte
+        # Wait 2s between each byte
         try:
-            f.fp._sock.fp._sock.settimeout(0.5)
+            f.fp._sock.fp._sock.settimeout(2)
         except Exception:
             pass
-        # Max image size = 2 MB (to try to prevent DoS)
-        deadline = time.time() + 3
+        # On a slow internet connection with ~1000kbps you need ~10 seconds 
for 1 MB
+        deadline = time.time() + (10 * (max_size / 1048576))
         while True:
             if time.time() > deadline:
                 log.debug('Timeout loading image %s ' % attrs['src'])
@@ -1500,7 +1502,7 @@
                 mem += temp
             else:
                 break
-            if len(mem) > 2*1024*1024:
+            if len(mem) > max_size:
                 alt = attrs.get('alt', '')
                 if alt:
                     alt += '\n'
@@ -1515,15 +1517,19 @@
     """
     if not gajim.HAVE_PYCURL:
         return '', _('PyCURL is not installed')
-    mem, alt = '', ''
+    mem, alt, max_size = '', '', 2*1024*1024
+    if 'max_size' in attrs:
+        max_size = attrs['max_size']
     try:
         b = StringIO()
         c = pycurl.Curl()
         c.setopt(pycurl.URL, attrs['src'].encode('utf-8'))
         c.setopt(pycurl.FOLLOWLOCATION, 1)
-        c.setopt(pycurl.CONNECTTIMEOUT, 5)
-        c.setopt(pycurl.TIMEOUT, 10)
-        c.setopt(pycurl.MAXFILESIZE, 2000000)
+        # Wait maximum 10s for connection
+        c.setopt(pycurl.CONNECTTIMEOUT, 10)
+        # On a slow internet connection with ~1000kbps you need ~10 seconds 
for 1 MB
+        c.setopt(pycurl.TIMEOUT, 10 * (max_size / 1048576))
+        c.setopt(pycurl.MAXFILESIZE, max_size)
         c.setopt(pycurl.WRITEFUNCTION, b.write)
         c.setopt(pycurl.USERAGENT, 'Gajim ' + gajim.version)
         # set proxy
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gajim-0.16.3/src/common/logger.py 
new/gajim-0.16.4/src/common/logger.py
--- old/gajim-0.16.3/src/common/logger.py       2015-07-31 14:27:50.000000000 
+0200
+++ new/gajim-0.16.4/src/common/logger.py       2015-09-26 15:58:52.000000000 
+0200
@@ -1103,21 +1103,22 @@
             time_col = int(float(time.mktime(tim)))
         else:
             time_col = int(float(time.time()))
-        if msg:
-            if self.jid_is_from_pm(with_) or nick:
-                # It's a groupchat message
-                if nick:
-                    # It's a message from a groupchat occupent
-                    type_ = 'gc_msg'
-                    with_ = with_ + '/' + nick
-                else:
-                    # It's a server message message, we don't log them
-                    return
+        if not msg:
+            return
+        if self.jid_is_from_pm(with_) or nick:
+            # It's a groupchat message
+            if nick:
+                # It's a message from a groupchat occupent
+                type_ = 'gc_msg'
+                with_ = with_ + '/' + nick
             else:
-                if direction == 'from':
-                    type_ = 'chat_msg_recv'
-                elif direction == 'to':
-                    type_ = 'chat_msg_sent'
+                # It's a server message message, we don't log them
+                return
+        else:
+            if direction == 'from':
+                type_ = 'chat_msg_recv'
+            elif direction == 'to':
+                type_ = 'chat_msg_sent'
         jid_id = self.get_jid_id(with_)
         where_sql = 'jid_id = %s AND message=?' % jid_id
         if type_ == 'gc_msg':
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gajim-0.16.3/src/common/message_archiving.py 
new/gajim-0.16.4/src/common/message_archiving.py
--- old/gajim-0.16.3/src/common/message_archiving.py    2015-07-31 
14:27:50.000000000 +0200
+++ new/gajim-0.16.4/src/common/message_archiving.py    2015-09-26 
15:58:52.000000000 +0200
@@ -47,10 +47,18 @@
             self._nec_agent_info_error)
         gajim.ged.register_event_handler('agent-info-received', ged.CORE,
             self._nec_agent_info)
+        gajim.ged.register_event_handler('mam-decrypted-message-received',
+            ged.CORE, self._nec_mam_decrypted_message_received)
 
     def cleanup(self):
         gajim.ged.remove_event_handler('raw-message-received', ged.CORE,
             self._nec_raw_message_313_received)
+        gajim.ged.remove_event_handler('agent-info-error-received', ged.CORE,
+            self._nec_agent_info_error)
+        gajim.ged.remove_event_handler('agent-info-received', ged.CORE,
+            self._nec_agent_info)
+        gajim.ged.remove_event_handler('mam-decrypted-message-received',
+            ged.CORE, self._nec_mam_decrypted_message_received)
 
     def _nec_agent_info_error(self, obj):
         if obj.jid in self.mam_awaiting_disco_result:
@@ -81,7 +89,7 @@
         if obj.conn.name != self.name:
             return
 
-        fin_ = obj.stanza.getTag('fin', namespace=nbxmpp.NS_MAM) 
+        fin_ = obj.stanza.getTag('fin', namespace=nbxmpp.NS_MAM)
         if fin_:
             queryid_ = fin_.getAttr('queryid')
             if queryid_ not in self.awaiting_answers:
@@ -99,11 +107,17 @@
 
             del self.awaiting_answers[queryid_]
 
+    def _nec_mam_decrypted_message_received(self, obj):
+        if obj.conn.name != self.name:
+            return
+        gajim.logger.save_if_not_exists(obj.with_, obj.direction, obj.tim,
+            msg=obj.msgtxt, nick=obj.nick)
+
     def request_archive(self, start=None, end=None, with_=None, after=None,
     max=30):
         iq_ = nbxmpp.Iq('set')
         query = iq_.addChild('query', namespace=nbxmpp.NS_MAM)
-        x = query.addChild('x', namespace=nbxmpp.NS_DATA)
+        x = query.addChild(node=nbxmpp.DataForm(typ='submit'))
         x.addChild(node=nbxmpp.DataField(typ='hidden', name='FORM_TYPE', 
value=nbxmpp.NS_MAM))
         if start:
             x.addChild(node=nbxmpp.DataField(typ='text-single', name='start', 
value=start))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gajim-0.16.3/src/common/optparser.py 
new/gajim-0.16.4/src/common/optparser.py
--- old/gajim-0.16.3/src/common/optparser.py    2015-07-31 14:27:50.000000000 
+0200
+++ new/gajim-0.16.4/src/common/optparser.py    2015-09-26 15:58:52.000000000 
+0200
@@ -43,7 +43,7 @@
 
 class OptionsParser:
     def __init__(self, filename):
-        self.__filename = filename
+        self.__filename = os.path.realpath(filename)
         self.old_values = {}    # values that are saved in the file and maybe
                                                         # no longer valid
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gajim-0.16.3/src/config.py 
new/gajim-0.16.4/src/config.py
--- old/gajim-0.16.3/src/config.py      2015-07-31 14:27:50.000000000 +0200
+++ new/gajim-0.16.4/src/config.py      2015-09-26 15:58:52.000000000 +0200
@@ -1963,6 +1963,8 @@
         else:
             self.xml.get_object('log_history_checkbutton1').set_active(True)
 
+        self.xml.get_object('sync_logs_with_server_checkbutton1').set_active(
+            gajim.config.get_per('accounts', account, 'sync_logs_with_server'))
         self.xml.get_object('sync_with_global_status_checkbutton1').set_active(
             gajim.config.get_per('accounts', account,
             'sync_with_global_status'))
@@ -2318,6 +2320,12 @@
         gajim.config.set_per('accounts', self.current_account, 'no_log_for',
             ' '.join(list_no_log_for))
 
+    def on_sync_logs_with_server_checkbutton_toggled(self, widget):
+        if self.ignore_events:
+            return
+        self.on_checkbutton_toggled(widget, 'sync_logs_with_server',
+            account=self.current_account)
+
     def on_sync_with_global_status_checkbutton_toggled(self, widget):
         if self.ignore_events:
             return
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gajim-0.16.3/src/conversation_textview.py 
new/gajim-0.16.4/src/conversation_textview.py
--- old/gajim-0.16.3/src/conversation_textview.py       2015-07-31 
14:27:50.000000000 +0200
+++ new/gajim-0.16.4/src/conversation_textview.py       2015-09-26 
15:58:52.000000000 +0200
@@ -122,6 +122,11 @@
         if not parent:
             self._disconnect_signals()
             return
+        if isinstance(parent, gtk.EventBox):
+            parent = parent.get_parent()
+            if not parent:
+                self._disconnect_signals()
+                return
 
         self._do_connect(parent, 'style-set', self.do_queue_draw)
         self._do_connect(parent, 'focus-in-event', self.do_queue_draw)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gajim-0.16.3/src/gui_interface.py 
new/gajim-0.16.4/src/gui_interface.py
--- old/gajim-0.16.3/src/gui_interface.py       2015-07-31 14:27:50.000000000 
+0200
+++ new/gajim-0.16.4/src/gui_interface.py       2015-09-26 15:58:52.000000000 
+0200
@@ -1138,13 +1138,15 @@
             # Else disable autoaway
             gajim.sleeper_state[account] = 'off'
 
-        if obj.conn.archiving_136_supported:
+        if obj.conn.archiving_136_supported and 
gajim.config.get_per('accounts',
+        account, 'sync_logs_with_server'):
             # Start merging logs from server
             
obj.conn.request_modifications_page(gajim.config.get_per('accounts',
                 account, 'last_archiving_time'))
             gajim.config.set_per('accounts', account, 'last_archiving_time',
                 time.strftime('%Y-%m-%dT%H:%M:%SZ', time.gmtime()))
-        if obj.conn.archiving_313_supported:
+        if obj.conn.archiving_313_supported and 
gajim.config.get_per('accounts',
+        account, 'sync_logs_with_server'):
             mam_id = gajim.config.get_per('accounts', account, 'last_mam_id')
             if mam_id:
                 obj.conn.request_archive(after=mam_id)
@@ -1370,6 +1372,13 @@
         self.instances[account]['online_dialog']['ssl_error'].set_title(
             _('SSL Certificate Verification for %s') % account)
 
+    def handle_event_non_anonymous_server(self, obj):
+        account = obj.conn.name
+        server = gajim.config.get_per('accounts', account, 'hostname')
+        dialogs.ErrorDialog(_('Non Anonymous Server'), sectext='Server "%s"'
+            'does not support anonymous connection' % server,
+            transient_for=self.roster.window)
+
     def handle_event_fingerprint_error(self, obj):
         # ('FINGERPRINT_ERROR', account, (new_fingerprint,))
         account = obj.conn.name
@@ -1566,6 +1575,7 @@
                 [self.handle_event_roster_item_exchange],
             'signed-in': [self.handle_event_signed_in],
             'ssl-error': [self.handle_event_ssl_error],
+            'non-anonymous-server-error': 
[self.handle_event_non_anonymous_server],
             'stream-conflict-received': [self.handle_event_resource_conflict],
             'subscribe-presence-received': [
                 self.handle_event_subscribe_presence],
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gajim-0.16.3/src/secrets.py 
new/gajim-0.16.4/src/secrets.py
--- old/gajim-0.16.3/src/secrets.py     2015-07-31 14:27:50.000000000 +0200
+++ new/gajim-0.16.4/src/secrets.py     2015-09-26 15:58:52.000000000 +0200
@@ -96,7 +96,7 @@
 
 def load_secrets(filename):
     global Secrets
-    f = open(filename, 'rb')
+    f = open(filename, 'r')
 
     try:
         secrets = pickle.load(f)


Reply via email to