It's used if there's a gtk notification daemon or application is running sandboxed without access to the freedesktop protocol.
GNotification API is poor, but should feel native on environments using GNOME technologies.
This key was mainly used to let flatpak and snap provide right desktop file name.
Now, we can compute it from the environment in runtime for both flatpak and snap.
There's no more need in this option. Desktop filename override by downstreams is highly discouraged.
The minimal supported flatpak version since Qt 6.x is 1.14.0.
Flatpak shares temp directory and runtime directory between launches since 1.11.1.
FLATPAK_ID is defined since 1.1.2.
This is a leftover of something that wasn't finiched and looks like won't be finished. It also feels that's not a good idea to mix Linux and Haiku in the same file though...
Telegram listens for a signal that indicates when the color-scheme
changes. The signal itself includes the new value, but Telegram
currently queries for the value immediately after getting the signal.
This second round-trip is unnecessary, since the signal itself contains
the same information.
This changeset avoids this follow-up query, and drops the now-unused
`Setter`.
XDG is inventing new tray specification, so SNI will be outdated soon and it's better to just use QSystemTrayIcon.
I believe all the major drawbacks of QSystemTrayIcon are solved and we can live with minor ones.
Given the planned MainWindow refactoring, it seems it's the best time to do that.
QApplication has a historical feature[1] of calling setlocale(3) at init,
which today cause more harm than good. Such call isn't thread safe neither
per C standard, not per any known libc implementation. The Gio threads
would call into locale reading functions all the time, so early access to
locale by Gio may race with setlocale() by Qt leading to undefined behavior.
Platform specific start before the Sandbox (aka QApplication) is at core
design of tdesktop and that order can't be changed. There is no way to pause
Gio until QApplication instantiates.
Fortunately, Qt library itself has a static global flag that prevents it
from calling setlocale() twice. We don't even need to instantiate a
temporary QCoreApplication, we can just call into the method. So call
it form Platform::start before any existing or future calls to Gio.
Fixes#16922
[1] https://chat.stackoverflow.com/rooms/63812/discussion-between-phil-armstrong-and-matteo-italia