gajim merge requestshttps://dev.gajim.org/gajim/gajim/-/merge_requests2024-03-29T13:03:50Zhttps://dev.gajim.org/gajim/gajim/-/merge_requests/1029perf: Faster contact switching by caching spell checkers2024-03-29T13:03:50ZNicocoperf: Faster contact switching by caching spell checkersThis commit makes is snappier to switch between chat by caching the `Gspell.Checker` objects.
It triggers a linter error about a possible memory leak using lru_cache on methods but AFAIU it can be safely ignored since `MessageInputTextV...This commit makes is snappier to switch between chat by caching the `Gspell.Checker` objects.
It triggers a linter error about a possible memory leak using lru_cache on methods but AFAIU it can be safely ignored since `MessageInputTextView` and `TextBufferManager` are singletons, see https://bugs.python.org/issue19859
Maybe 128 is too high a value for this cache, I'm not sure what's a sane size.
# Benchmark
Procedure: switching between 2 contacts 20 times
## Before patch
| Name | Call Count | Time (ms) | Own time (ms) |
|---------------------|-----|-------|------|
| _init_spell_checker | 20 | 884 | 883 |
| show_chat | 20 | 1842 | 224 |
| switch_contact | 20 | 1088 | 185 |
## After patch
| Name | Call Count | Time (ms) | Own time (ms) |
|---------------------|-----|-------|------|
| show_chat | 20 | 823 | 223 |
| switch_contact | 20 | 3 | 0 |
| _init_spell_checker | 20 | 100 | 0 |https://dev.gajim.org/gajim/gajim/-/merge_requests/1028imprv: Notify of new members in private MUCs2024-03-28T13:48:25ZNicocoimprv: Notify of new members in private MUCsParticipants joins and leaves are not shown by default, which is a good thing in a world where a lot of people
are using mobile.
That said, in private groups, knowing if there is a new member is valuable information, and most chat apps ...Participants joins and leaves are not shown by default, which is a good thing in a world where a lot of people
are using mobile.
That said, in private groups, knowing if there is a new member is valuable information, and most chat apps will inform their users of such events.
This commit implements that feature.https://dev.gajim.org/gajim/gajim/-/merge_requests/1027feat: Avatars in notifications for Linux for all desktop envs2024-03-28T05:56:03ZNicocofeat: Avatars in notifications for Linux for all desktop envsI use a [minimalist notification manager (dunst)](https://dunst-project.org/) and while it can display images, it does not work if the "icon" is a `Gdk.Pixbuf`, which I guess is GNOME-specific. Passing a `Gio.FileIcon` does work though a...I use a [minimalist notification manager (dunst)](https://dunst-project.org/) and while it can display images, it does not work if the "icon" is a `Gdk.Pixbuf`, which I guess is GNOME-specific. Passing a `Gio.FileIcon` does work though and that's what this commit does.
It requires writing the icon to disk, but it seems we can easily cache that using the hash of the `cairo.Surface` object, so I don't think the performance impact is going to be an issue.https://dev.gajim.org/gajim/gajim/-/merge_requests/1026feat: Hide/show main menu bar2024-03-28T05:40:21ZNicocofeat: Hide/show main menu barThis make the app main menu hideable with a keyboard shortcut, and a menu entry.
Menus are so old-school anyway!This make the app main menu hideable with a keyboard shortcut, and a menu entry.
Menus are so old-school anyway!https://dev.gajim.org/gajim/gajim/-/merge_requests/1025Calls2024-03-28T22:16:52ZwusspussCallsIntroduces audio and video calls functionality, including Windows support (not packaged for Windows yet, but run successfully inside a vm with video and on real hardware without video - probably just a packaging issue). For Linux there's...Introduces audio and video calls functionality, including Windows support (not packaged for Windows yet, but run successfully inside a vm with video and on real hardware without video - probably just a packaging issue). For Linux there's a build flatpak build sample under .Devel.yaml
There's a [pre-built flatpak](https://files.catbox.moe/jm1y7z.flatpak) for the curious
It's worth pointing out that the new [libdatachannel](https://github.com/paullouisageneau/libdatachannel) dependency replaces farstream and libnice. This branch doesn't remove farstream-related code and in general doesn't mess with anything other than calls. But even for file transfers (which iiuc are currently broken anyway), libdatachannel can later replace farstream - especially now that Conversations and Dino implement file transfers with \`urn:xmpp:jingle:transports:webrtc-datachannel:1\` - that's a perfect match for the future. Moreover, libdatachannel is actively maintained and cross platform (including Windows), unlike farstream.
The new AV-related code is covered by tests. Most of those are skipped by default: they try to display video and play audio in different ways via libdatachannel, which means they're not as quick and need a network connection. They can be run by setting `TEST_SOUNDS` environment variable. With them enabled, the whole test suite takes about a minute to run on my machine, makes noises and pops up windows.
For those interested in Windows: here are draft pkgbuilds for windows: [libdatachannel](https://github.com/wusspuss/libdatachannel-mingw-pkgbuild) and [bindings](https://github.com/wusspuss/libdatachannel-python-mingw-pkgbuild). I have successfully run audio and video calls on win11 in qemu (had to use [mesa](https://fdossena.com/?p=mesa%2Findex.frag) because of qemu), but a person from the chatroom told me they had trouble with `gtkglsink` on a windows host and got it to work using `gtksink`. I can't test it yet because I don't have a Windows host, but I suspect they just didn't install some gst-... package properly. We may want to just replace gtkglsink with gtksink.https://dev.gajim.org/gajim/gajim/-/merge_requests/1024imprv: Allow drag'n'dropping http URIs2024-03-28T09:13:57ZNicocoimprv: Allow drag'n'dropping http URIsThis commit makes it possible to drag'n'drop images (and other content types) from firefox (and probably other apps) to send them in a chat.
This does not trigger the file upload dialog but instead sends the URL in a `<oob>` tag (if it ...This commit makes it possible to drag'n'drop images (and other content types) from firefox (and probably other apps) to send them in a chat.
This does not trigger the file upload dialog but instead sends the URL in a `<oob>` tag (if it is not a link to a web page). This is a rather small change but I believe this is very nice UX/QoL change.https://dev.gajim.org/gajim/gajim/-/merge_requests/1023feat: Support for Message Displayed Synchronization2024-03-26T17:01:40ZNicocofeat: Support for Message Displayed SynchronizationThis depends on https://dev.gajim.org/gajim/python-nbxmpp/-/merge_requests/84
This uses the current implementation of read state in gajim, ie, it only works when receiving events for the latest message in a chat. This could be improved ...This depends on https://dev.gajim.org/gajim/python-nbxmpp/-/merge_requests/84
This uses the current implementation of read state in gajim, ie, it only works when receiving events for the latest message in a chat. This could be improved but is out of scope of this MR.
Fixes: https://dev.gajim.org/gajim/gajim/-/issues/11785https://dev.gajim.org/gajim/gajim/-/merge_requests/1022cq: Fix some typos2024-03-16T09:32:33ZAndrécq: Fix some typoshttps://dev.gajim.org/gajim/gajim/-/merge_requests/1021cq: Fix style issues revealed by ruff 0.3.22024-03-16T09:32:29ZAndrécq: Fix style issues revealed by ruff 0.3.2https://dev.gajim.org/gajim/gajim/-/merge_requests/1013Draft: Implement Send Voice Messages2024-03-03T21:43:43ZmesoniumDraft: Implement Send Voice MessagesVery much POC and WIP at this stage. Only tested and only works under Linux with PulseAudio right now.Very much POC and WIP at this stage. Only tested and only works under Linux with PulseAudio right now.https://dev.gajim.org/gajim/gajim/-/merge_requests/1012Prevent message row merging in relation to delivery receipts status or the pr...2024-03-28T14:03:23ZNicocoPrevent message row merging in relation to delivery receipts status or the presence of error(s)Fixes: https://dev.gajim.org/gajim/gajim/-/issues/11632
Also prevents merging when there is an error corresponding to a message row, since the error never applies to several message but only to a specific row.Fixes: https://dev.gajim.org/gajim/gajim/-/issues/11632
Also prevents merging when there is an error corresponding to a message row, since the error never applies to several message but only to a specific row.https://dev.gajim.org/gajim/gajim/-/merge_requests/1011imprv: Display emoji-only messages with a larger font2024-03-10T21:57:02ZNicocoimprv: Display emoji-only messages with a larger fontThis should supersede https://dev.gajim.org/gajim/gajim/-/merge_requests/964
I rebased on top of master, and added the emoji dependency to the flatpak, windows and debian builds.This should supersede https://dev.gajim.org/gajim/gajim/-/merge_requests/964
I rebased on top of master, and added the emoji dependency to the flatpak, windows and debian builds.https://dev.gajim.org/gajim/gajim/-/merge_requests/1010Draft: feat: AccountSideBar: Add account menu and status selector2024-02-19T08:12:26ZDaniel BrötzmannDraft: feat: AccountSideBar: Add account menu and status selectorCloses #11679
Screenshots:
![image](/uploads/a5a2a87ad2dd827791adb564da2f1be7/image.png)
![image](/uploads/9140c8fb16ec1deaf2dc1fdf6f40f2d6/image.png)Closes #11679
Screenshots:
![image](/uploads/a5a2a87ad2dd827791adb564da2f1be7/image.png)
![image](/uploads/9140c8fb16ec1deaf2dc1fdf6f40f2d6/image.png)https://dev.gajim.org/gajim/gajim/-/merge_requests/1009Draft: imprv: AdHocCommands: Display note type icon2024-02-18T11:46:42ZbodqhrohroDraft: imprv: AdHocCommands: Display note type iconThis is pretty rough though, as the standard allows multiple notes per a `<command>` element, and those can have different types. Also, the performance could be better.
Should I maybe rework the UI so an icon is displayed adjacently to ...This is pretty rough though, as the standard allows multiple notes per a `<command>` element, and those can have different types. Also, the performance could be better.
Should I maybe rework the UI so an icon is displayed adjacently to every note, instead of the common icon in the header? I suppose though the icon in the header should still remain there in a case there are no notes at all. And possibly it could also reflect the note with the highest severity, while adjacent icons reflect the types of individual notes.https://dev.gajim.org/gajim/gajim/-/merge_requests/1008Draft: feat: Support for XEP-0424 (Message Retraction)2024-02-18T06:52:33ZNicocoDraft: feat: Support for XEP-0424 (Message Retraction)Implements: https://dev.gajim.org/gajim/gajim/-/issues/11399
Relies on https://dev.gajim.org/gajim/python-nbxmpp/-/merge_requests/82
To do:
- [ ] Figure out how to make retraction persistent across gajim restarts - depends on https://...Implements: https://dev.gajim.org/gajim/gajim/-/issues/11399
Relies on https://dev.gajim.org/gajim/python-nbxmpp/-/merge_requests/82
To do:
- [ ] Figure out how to make retraction persistent across gajim restarts - depends on https://dev.gajim.org/gajim/gajim/-/merge_requests/966
- [X] Implement outgoing retractions for group chats - works because the room echoes it
- [X] Implement outgoing retractions for direct chats - the stanza is emitted but the UI is not updated
- [ ] What do we do when we receive a retraction for a message we might later fetch via MAM? `*`
- [ ] ???
`*` Maybe we just expect tombstone support from the server?https://dev.gajim.org/gajim/gajim/-/merge_requests/1007Draft: feat: Support for message threads2024-02-21T22:19:06ZNicocoDraft: feat: Support for message threadsImplements: #11058 (and #11271)
This MR adds support for threads [like cheogram does](https://invidious.protokolla.fi/watch?v=apazJINa1UI).
A video of what it looks like:
![gajim-identicons-2024-02-14_14.45.08](/uploads/05e2c7ede693b5...Implements: #11058 (and #11271)
This MR adds support for threads [like cheogram does](https://invidious.protokolla.fi/watch?v=apazJINa1UI).
A video of what it looks like:
![gajim-identicons-2024-02-14_14.45.08](/uploads/05e2c7ede693b5116d9c041460133939/gajim-identicons-2024-02-14_14.45.08.mp4)
Check-list:
- [x] Convince @lovetox that this is a good idea
- [ ] Make threads collapsable
- [ ] Convince @lovetox that identicons are a good idea
- [ ] Add a hint next to the message input box to specify that we are going to post in a given thread (…the identicon?)
- [ ] Change the identicon generation algorithm so that it matches Cheogram's (see below)
- [ ] Remove empty date rows in conversation view
- [ ] Figure out how to get the size of the message row icons and un-hardcode the 10×10px size
The identicons generated from the thread ID are different than those from Cheogram ([implementation here](https://paste.sr.ht/~singpolyma/bf63cfa4726ef6114f04b12ffc467d510d56cffe))
![cheogram-identicons](/uploads/2908de8e61ba2e9e5ff48ba3cfd20027/cheogram-identicons.png)
<img src="/uploads/efd48a194627415495c39b76f5319ed6/cheogram-identicons.png" width="400">https://dev.gajim.org/gajim/gajim/-/merge_requests/1003feat: XEP-0317 (Hats)2024-02-02T21:31:20ZNicocofeat: XEP-0317 (Hats)Depends on https://dev.gajim.org/gajim/python-nbxmpp/-/merge_requests/80
The UI parts are very ugly, but I'd like to make sure the feature is accepted before doing boring GUI work… Let me know what you maintainers think!
![Screenshot_2...Depends on https://dev.gajim.org/gajim/python-nbxmpp/-/merge_requests/80
The UI parts are very ugly, but I'd like to make sure the feature is accepted before doing boring GUI work… Let me know what you maintainers think!
![Screenshot_20240119_223927](/uploads/94c2d21f6b7b6ca32ded8356d28f2ae2/Screenshot_20240119_223927.png)https://dev.gajim.org/gajim/gajim/-/merge_requests/1001feat: Feedback on affiliation change failures2024-03-06T15:15:00ZNicocofeat: Feedback on affiliation change failuresFixes: https://dev.gajim.org/gajim/gajim/-/issues/11724Fixes: https://dev.gajim.org/gajim/gajim/-/issues/11724https://dev.gajim.org/gajim/gajim/-/merge_requests/1000imprv: Dismiss invitation notification when MUC is joined2024-03-06T15:15:12ZNicocoimprv: Dismiss invitation notification when MUC is joinedFixes: https://dev.gajim.org/gajim/gajim/-/issues/11723Fixes: https://dev.gajim.org/gajim/gajim/-/issues/11723https://dev.gajim.org/gajim/gajim/-/merge_requests/999feat: Use XEP-0172 nickname in MUC presences2024-03-28T09:08:08ZNicocofeat: Use XEP-0172 nickname in MUC presencesThis relies on this patch in nbxmpp: https://dev.gajim.org/gajim/python-nbxmpp/-/merge_requests/79
With some explanation [here](https://wiki.soprani.ca/CheogramApp/Nickname)This relies on this patch in nbxmpp: https://dev.gajim.org/gajim/python-nbxmpp/-/merge_requests/79
With some explanation [here](https://wiki.soprani.ca/CheogramApp/Nickname)