Commit graph

184 commits

Author SHA1 Message Date
Ilya Fedin
471831bcd6 Revert "Remove not really needed notification capability checks"
This reverts commit abdfa4f785.
2024-04-25 15:07:51 +04:00
Ilya Fedin
b1e64419a5 Fix setting application icon in Linux notifications 2024-04-25 11:31:43 +04:00
Ilya Fedin
e2f17f1131 Remove unneeded includes from notifications_manager_linux 2024-04-25 11:31:43 +04:00
23rd
1c223e570a Slightly improved code style for long equality expressions. 2024-04-15 11:20:30 +04:00
Klemens Nanni
776e80b4d6 Fix tdesktop 4.15.6 build on OpenBSD
7.5-current with clang 16.0.6 and Qt6 fails, not entirely sure why...
2024-04-04 15:52:01 +04:00
Ilya Fedin
e07d53725c Strip notification service start error 2024-04-01 09:59:19 +04:00
Ilya Fedin
59e53c1edf Port NotificationId conversion to cppgir 2024-03-15 00:00:24 +04:00
Ilya Fedin
c0b612c457 Update cppgir 2024-03-14 09:29:10 +04:00
Ilya Fedin
abdfa4f785 Remove not really needed notification capability checks
If the notification daemon doesn't support any of the hints, it will just ignore them
2024-03-13 20:46:34 +04:00
Ilya Fedin
c9d58d4259 Use HasCapability directly as an argument to ranges::all_of 2024-03-13 20:46:34 +04:00
Ilya Fedin
dba9cada83 Don't check whether specification version is null
We log specification version anyway
2024-03-13 20:46:34 +04:00
Ilya Fedin
0ec5181566 Pre-normalize notification daemon versions 2024-03-13 20:46:34 +04:00
Ilya Fedin
886847f457 Port notifications_manager_linux to cppgir 2024-03-13 20:46:34 +04:00
Ilya Fedin
5b62d97288 Update submodules 2024-03-08 08:05:12 +04:00
Ilya Fedin
6bc0179919 Work with GLIB_VERSION_MAX_ALLOWED 2023-10-07 07:08:21 +04:00
Ilya Fedin
2878533078 Re-throw original exception in Linux notification's StartServiceAsync 2023-10-04 12:07:36 +04:00
Sergey A. Osokin
ac520b314d Fix build on FreeBSD 2023-10-02 18:47:10 +04:00
John Preston
99f4b93745 Attempt to fix build with Clang on Linux. 2023-10-02 17:56:10 +04:00
Ilya Fedin
a757e07c3a Line length clean up in notifications_manager_linux 2023-10-02 16:11:02 +04:00
Ilya Fedin
9019a2cb08 Remove an unneeded intermediate variable 2023-09-27 10:32:24 +04:00
Ilya Fedin
df29af5aea CentOS 7 -> Rocky Linux 8 2023-09-20 22:32:35 +04:00
Ilya Fedin
0f86968afd Use ServerInformation without std::optional 2023-09-20 17:52:39 +04:00
Ilya Fedin
90f52d80d7 Avoid global copying in Linux native notifications 2023-09-20 17:52:39 +04:00
Ilya Fedin
4e97599e9d Use Glib::ustring in Linux notification globals 2023-09-20 17:52:39 +04:00
Ilya Fedin
e0b4d1edce Avoid unneeded std::string casts in exception handling 2023-09-20 17:45:37 +04:00
Ilya Fedin
0b4ef3214e Leverage QImage's CoW in Linux native notifications 2023-09-12 10:29:29 +04:00
Ilya Fedin
bf255c0e00 Don't use crl::on_main unnecessarily in Linux native notifications code
All those dbus methods call callbacks on the same thread
2023-09-11 11:11:04 +04:00
Ilya Fedin
da55698a51 Generate GUID for GNotification
That's what g_application_send_notification does when ID is not passed and that simplifies the code
2023-08-03 18:12:55 +04:00
Ilya Fedin
9ccb11bd1a Avoid using const_string for constant consumed by std::string 2023-07-20 21:39:06 +04:00
Ilya Fedin
f817df9d7f Use new glibmm 2.78 API 2023-07-20 17:58:07 +04:00
Ilya Fedin
0534a2fb62 Fix QGuiApplication::desktopFileName usage
The Qt documentation says:
This is the file name, without the full path or the trailing ".desktop" extension of the desktop entry that represents this application according to the freedesktop desktop entry specification.

Qt 6.5.2 also automatically fixes it breaking all the current tdesktop and desktop-app usage expecting the file extension.
2023-07-19 23:51:50 +04:00
Ilya Fedin
ae93455101 Update glibmm to 2.76.0 2023-03-17 18:56:23 +04:00
John Preston
32e650548f One more attempt to fix DND on macOS. 2023-03-15 15:00:29 +04:00
Ilya Fedin
c5acef8c53 Deduplicate notification actions on Linux
As there are notification daemons with quick reply support and GNotification API having mandatory default action support now, it's the time to reconsider button arrangement.

This also makes it possible for legacy notification daemons without default action support opening the chat when no buttons are allowed since 05524c3f6c again.
2023-03-02 17:33:06 +04:00
Ilya Fedin
f71e7812e6 Don't hold GApplication
That's a much better way to avoid defunct event loop that will work in any edge case

Also don't assume GApplication is always running in Platform::Notifications::Enforced
2023-02-18 20:33:40 +04:00
Ilya Fedin
9b154b3c91 Ensure freedesktop capabilities aren't used when GNotification is used 2023-01-13 10:24:06 +04:00
Ilya Fedin
a1f9b5a96f Get GApplication out of experimental settings
GApplication will always be used on Linux now. GNotification gets a toggle instead.
2023-01-12 21:49:16 +04:00
Ilya Fedin
9b7826ea0d Get GApplication out of experimental settings
GApplication will always be used on Linux now. GNotification gets a toggle instead.
2023-01-12 21:30:45 +04:00
Ilya Fedin
1666683dbb Fix various line length in notifications_manager_linux 2022-12-29 12:30:17 +04:00
Ilya Fedin
c134861cd9 Have notification subtitle in title on Linux when body-markup is not supported
This makes it look way better
2022-12-29 12:30:17 +04:00
Ilya Fedin
a3caecbc07 Fix build with clang 2022-12-29 09:32:07 +04:00
Ilya Fedin
13eeddf479 Don't wait for input when there are fullscreen applications 2022-12-23 14:04:17 +04:00
John Preston
8937d732f6 Fix build with GCC. 2022-12-06 18:08:07 +04:00
John Preston
cb653df0f6 Support adaptive forum userpic rounding radius. 2022-12-05 16:18:10 +04:00
23rd
4fabb3f2a2 Replaced some qsl with u""_q literal. 2022-11-30 17:17:14 +03:00
Ilya Fedin
05524c3f6c Don't show reply button in Linux native notifications when it's not supposed to
All modern notification daemons have support for the default action and it's a requirement with the portal spec
2022-11-28 21:55:00 +01:00
Ilya Fedin
2bda3c4e2b Don't save temp file for native notification userpics on Linux 2022-11-26 22:15:39 +01:00
Ilya Fedin
ace363f432 Use GBytesIcon with GNotification
GFileIcon is not supported by xdg-desktop-portal
2022-11-26 17:26:52 +01:00
Ilya Fedin
d6ed23b3dd Fix race condition between GApplication and GNotification 2022-11-26 17:26:52 +01:00
Ilya Fedin
9b66b76bac Use GNotification only in flatpak by default
The UX is not the best without sound, so there's no advantage in using GNotification on GNOME.

Remove mention about being native to GNOME as it's not true anymore.
2022-11-20 08:52:36 +00:00