Philipp Hörist pushed to branch master at gajim / gajim
Commits:
7d5ee612 by lovetox at 2020-04-26T20:49:11+02:00
Roster: Fix comment
- - - - -
1 changed file:
- gajim/roster_window.py
Changes:
=====================================
gajim/roster_window.py
=====================================
@@ -2257,7 +2257,7 @@ class RosterWindow:
liststore = self.status_combobox.get_model()
# Check if a desync'ed status entry and separator is currently
- # in the liststore remove it.
+ # in the liststore and remove it.
while len(liststore) > 9:
titer = liststore.get_iter_first()
liststore.remove(titer)
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/7d5ee6122e8618cdda52067f78accde5…
--
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/7d5ee6122e8618cdda52067f78accde5…
You're receiving this email because of your account on dev.gajim.org.
Philipp Hörist pushed to branch master at gajim / gajim
Commits:
aa931580 by lovetox at 2020-04-26T20:45:51+02:00
Roster: Show correct status after status change
Fixes #10077
- - - - -
1 changed file:
- gajim/roster_window.py
Changes:
=====================================
gajim/roster_window.py
=====================================
@@ -2243,13 +2243,22 @@ class RosterWindow:
def update_status_combobox(self):
# table to change index in connection.connected to index in combobox
- table = {'offline':8, 'connecting':8, 'error': 8, 'online':0, 'chat':1, 'away':2,
- 'xa':3, 'dnd':4}
+ table = {
+ 'offline':8,
+ 'connecting':8,
+ 'error': 8,
+ 'online':0,
+ 'chat':1,
+ 'away':2,
+ 'xa':3,
+ 'dnd':4
+ }
liststore = self.status_combobox.get_model()
- # we check if there are more options in the combobox that it should
- # if yes, we remove the first ones
- while len(liststore) > len(table)+2:
+
+ # Check if a desync'ed status entry and separator is currently
+ # in the liststore remove it.
+ while len(liststore) > 9:
titer = liststore.get_iter_first()
liststore.remove(titer)
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/aa931580b4d0f048c7c281333182c2a4…
--
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/aa931580b4d0f048c7c281333182c2a4…
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:
ac3f42d4 by lovetox at 2020-04-25T15:25:04+02:00
EntityCaps: Correctly handle disco info without node attribute
- - - - -
1 changed file:
- nbxmpp/modules/entity_caps.py
Changes:
=====================================
nbxmpp/modules/entity_caps.py
=====================================
@@ -52,12 +52,15 @@ class EntityCaps(BaseModule):
if self._caps is None:
return
- if self._node is not None:
- if self._node != stanza.getQuerynode():
+ node = stanza.getQuerynode()
+ if node is not None:
+ if self._node != node:
return
iq = stanza.buildReply('result')
- iq.setQuerynode(self._node)
+ if node is not None:
+ iq.setQuerynode(node)
+
query = iq.getQuery()
for identity in self._caps.identities:
query.addChild(node=identity.get_node())
View it on GitLab: https://dev.gajim.org/gajim/python-nbxmpp/-/commit/ac3f42d49bb4221e073138c8…
--
View it on GitLab: https://dev.gajim.org/gajim/python-nbxmpp/-/commit/ac3f42d49bb4221e073138c8…
You're receiving this email because of your account on dev.gajim.org.
Philipp Hörist pushed to branch master at gajim / gajim
Commits:
24d89658 by André Apitzsch at 2020-04-24T17:40:30+02:00
Location: Catch all GLib errors
Traceback (most recent call last):
File "/home/user/gajim/gajim/common/dbus/location.py", line 63, in _on_simple_ready
self.simple = Geoclue.Simple.new_finish(result)
gi.repository.GLib.Error: g-io-error-quark: Error calling StartServiceByName for org.freedesktop.GeoClue2: Unit geoclue.service is masked.
- - - - -
1 changed file:
- gajim/common/dbus/location.py
Changes:
=====================================
gajim/common/dbus/location.py
=====================================
@@ -62,10 +62,7 @@ class LocationListener:
try:
self.simple = Geoclue.Simple.new_finish(result)
except GLib.Error as error:
- if error.domain == 'g-dbus-error-quark':
- log.warning("Could not enable geolocation: %s", error.message)
- else:
- raise
+ log.warning("Could not enable geolocation: %s", error.message)
else:
self.simple.connect('notify::location', self._on_location_update)
self._on_location_update(self.simple)
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/24d89658f6e0502d0dd101ac28509fa4…
--
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/24d89658f6e0502d0dd101ac28509fa4…
You're receiving this email because of your account on dev.gajim.org.
Philipp Hörist pushed to branch master at gajim / gajim
Commits:
89361f61 by Daniel Brötzmann at 2020-04-24T17:26:40+02:00
Logger: Make get_last_conversation_lines account-specific
- - - - -
1 changed file:
- gajim/common/logger.py
Changes:
=====================================
gajim/common/logger.py
=====================================
@@ -776,15 +776,18 @@ class Logger:
KindConstant.ERROR])
jids = self._get_family_jids(account, jid)
+ account_id = self.get_account_id(account)
sql = '''
SELECT time, kind, message, error as "error [common_error]",
subject, additional_data, marker as "marker [marker]",
message_id
- FROM logs NATURAL JOIN jids WHERE jid IN ({jids}) AND
- kind IN ({kinds}) AND time > get_timeout()
+ FROM logs NATURAL JOIN jids WHERE jid IN ({jids})
+ AND account_id = {account_id} AND kind IN ({kinds})
+ AND time > get_timeout()
ORDER BY time DESC, log_line_id DESC LIMIT ? OFFSET ?
'''.format(jids=', '.join('?' * len(jids)),
+ account_id=account_id,
kinds=', '.join(kinds))
try:
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/89361f61eb6c106009d09cdc45325be2…
--
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/89361f61eb6c106009d09cdc45325be2…
You're receiving this email because of your account on dev.gajim.org.
Philipp Hörist pushed to branch master at gajim / gajim
Commits:
71a32e9f by André Apitzsch at 2020-04-24T17:22:59+02:00
Config: Simplify base directory handling
- - - - -
1 changed file:
- gajim/common/configpaths.py
Changes:
=====================================
gajim/common/configpaths.py
=====================================
@@ -30,6 +30,8 @@ import sys
import tempfile
from pathlib import Path
+from gi.repository import GLib
+
import gajim
from gajim.common.i18n import _
from gajim.common.const import PathType, PathLocation
@@ -114,19 +116,10 @@ class ConfigPaths:
# win9x, in cwd
self.config_root = self.cache_root = self.data_root = '.'
else:
- expand = os.path.expanduser
- base = os.getenv('XDG_CONFIG_HOME')
- if base is None or base[0] != '/':
- base = expand('~/.config')
- self.config_root = os.path.join(base, 'gajim')
- base = os.getenv('XDG_CACHE_HOME')
- if base is None or base[0] != '/':
- base = expand('~/.cache')
- self.cache_root = os.path.join(base, 'gajim')
- base = os.getenv('XDG_DATA_HOME')
- if base is None or base[0] != '/':
- base = expand('~/.local/share')
- self.data_root = os.path.join(base, 'gajim')
+ self.config_root = os.path.join(GLib.get_user_config_dir(),
+ 'gajim')
+ self.cache_root = os.path.join(GLib.get_user_cache_dir(), 'gajim')
+ self.data_root = os.path.join(GLib.get_user_data_dir(), 'gajim')
import pkg_resources
basedir = pkg_resources.resource_filename("gajim", ".")
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/71a32e9fa086fb16f92d380a1f88d38c…
--
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/71a32e9fa086fb16f92d380a1f88d38c…
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:
48974ece by André Apitzsch at 2020-04-24T11:03:22+02:00
Fix reset of location/tune pubsub
- - - - -
e8d421fe by André Apitzsch at 2020-04-24T12:00:44+02:00
Location: Fix ValueError: too many values to unpack
- - - - -
2 changed files:
- nbxmpp/modules/location.py
- nbxmpp/modules/tune.py
Changes:
=====================================
nbxmpp/modules/location.py
=====================================
@@ -64,13 +64,11 @@ class Location(BaseModule):
def set_location(self, data):
item = Node('geoloc', {'xmlns': Namespace.LOCATION})
- if data is None:
- return
-
- data = data._asdict()
- for tag, value in data:
- if value is not None:
- item.addChild(tag, payload=value)
+ if data is not None:
+ data = data._asdict()
+ for tag, value in data.items():
+ if value is not None:
+ item.addChild(tag, payload=value)
jid = self._client.get_bound_jid().getBare()
self._client.get_module('PubSub').publish(
=====================================
nbxmpp/modules/tune.py
=====================================
@@ -64,13 +64,11 @@ class Tune(BaseModule):
def set_tune(self, data):
item = Node('tune', {'xmlns': Namespace.TUNE})
- if data is None:
- return
-
- data = data._asdict()
- for tag, value in data.items():
- if value is not None:
- item.addChild(tag, payload=value)
+ if data is not None:
+ data = data._asdict()
+ for tag, value in data.items():
+ if value is not None:
+ item.addChild(tag, payload=value)
jid = self._client.get_bound_jid().getBare()
self._client.get_module('PubSub').publish(
View it on GitLab: https://dev.gajim.org/gajim/python-nbxmpp/-/compare/b70acbc1b363cf5e30bb1a5…
--
View it on GitLab: https://dev.gajim.org/gajim/python-nbxmpp/-/compare/b70acbc1b363cf5e30bb1a5…
You're receiving this email because of your account on dev.gajim.org.