Commit Graph

1176 Commits

Author SHA1 Message Date
Ilya Fedin 3cb333d323 Fix counter paint when DPR != 1 in Linux tray 2022-12-09 16:04:07 +04:00
Ilya Fedin 2565b948d9 Cache system icon in Linux tray 2022-12-09 16:04:07 +04:00
Ilya Fedin 577f4b6271 Don't check com.canonical.Unity for the counter
It seems there's a race condition when Telegram is auto-started on Plasma and it doesn't hurt to issue the signal always, so just remove the check
2022-12-09 09:19:00 +04:00
Klemens Nanni 9c27271571 Use std::invoke_result_T not ::result_of to fix C++20 tdesktop 4.3.4
tdesktop defaults to (probably requires) C++20, but `std::result_of`[0]
was deprecated in C++17 and removed in C++20.

0: https://en.cppreference.com/w/cpp/types/result_of
2022-12-09 09:12:34 +04:00
Ilya Fedin 5990b0fabf Fix build with Qt 5 2022-12-08 10:15:59 +04:00
Ilya Fedin 6f50906952 Don't use unneeded QEventLoop::ApplicationExec 2022-12-07 11:27:49 +04:00
John Preston 8937d732f6 Fix build with GCC. 2022-12-06 18:08:07 +04:00
23rd e2205c7251 Fixed build on macOS. 2022-12-06 12:56:56 +03:00
John Preston 48148a8cc3 Revert "Provide the same sizes for tray icon as for main window icon"
This reverts commit f9bf68461d.
2022-12-06 12:55:09 +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
John Preston ad3f8e72a0 Remove namespace App. 2022-11-30 17:28:09 +04:00
John Preston 01139e1b04 Remove facades module. 2022-11-30 16:55:51 +04:00
John Preston eaed91263e Simplify HistoryHider, remove most of uses. 2022-11-30 16:13:31 +04:00
23rd 2acedca6b7 Replaced some qstr with u""_q literal. 2022-11-29 14:12:50 +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 b383dad6ac Install launcher before registering URL scheme 2022-11-28 12:12:09 +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 4484edd212 Get rid of unneeded QTextStream from GenerateDesktopFile 2022-11-26 17:26:52 +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 9ee4ad95d0 Fix GApplication with some binary paths 2022-11-26 17:26:52 +01:00
Ilya Fedin 4ade80905f Add proper build-time checks to AutostartSupported on Linux 2022-11-26 17:26:52 +01:00
Ilya Fedin 94b4809cdf Get XDG activation token also from DESKTOP_STARTUP_ID 2022-11-25 15:11:25 +01:00
Ilya Fedin 109f6614f0 Unset XDG_ACTIVATION_TOKEN after used with GApplication 2022-11-25 15:11:25 +01:00
John Preston 8a288476b8 Implement pinned topics reordering. 2022-11-22 00:26:48 +00:00
Ilya Fedin a94dd22caa Rewrite GenerateDesktopFile using Glib::KeyFile and KShell 2022-11-21 21:30:17 +00:00
Ilya Fedin 899ab9a16a Fix range loop warnings in Snap build 2022-11-21 21:30:17 +00:00
Ilya Fedin 2f0d14bd35 Use customWorkingDir() outside of Core::Launcher
This allows to add -workdir to shortcuts only if the process was launched with -workdir
2022-11-21 21:30:17 +00: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
Ilya Fedin a1e60a3f20 Ensure GNotification is not autodetected in snap
Snap reports it as present, but prevents the access and GNotification attempts to use portal that doesn't work in snap
2022-11-19 02:21:51 +04:00
Ilya Fedin 768fc9b8f6 Use the new Glib::Variant qint64/quint64 compatibility with old code 2022-11-18 20:40:33 +04:00
Ilya Fedin b9b6a9e747 Follow desktop file naming specification
This is required for GApplication to enable all the features

https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html#file-naming
2022-11-18 20:40:33 +04:00
Ilya Fedin b4d310fd1e Don't subscribe to inhibiton changes when not supported 2022-11-18 20:40:33 +04:00
Ilya Fedin f9dd2b4a0a Support GNotification
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.
2022-11-18 20:40:33 +04:00
Ilya Fedin 9726b3c298 Avoid race condition when registering Wayland interfaces 2022-11-11 11:47:01 +04:00
Ilya Fedin f542a026ec Add _GTK_APPLICATION_ID support 2022-11-07 18:16:49 +04:00
Ilya Fedin fc4682d77e Get rid of TDESKTOP_LAUNCHER_BASENAME
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.
2022-11-07 13:47:58 +04:00
Ilya Fedin a507edb67a Get rid of workarounds for old flatpak versions
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.
2022-11-07 13:47:58 +04:00
Ilya Fedin 1336a7149b Update glibmm to latest version 2022-11-03 14:45:01 +04:00
Ilya Fedin ba9f5d138a Use some APIs from newer glibmm 2022-11-02 21:02:46 +04:00
John Preston fdf4129e5e Fix build with GCC. 2022-11-02 08:51:03 +04:00
John Preston 1ac051a812 Implement forwarding to topics. 2022-11-01 19:25:44 +04:00
John Preston 602ba5bba9 Implement correct ForumTopic::canWrite logic. 2022-11-01 19:25:42 +04:00
23rd fd2edb51e9 Fixed build in Xcode. 2022-11-01 19:25:41 +04:00
John Preston 4910a60499 Track mentions / reactions together with unread. 2022-11-01 19:25:40 +04:00
John Preston d4255bbfe4 Fix build with Xcode. 2022-11-01 19:25:38 +04:00
John Preston 92a4b27e65 Support per-topic notification settings. 2022-11-01 19:25:37 +04:00
John Preston 5e82433693 Fix build with Xcode. 2022-11-01 19:25:35 +04:00
John Preston 1401b19994 Add PaintContext for Dialogs::Ui::RowPainter. 2022-11-01 19:25:34 +04:00