Philipp Hörist pushed to branch master at gajim / gajim
Commits:
f7019433 by lovetox at 2020-10-08T20:51:01+02:00
Remove unused import
- - - - -
1 changed file:
- gajim/gtk/discovery.py
Changes:
=====================================
gajim/gtk/discovery.py
=====================================
@@ -46,7 +46,6 @@ import weakref
import uuid
import nbxmpp
-from nbxmpp.util import is_error_result
from nbxmpp.structs import DiscoIdentity
from nbxmpp.namespaces import Namespace
from nbxmpp.errors import StanzaError
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/f7019433d549edcaff47317c79696c66…
--
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/f7019433d549edcaff47317c79696c66…
You're receiving this email because of your account on dev.gajim.org.
Philipp Hörist pushed to branch master at gajim / gajim
Commits:
07dd8d0c by lovetox at 2020-10-08T20:26:44+02:00
Discovery: Fix disco#items callback
- - - - -
1 changed file:
- gajim/gtk/discovery.py
Changes:
=====================================
gajim/gtk/discovery.py
=====================================
@@ -453,13 +453,16 @@ class ServicesCache:
if cbkey in self._cbs:
del self._cbs[cbkey]
- def _disco_items_received(self, result):
+ def _disco_items_received(self, task):
"""
Callback for when we receive an agent's items
array is (agent, node, items)
"""
- if is_error_result(result):
- self._disco_items_error(result)
+
+ try:
+ result = task.finish()
+ except StanzaError as error:
+ self._disco_items_error(error)
return
addr = get_agent_address(result.jid, result.node)
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/07dd8d0c8608a5e5550ad6f84af8db67…
--
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/07dd8d0c8608a5e5550ad6f84af8db67…
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:
f8f99f33 by lovetox at 2020-10-05T17:38:40+02:00
Bookmarks: Catch some invalid room jids
Fixes #111
- - - - -
1 changed file:
- nbxmpp/modules/bookmarks.py
Changes:
=====================================
nbxmpp/modules/bookmarks.py
=====================================
@@ -140,6 +140,12 @@ class Bookmarks(BaseModule):
error)
continue
+ if jid.localpart is None or jid.resource is not None:
+ self._log.warning('Invalid JID: "%s", %s',
+ conf.getAttr('jid'),
+ error)
+ continue
+
autojoin = self._parse_autojoin(conf.getAttr('autojoin'))
nick = self._parse_nickname(conf.getTagData('nick'))
name = conf.getAttr('name') or None
@@ -170,6 +176,12 @@ class Bookmarks(BaseModule):
error)
return None
+ if jid.localpart is None or jid.resource is not None:
+ self._log.warning('Invalid JID: "%s", %s',
+ item.getAttr('id'),
+ error)
+ return None
+
autojoin = self._parse_autojoin(conference.getAttr('autojoin'))
nick = self._parse_nickname(conference.getTagData('nick'))
name = conference.getAttr('name') or None
View it on GitLab: https://dev.gajim.org/gajim/python-nbxmpp/-/commit/f8f99f339d31c1795bb6eef2…
--
View it on GitLab: https://dev.gajim.org/gajim/python-nbxmpp/-/commit/f8f99f339d31c1795bb6eef2…
You're receiving this email because of your account on dev.gajim.org.
Philipp Hörist pushed to branch master at gajim / gajim
Commits:
0a9f0ed9 by lovetox at 2020-10-04T16:05:23+02:00
ChatBaseControl: Fix regression with non-english keyboard layouts
- - - - -
1 changed file:
- gajim/chat_control_base.py
Changes:
=====================================
gajim/chat_control_base.py
=====================================
@@ -79,6 +79,12 @@ from gajim.command_system.implementation import execute
if app.is_installed('GSPELL'):
from gi.repository import Gspell # pylint: disable=ungrouped-imports
+# This is needed so copying text from the conversation textview
+# works with different language layouts. Pressing the key c on a russian
+# layout yields another keyval than with the english layout.
+# So we match hardware keycodes instead of keyvals.
+# Multiple hardware keycodes can trigger a keyval like Gdk.KEY_c.
+KEYCODES_KEY_C = get_hardware_key_codes(Gdk.KEY_c)
if sys.platform == 'darwin':
COPY_MODIFIER = Gdk.ModifierType.META_MASK
@@ -94,12 +100,6 @@ class ChatControlBase(ChatCommandProcessor, CommandTools, EventHelper):
A base class containing a banner, ConversationTextview, MessageInputTextView
"""
- # This is needed so copying text from the conversation textview
- # works with different language layouts. Pressing the key c on a russian
- # layout yields another keyval than with the english layout.
- # So we match hardware keycodes instead of keyvals.
- # Multiple hardware keycodes can trigger a keyval like Gdk.KEY_c.
- keycodes_c = get_hardware_key_codes(Gdk.KEY_c)
_type = None # type: ControlType
def __init__(self, parent_win, widget_name, contact, acct,
@@ -272,7 +272,7 @@ class ChatControlBase(ChatCommandProcessor, CommandTools, EventHelper):
if event.get_state() & COPY_MODIFIER:
# Don’t reroute the event if it is META + c and the
# textview has a selection
- if event.keyval == Gdk.KEY_c:
+ if event.hardware_keycode in KEYCODES_KEY_C:
if textview.get_buffer().props.has_selection:
return Gdk.EVENT_PROPAGATE
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/0a9f0ed9238a6e1406e3daa9438fa6bd…
--
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/0a9f0ed9238a6e1406e3daa9438fa6bd…
You're receiving this email because of your account on dev.gajim.org.