Daniel Brötzmann pushed to branch master at gajim / gajim
Commits:
0b2822a5 by wurstsalat at 2023-01-13T16:31:42+01:00
fix: Notifications: Fix rare case where Gajim displays notifications for our own messages
Fixes #11305
- - - - -
1 changed file:
- gajim/gtk/chat_stack.py
Changes:
=====================================
gajim/gtk/chat_stack.py
=====================================
@@ -377,6 +377,16 @@ def _on_message_received(self, event: events.MessageReceived) -> None:
if not event.msgtxt or event.properties.is_sent_carbon:
return
+ client = app.get_client(event.account)
+ contact = client.get_module('Contacts').get_contact(event.jid)
+ if isinstance(contact, GroupchatContact):
+ # MUC messages may be received after some delay, so make sure we
+ # don't issue notifications for our own messages.
+ self_contact = contact.get_self()
+ if (self_contact is not None and
+ self_contact.name == event.properties.muc_nickname):
+ return
+
if app.window.is_chat_active(event.account, event.jid):
return
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/0b2822a51428f2cfc581764772f519cc…
--
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/0b2822a51428f2cfc581764772f519cc…
You're receiving this email because of your account on dev.gajim.org.
Daniel Brötzmann pushed to branch master at gajim / gajim
Commits:
d54ec587 by wurstsalat at 2023-01-13T14:10:22+01:00
fix: Don't fail in mark_as_unread if there are no messages
This can happen if chat history is not stored (user setting)
Fixes #11360
- - - - -
1 changed file:
- gajim/gtk/main.py
Changes:
=====================================
gajim/gtk/main.py
=====================================
@@ -1061,6 +1061,9 @@ def mark_as_read(self,
last_message = app.storage.archive.get_last_conversation_line(
account, jid)
+ if last_message is None:
+ return
+
client = app.get_client(account)
contact = client.get_module('Contacts').get_contact(jid)
client.get_module('ChatMarkers').send_displayed_marker(
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/d54ec587d0069d92a195bccf722441b3…
--
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/d54ec587d0069d92a195bccf722441b3…
You're receiving this email because of your account on dev.gajim.org.
Daniel Brötzmann pushed to branch master at gajim / gajim
Commits:
e39dba6b by wurstsalat at 2023-01-13T13:48:30+01:00
fix: AvatarChooser: Fix file filter for Windows
This was introduced in 16cd4ebdb69903024d54a46ee9e648e835875fdc
but doesn't work on Windows
- - - - -
1 changed file:
- gajim/gtk/filechoosers.py
Changes:
=====================================
gajim/gtk/filechoosers.py
=====================================
@@ -112,7 +112,13 @@ class BaseAvatarChooserDialog:
_title = _('Choose Avatar…')
_preview_size = (100, 100)
- _filters = [Filter(_('Images'), ['image/*'], True)]
+
+ if _require_native():
+ _filters = [Filter(_('PNG files'), '*.png', True),
+ Filter(_('JPEG files'), '*.jp*g', False),
+ Filter(_('SVG files'), '*.svg', False)]
+ else:
+ _filters = [Filter(_('Images'), ['image/*'], True)]
class NativeFileChooserDialog(Gtk.FileChooserNative, BaseFileChooser):
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/e39dba6ba7bc73c391b1d1ddf5e803fb…
--
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/e39dba6ba7bc73c391b1d1ddf5e803fb…
You're receiving this email because of your account on dev.gajim.org.
Daniel Brötzmann pushed to branch master at gajim / gajim
Commits:
cf79eb93 by mesonium at 2023-01-13T08:46:55+00:00
fix: Audio Preview: Sync clock to make short files play properly on Win
- - - - -
1 changed file:
- gajim/gtk/preview_audio.py
Changes:
=====================================
gajim/gtk/preview_audio.py
=====================================
@@ -17,6 +17,7 @@
from typing import Any
import logging
+import sys
from pathlib import Path
from gi.repository import Gdk
@@ -207,7 +208,15 @@ def _setup_audio_player(self, file_path: Path) -> None:
assert audioconvert is not None
assert scaletempo is not None
assert audioresample is not None
- autoaudiosink.set_property('sync', False)
+
+ # On Windows the first fraction of an audio
+ # would not play if not synced.
+ # On Linux there can be a delay before playback starts with sync,
+ # which is however not the case on Windows.
+ if sys.platform == 'win32':
+ autoaudiosink.set_property('sync', True)
+ else:
+ autoaudiosink.set_property('sync', False)
audio_sink.add(audioconvert)
audio_sink.add(scaletempo)
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/cf79eb939a981e09b494797c6a0cc5ee…
--
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/cf79eb939a981e09b494797c6a0cc5ee…
You're receiving this email because of your account on dev.gajim.org.
Daniel Brötzmann pushed to branch master at gajim / gajim
Commits:
e57c3b87 by wurstsalat at 2023-01-12T19:03:19+01:00
fix: ChatStack DnD: Add workaround for mis-fired drag-motion signal
Fixes #11226
- - - - -
1 changed file:
- gajim/gtk/chat_stack.py
Changes:
=====================================
gajim/gtk/chat_stack.py
=====================================
@@ -673,8 +673,13 @@ def _on_drag_motion(self,
_context: Gdk.DragContext,
_x_coord: int,
_y_coord: int,
- _time: int
+ time: int
) -> bool:
+
+ if time == 0:
+ # Workaround for https://gitlab.gnome.org/GNOME/gtk/-/issues/5518
+ return False
+
self._drop_area.set_no_show_all(False)
self._drop_area.show_all()
return True
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/e57c3b875d355cf407fc73bb94527f0a…
--
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/e57c3b875d355cf407fc73bb94527f0a…
You're receiving this email because of your account on dev.gajim.org.