Philipp Hörist pushed to branch master at gajim / gajim
Commits:
45e3139b by Philipp Hörist at 2018-01-20T23:21:39+01:00
Improve speed of Windows client
This calls on each mainloop cylce select.select() instead of every
20 ms.
- - - - -
1 changed file:
- gajim/gui_interface.py
Changes:
=====================================
gajim/gui_interface.py
=====================================
--- a/gajim/gui_interface.py
+++ b/gajim/gui_interface.py
@@ -2342,10 +2342,14 @@ class Interface:
# Otherwise, an exception will stop our loop
if sys.platform == 'win32':
- timeout, in_seconds = 20, None
- else:
- timeout, in_seconds = app.idlequeue.PROCESS_TIMEOUT
+ # On Windows process() calls select.select(), so we need this
+ # executed on each mainloop cycle
+ # On Linux only timeouts are checked in process(), so we use
+ # a timeout
+ GLib.idle_add(self.process_connections)
+ raise
+ timeout, in_seconds = app.idlequeue.PROCESS_TIMEOUT
if in_seconds:
GLib.timeout_add_seconds(timeout, self.process_connections)
else:
@@ -2632,15 +2636,16 @@ class Interface:
self.instances['file_transfers'] = dialogs.FileTransfersWindow()
GLib.timeout_add(100, self.autoconnect)
+
if sys.platform == 'win32':
- timeout, in_seconds = 20, None
+ GLib.idle_add(self.process_connections)
else:
timeout, in_seconds = app.idlequeue.PROCESS_TIMEOUT
+ if in_seconds:
+ GLib.timeout_add_seconds(timeout, self.process_connections)
+ else:
+ GLib.timeout_add(self.process_connections)
- if in_seconds:
- GLib.timeout_add_seconds(timeout, self.process_connections)
- else:
- GLib.timeout_add(timeout, self.process_connections)
GLib.timeout_add_seconds(app.config.get(
'check_idle_every_foo_seconds'), self.read_sleepy)
View it on GitLab: https://dev.gajim.org/gajim/gajim/commit/45e3139bd0a224e2a34f133849309afaab…
---
View it on GitLab: https://dev.gajim.org/gajim/gajim/commit/45e3139bd0a224e2a34f133849309afaab…
You're receiving this email because of your account on dev.gajim.org.
Philipp Hörist pushed to branch master at gajim / python-nbxmpp
Commits:
982cac79 by Philipp Hörist at 2018-01-20T18:35:13+01:00
Set SNI EXT when using DirectTLS
See XEP-0368
- - - - -
1 changed file:
- nbxmpp/tls_nb.py
Changes:
=====================================
nbxmpp/tls_nb.py
=====================================
--- a/nbxmpp/tls_nb.py
+++ b/nbxmpp/tls_nb.py
@@ -377,7 +377,7 @@ class NonBlockingTLS(PlugIn):
except AttributeError as e:
# py-OpenSSL < 0.9 or old OpenSSL
flags |= 16384
-
+
if self.alpn:
# XEP-0368 set ALPN Protocol
tcpsock._sslContext.set_alpn_protos([b'xmpp-client'])
@@ -453,6 +453,11 @@ class NonBlockingTLS(PlugIn):
tcpsock._sslObj = OpenSSL.SSL.Connection(tcpsock._sslContext,
tcpsock._sock)
tcpsock._sslObj.set_connect_state() # set to client mode
+
+ if self.alpn:
+ # Set SNI EXT on the SSL Connection object, see XEP-0368
+ tcpsock._sslObj.set_tlsext_host_name(tcpsock._owner.Server.encode())
+
wrapper = PyOpenSSLWrapper(tcpsock._sslObj)
tcpsock._recv = wrapper.recv
tcpsock._send = wrapper.send
View it on GitLab: https://dev.gajim.org/gajim/python-nbxmpp/commit/982cac796f3fa227c76ddb0d3e…
---
View it on GitLab: https://dev.gajim.org/gajim/python-nbxmpp/commit/982cac796f3fa227c76ddb0d3e…
You're receiving this email because of your account on dev.gajim.org.
Philipp Hörist pushed to branch master at gajim / gajim
Commits:
c473fa61 by André Apitzsch at 2018-01-19T01:52:58+01:00
location_listener: location update notifier requires three parameters
the third parameter contains the location parameter specification
- - - - -
b2269924 by Philipp Hörist at 2018-01-19T07:55:02+01:00
Merge branch 'fixLocation' into 'master'
location_listener: location update notifier requires three parameters
Closes #8856
See merge request gajim/gajim!194
- - - - -
1 changed file:
- gajim/common/location_listener.py
Changes:
=====================================
gajim/common/location_listener.py
=====================================
--- a/gajim/common/location_listener.py
+++ b/gajim/common/location_listener.py
@@ -43,7 +43,9 @@ class LocationListener:
def __init__(self):
self._data = {}
- def _on_location_update(self, simple):
+ # Note: do not remove third parameter `paramSpec`
+ # because notify signal expects three parameters
+ def _on_location_update(self, simple, paramSpec=None):
location = simple.get_location()
timestamp = location.get_property("timestamp")[0]
lat = location.get_property("latitude")
View it on GitLab: https://dev.gajim.org/gajim/gajim/compare/1605b722b71bd3e126396e4a9e15bae1d…
---
View it on GitLab: https://dev.gajim.org/gajim/gajim/compare/1605b722b71bd3e126396e4a9e15bae1d…
You're receiving this email because of your account on dev.gajim.org.
Philipp Hörist pushed to branch master at gajim / gajim
Commits:
52482ec7 by Matthew W. S. Bell at 2018-01-18T18:23:00+01:00
Use with_unix_fd_list variant of DBus method call.
Any returned 'h' type argument is intended to be an index into a
unix fd list structure obtained separately. Such a unix fd list, in
python, will manage and close any contained fds as a whole, or fds may
be retrieved, managed, and closed individually, as is done in this
patch.
Also, use None instead of -1 because python.
This patch means gajim keeps its supsend inhibitor open and stops it
closing stdin on suspend.
Fixes #8852
- - - - -
1 changed file:
- gajim/logind_listener.py
Changes:
=====================================
gajim/logind_listener.py
=====================================
--- a/gajim/logind_listener.py
+++ b/gajim/logind_listener.py
@@ -33,7 +33,7 @@ log = logging.getLogger('gajim.logind_listener')
# file descriptor of the inhibitor; negative number means we don't
# hold any (yet)
-fd = -1
+fd = None
def signal_received(connection, sender_name, object_path,
@@ -61,9 +61,9 @@ def signal_received(connection, sender_name, object_path,
conn.time_to_reconnect = 5
# close the file descriptor and let the computer suspend
- if fd >= 0:
+ if fd is not None:
os.close(fd)
- fd = -1
+ fd = None
else:
# something is wrong, the system is suspending but we don't have
# a lock file
@@ -76,23 +76,23 @@ def get_inhibitor(connection):
global fd
- if fd >= 0:
+ if fd is not None:
# someting is wrong, we haven't closed the previous file descriptor
# and we ask for yet another one
log.warning('We are about to ask for a sleep inhibitor, but we seem '
'to be holding one already')
- ret = connection.call_sync(
+ ret = connection.call_with_unix_fd_list_sync(
'org.freedesktop.login1',
'/org/freedesktop/login1',
'org.freedesktop.login1.Manager',
'Inhibit',
GLib.Variant('(ssss)', ('sleep', 'org.gajim.Gajim',
'Disconnect from the network', 'delay')),
- None,
- Gio.DBusCallFlags.NONE, -1, None)
+ GLib.VariantType.new('(h)'),
+ Gio.DBusCallFlags.NONE, -1, None, None)
- fd = ret[0]
+ fd = ret.out_fd_list.get(ret[0])
def appeared(connection, name, name_owner, *user_data):
View it on GitLab: https://dev.gajim.org/gajim/gajim/commit/52482ec70d0feaa0a9a56cff8b6e504f4a…
---
View it on GitLab: https://dev.gajim.org/gajim/gajim/commit/52482ec70d0feaa0a9a56cff8b6e504f4a…
You're receiving this email because of your account on dev.gajim.org.
Yann Leboulanger pushed to branch master at gajim / gajim
Commits:
dcfa2526 by Daniel at 2018-01-17T21:15:14+01:00
Fix accidently translated strings
- - - - -
513bffd4 by Yann Leboulanger at 2018-01-17T21:45:45+01:00
Merge branch 'fix-translation' into 'master'
Fix accidently translated strings
See merge request gajim/gajim!191
- - - - -
1 changed file:
- gajim/data/gui/roster_item_exchange_window.ui
Changes:
=====================================
gajim/data/gui/roster_item_exchange_window.ui
=====================================
--- a/gajim/data/gui/roster_item_exchange_window.ui
+++ b/gajim/data/gui/roster_item_exchange_window.ui
@@ -18,7 +18,8 @@
<object class="GtkLabel" id="type_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes"><b>someone(a)somewhere.com</b> would like you to <b>add</b> some contacts in your roster.</property>
+ <!-- This line does not need translation -->
+ <property name="label"><b>someone(a)somewhere.com</b> would like you to <b>add</b> some contacts in your roster.</property>
<property name="use_markup">True</property>
<property name="justify">center</property>
<property name="selectable">True</property>
View it on GitLab: https://dev.gajim.org/gajim/gajim/compare/8b705bb98f0bc46674e3bc855056bee9f…
---
View it on GitLab: https://dev.gajim.org/gajim/gajim/compare/8b705bb98f0bc46674e3bc855056bee9f…
You're receiving this email because of your account on dev.gajim.org.
Philipp Hörist pushed to branch master at gajim / gajim
Commits:
8b705bb9 by Philipp Hörist at 2018-01-17T18:50:16+01:00
Use pillow 4.3.0 for dev_env setup
Higher pillow versions currently fail to install in msys2
- - - - -
1 changed file:
- win/dev_env.sh
Changes:
=====================================
win/dev_env.sh
=====================================
--- a/win/dev_env.sh
+++ b/win/dev_env.sh
@@ -30,7 +30,7 @@ python-gnupg
docutils
qrcode
keyring
-pillow
+pillow==4.3.0
"
pip3 install --no-binary ":all:" \
View it on GitLab: https://dev.gajim.org/gajim/gajim/commit/8b705bb98f0bc46674e3bc855056bee9fb…
---
View it on GitLab: https://dev.gajim.org/gajim/gajim/commit/8b705bb98f0bc46674e3bc855056bee9fb…
You're receiving this email because of your account on dev.gajim.org.