Commit Graph

10945 Commits

Author SHA1 Message Date
Hosted Weblate
8ca230e04e
TRANSLATION: Update Ukrainian translation
Currently translated at 100.0% (2308 of 2308 strings)

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Максим Горпиніч <maksimgorpinic2005a@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/mumble/mumble-client/uk/
Translation: Mumble/Mumble Client
2025-02-01 10:02:12 +01:00
Hosted Weblate
d6ba4a8cff
TRANSLATION: Update Greek translation
Currently translated at 85.8% (1981 of 2308 strings)

Co-authored-by: Anthony V <anthonyv156@outlook.com>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Translate-URL: https://hosted.weblate.org/projects/mumble/mumble-client/el/
Translation: Mumble/Mumble Client
2025-02-01 10:02:11 +01:00
Davide Beatrici
fb6422aa0d
Merge PR #6707: FEAT(client): Introduce new logging system based on spdlog 2025-01-29 04:34:53 +01:00
Jan Klass
9e30471529
Merge PR #6715: DOCS(dev): Convert network protocol rst to md
Convert our network protocol docs from rst (ReStructuredText) to md (Markdown) format.

---

This changeset is a followup to PR #6623. In that PR, which first integrated these docs into this repository, the comments indicated consensus that the docs should be in Markdown format to match our other docs.

This changeset is based on PR #6714, which does some baseline corrections, and which should be merged first.

---

Two tables are not converted to Markdown tables because they are not flat tables, which is hard, if not impossible, to represent in Markdown. Preformatted code blocks are being used for them instead.

Otherwise, the conversion seems straightforward.

The changeset includes individual commits by change type, so each kind of change can be traced. The first commit is purely a rename to ensure Git follows the content history across the file conversion.
2025-01-27 18:01:27 +01:00
Jan Klass
9d512e63d3
MERGE PR #6714: DOCS(dev): Clean up network protocol docs ()
* Replace non-breaking space ("nbsp") characters with normal space characters
* Fix rst cross-document reference that worked on readthedocs but does not work on GitHub rendering

These changes can be considered a follow-up or fixup to PR #6623, which integrated the network protocol docs into this repository.
2025-01-27 17:57:37 +01:00
Jan Klass
b50ead336e DOCS(dev): Convert tables (where possible)
Two tables are not converted because they are not flat tables but contain "complex" content/structure.
2025-01-26 14:07:15 +01:00
Jan Klass
6247013cc2 DOCS(dev): Format field text definitions 2025-01-26 13:54:26 +01:00
Jan Klass
6c5615ba99 DOCS(dev): Mark up URL 2025-01-26 13:54:25 +01:00
Jan Klass
2096d56022 DOCS(dev): Convert text code fencing 2025-01-26 13:54:25 +01:00
Jan Klass
bebb473d5f DOCS(dev): Replace in-table code fencing 2025-01-26 13:54:25 +01:00
Jan Klass
02b3d6bf15 DOCS(dev): Drop rst ref defs 2025-01-26 13:54:24 +01:00
Jan Klass
79a82f0a68 DOCS(dev): Replace references in text 2025-01-26 13:54:24 +01:00
Jan Klass
4c16d55df6 DOCS(dev): Convert file links 2025-01-26 13:54:24 +01:00
Jan Klass
e844cefec6 DOCS(dev): Drop underline escape 2025-01-26 13:54:24 +01:00
Jan Klass
94246a1345 DOCS(dev): Convert tables to code blocks 2025-01-26 13:54:23 +01:00
Jan Klass
809b7af0ca DOCS(dev): Convert footnotes 2025-01-26 13:54:23 +01:00
Jan Klass
69bec3274d DOCS(dev): Convert image refs 2025-01-26 13:24:58 +01:00
Jan Klass
24d71a3cc6 DOCS(dev): Convert headlines 2025-01-26 13:24:57 +01:00
Jan Klass
989329292f DOCS(dev): Rename rst files to md
This is done as a separate commit to retain Git change file history association. (Git does not store renames. It assumes renames according to content similarity.)
2025-01-26 13:24:57 +01:00
Jan Klass
5992aa3765 DOCS(dev): Drop broken, unnecessary fig ref
The figure follows below the paragraph.
2025-01-26 13:24:35 +01:00
Jan Klass
2aaae8c375 DOCS(dev): Fix UTP to TCP ref
The cross-document reference apparently worked on readthedocs (our previous docs), but does not work on GitHub.

The cross-document figure reference is replaced with a file reference.
2025-01-26 12:52:53 +01:00
Jan Klass
d1fc0334f4 DOCS(dev): Replace nbsp with normal spaces 2025-01-26 11:23:28 +01:00
Davide Beatrici
c7cba4133f REFAC(client): Switch to new logging system 2025-01-21 02:55:25 +01:00
Davide Beatrici
b8357e8a25 FEAT(client): Introduce new logging system based on spdlog
Sinks:

- OutputDebugString() (for debugger on Windows)
- Standard output stream (stdout)
- File
- Developer console (Qt widget)

Improvements compared to our old logging system based on Qt:

- Duplicate messages are skipped if less than 5 seconds have passed. When that happens, an informative message is printed.
- The previous format/pattern is retained, but the log level (e.g. "<W>") is colored based on the severity.
- The log is now written to a file on all platforms, not only Windows and macOS.
- When the log file's size reaches 5 MiB, the sink renames it and creates a new one. Up to 4 files are kept:
    Console.txt   -> Console.1.txt
    Console.1.txt -> Console.2.txt
    Console.2.txt -> Console.3.txt
    Console.3.txt -> <delete>
- We can eventually create multiple loggers, ideally one for each facility (Audio, ServerHandler, etc.).
  That would allow us to quickly filter log messages and know right away which subsystem is responsible for them.
- Modern C++ string formatting. This of course only applies to the new functions such as log::debug(), not qDebug().

Only one "feature" is not reimplemented: showing a dialog in case of a fatal error, right before exiting the program.
However, that only worked on Windows and macOS using their native API, to avoid depending on a Qt event loop.
2025-01-21 02:55:19 +01:00
Davide Beatrici
104bab86e8
Merge PR #6511: REFAC(client): Introduce and use AudioPreprocessor 2025-01-21 02:12:07 +01:00
Davide Beatrici
a4b69de727 REFAC(client): Use AudioPreprocessor 2025-01-21 00:59:24 +01:00
Davide Beatrici
1186d6e3cf REFAC(client): Introduce AudioPreprocessor 2025-01-21 00:59:14 +01:00
Davide Beatrici
5452eefc87
Merge PR #6702: FIX(client): Infinite loop and log spam on ALSA input device disconnection 2025-01-15 21:31:25 +01:00
Davide Beatrici
d2dfcd34a5 FIX(client): Infinite loop and log spam on ALSA input device disconnection
A user reported that sometimes the client log gets spammed with repeated messages such as:

<W>2025-01-10 10:24:10.638 ALSAAudioInput: No such device: No such device

The error corresponds to ENODEV (19), which we treat like any other.
Since it's unrecoverable, the code gets stuck in a full speed loop until the audio engine is stopped.

This commit:

1. Switches from snd_pcm_prepare() to snd_pcm_recover(), which is specifically designed to recover streams.
2. Breaks the loop if the error is not one of the only three recoverable (EINTR, EPIPE, ESTRPIPE). Example log:

<W>2025-01-14 06:16:44.494 ALSAAudioInput encountered unrecoverable error: File descriptor in bad state -> exiting...

Please note that also ALSAAudioOutput doesn't explicitly handle fatal errors in its loop, but it shouldn't run "infinitely" at full speed because poll-based.
2025-01-15 20:48:24 +01:00
Hartmnt
eb78694834
Merge PR #6703: MAINT(ci): Update to macOS 14 on Azure Pipelines 2025-01-15 18:22:57 +01:00
Hartmnt
e57f6c52b3 MAINT(ci): Update to macOS 14 on Azure Pipelines
The macOS 12 image has been removed.

We skip version 13 since we always run the latest macOS on our own builder anyway.
2025-01-15 17:48:29 +01:00
Robert Adam
86bd72f86e
Merge PR #6700: CHANGE(server): Extended user stats now requires Ban ACL 2025-01-13 15:55:48 +01:00
Robert Adam
19950b2628 CHANGE(server): Extended user stats now requires Ban ACL
Previously, the Register ACL was required to get extended user
statistics (which includes used Mumble version, IP address etc.).
However, the Register ACL was deemed to be a rather arbitrary choice for
this. Instead, the Ban ACL was chosen as access to information such as
packet loss, IP address and used Mumble version and OS seem much more
relevant in the case of banning clients than it is for registering them.

Also, Ban permission is likely to be a better proxy for whether or not
someone is a moderator/admin on a given server than Register privilege.

Fixes #6697
2025-01-13 14:01:20 +01:00
Robert Adam
66e202fdf0
Merge PR #6604: FIX(client): Fix memory leaks due to BIO_NOCLOSE flag 2025-01-13 08:12:37 +01:00
Konstantin Goncharik
1fcb27f1fe FIX(client): Fix memory leaks due to BIO_NOCLOSE flag
BIO_set_close with BIO_NOCLOSE argument leads to OpenSSL not (fully)
deleting the allocated BIO struct under the assumption that the user
code has taken ownership of it. However, in our case, this is not the
case and therefore OpenSSL should do the deletion as usual.

The flag was probably introduced under the assumption that the component
that either is or isn't deleted by OpenSSL was the externally provided
buffer that is wrapped into a BIO object via BIO_new_mem_buf. However,
this is not the case. OpenSSL doesn't take ownership of the provided
buffer and therefore also doesn't delete it.

Closes #6603
2025-01-12 18:56:23 +01:00
Jan Klass
ba3a32d736
MAINT: Fix AF_LINK warnings through systemd
cd068fe3ee added `RestrictAddressFamilies=~AF_PACKET AF_NETLINK`

which was sourced from ba167269f8/trunk/murmur.service
where it was added in d609d47916
described as "hardening" without further reasoning or information.

The disallow of `AF_LINK` leads to continuous spamming of `Address family not supported by protocol` in the systlog. Dropping this resolves that.

Resolves #6180
2025-01-12 15:08:15 +01:00
Robert Adam
29ca4f0f36
Merge PR #6694: REFAC(server): Add explicit casts to avoid conversion warnings 2025-01-12 07:58:24 +01:00
Robert Adam
b1155e6465
Merge PR #6692: FIX(installer): Drop (outdated) copyright year from license 2025-01-11 22:29:18 +01:00
Robert Adam
7699d71827
Merge PR #6602: FIX(plugins): Unset active positional plugin on unloading it 2025-01-11 20:55:23 +01:00
Robert Adam
df74412eb8 REFAC(server): Add explicit casts to avoid conversion warnings
Fixes #6377 (hopefully for real, this time)
2025-01-11 20:09:40 +01:00
Robert Adam
30b9cba49e DOCS: Fixed typo 2025-01-11 20:09:30 +01:00
Robert Adam
d3389eac92 FIX(installer): Drop (outdated) copyright year from license
Fixes #6656
2025-01-11 19:49:48 +01:00
Robert Adam
5fd534a965
Merge PR #6691: FIX(server): Respect Qt's desired initialization order 2025-01-11 19:45:00 +01:00
sqwishy
e9c53b1ea2 FIX(plugins): Unlink active positional plugin before unloading
If a plugin is providing positional audio data and it becomes unloaded,
such as by disabling the plugin in the settings GUI, the plugin manager
may still interact with the plugin through m_activePositionalDataPlugin.

This looks unintentional and, in debug mode, this fails an assertion in
the plugin fairly quickly: `assertPluginLoaded(this)`.

Additionally, in case Mumble shuts down while there exists an active
positional data plugin, Mumble will (now) try to log that the plugin has
lost link by calling the respective function on the global Log instance.
However, at the point where the plugin manager object is destroyed, the
log has already been deleted, making this produce a segmentation fault.
To prevent this from happening, an explicit check for whether the Log
instance still exists has been added to the logging logic.

Fixes #6549
2025-01-11 18:34:36 +01:00
Robert Adam
7271bcaf05 FIX(server): Respect Qt's desired initialization order
In a Qt application, the QApplication object should be the first QObject
that is created. However, the `Meta` class used to have a static member
called `mp`, which means that this member gets initialized _before_
main() runs and therefore before the QApplication is created.

This has caused an "Invalid nullptr in QObject::connect" warning
somewhere in Qt's internals (since the move to Qt 6). The impact of this
warning is unclear at this point.

This commit makes the mp parameter a std::unique_ptr that gets
explicitly initialized in the main function (more or less right after
the QApplication object is created). This guarantees that the MetaParams
object does not get created before the QApplication object, fixing the
observed warning.

It is worth noting that we do have a couple of other static QObject
variables in the main translation unit, but these seem to be
inconsequential (at least they don't seem to trigger a similar warning).

Fixes #6669
2025-01-11 17:56:39 +01:00
Hartmnt
2aeb6cbbd3
Merge PR #6466: Complete rewrite of the tray icon implementation 2025-01-08 17:05:55 +01:00
Hartmnt
cdab9ec14b TRANSLATION: Update translation files 2025-01-08 13:20:35 +00:00
Hartmnt
6ed49dee0f FEAT(client): Add --hidden cli option to start Mumble hidden in tray
This commit introduces the "--hidden" cli option which prevents
Mumble and the ConnectDialog to show up on startup.
This is especially useful for users who want to automate the
startup process without human interaction.

Fixes #3879
2025-01-08 13:20:23 +00:00
Hartmnt
8221fcb063 FEAT(client): Implement tray icon highlighting
Previously, only "window highlighting" was supported
by Mumble. However, when Mumble was minimized to tray,
there was no way to observe that highlighting.

As requested in #4584, this commit introduces highlighting
to the tray icon. When a highlight message is received, the
tray icon will flash the "information icon" every two seconds
until the MainWindow of Mumble receives focus again.

To enable this for a specific message type, the user needs to
check the "highlight" box in the "Messages" configuration dialog.

Fixes #4584
2025-01-08 13:20:23 +00:00
Hartmnt
2c6ea6ed99 FEAT(client): Fully rewrite tray icon implementation
The old tray icon implementation was very old and contained
a lot of workaround for things that probably are no longer an issue.
Furthermore, the event loop was modified in a way such that it could
end up in an infinite loop draining CPU time and rendering Mumble
unusable.

Based on the new Qt5 implementation, this commit introduces
a complete rewrite of the tray icon. The following things should be noted:

* We assume the information in the Qt documentation [1] is valid. This
means that all versions of Windows, all Linux window managers/compositors
that implement the d-bus StatusNotifierItem specification, and all versions
of macos support the functionality of QSystemTrayIcon and its notification
system. That means we can drop the platform-specific code branches and handle
messages directly with QSystemTrayIcon::sendMessage. This should for example
also be true for recent versions of Gnome, which do not have an actual system
tray, but implement the d-bus StatusNotifierItem specification. Therefore, we
can actually merge and simplify the notification code for Windows and Unix*.

* With regards to the bullet point above, we only limit the "hide to tray"
functionality behind QSystemTrayIcon::isSystemTrayAvailable (because otherwise
you would not get the Mumble window back without binding a shortcut first).
Other code branches that were previously limited when isSystemTrayAvailable
returned false were removed. According to Qt, the QSystemTrayIcon code does not
actually care if a system tray is available and will even retroactively add itself
if a tray becomes available after the application was started.

* On (X)Wayland, the minimize button in the window frame does not trigger a
minimize change event. This means that users with such a system may only be
able to "hide to tray" by 1) pressing the close button in the window frame and
enabling "minimize instead of close" 2) clicking the tray icon or the tray icon
hide action or 3) binding a shortcut to hide the window. This is either a bug
or a deliberate decision by Qt or Wayland and we have no way to do anything
about that. (QTBUG-74310)

* The "messageClicked" event is buggy in Qt on some platforms. That means that
clicking the system notification spawned by Mumble via QSystemTrayIcon::sendMessage
will (on some systems) never trigger anything especially not showing and activating
the window. This is a long-standing bug in Qt (QTBUG-87329), but we have absolutely
no way to work around this. The event is correctly hooked up in Mumble and if
this is ever fixed in Qt, this will start working again automatically.

* The tray icon has been redesigned according to state-of-the-art tray icon
design guidelines [2]. Which basically just means: 1) d9a2d470ab has
been reverted to provide the user with a consistent menu 2) The main action of
the tray icon (toggle show/hide) is the first entry in the context menu
and the default action when the icon is clicked and 3) the TalkingUI toggle
action was added. Actions for double and middle mouse clicks were removed as
they might have contributed to infinite loops.

* There is no way in Windows to show and activate a window that is
not part of the current active process. If you have Mumble running in
the background and receive a message, we can not raise the Window without
you clicking the Mumble taskbar item or tray icon yourself. This
is deliberate by Microsoft and can and should not be circumvented. (#5701)

* This also fixes the case where the Mumble MainWindow would disappear when
pressing "OK" in the settings dialog. This happened because users would have
"minimize to tray" and "minimize on close" enabled.

[1]
https://doc.qt.io/qt-5/qsystemtrayicon.html#details
https://doc.qt.io/qt-6/qsystemtrayicon.html#details

[2] https://learn.microsoft.com/en-us/windows/win32/uxguide/winenv-notification

Fixes #1486
Fixes #3028
Fixes #3722
Fixes #3977
Fixes #3999
Fixes #5012
2025-01-08 13:20:23 +00:00