Commit graph

888 commits

Author SHA1 Message Date
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
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
92a4b27e65 Support per-topic notification settings. 2022-11-01 19:25:37 +04:00
Ilya Fedin
f9bf68461d Provide the same sizes for tray icon as for main window icon 2022-10-16 18:04:07 +04:00
Ilya Fedin
2d69329dc9 Set linux webview debug mode via D-Bus IPC 2022-10-03 09:29:25 +04:00
Ilya Fedin
2a6e2fa353 Bundle kcoreaddons 2022-09-28 23:59:59 +04:00
Ilya Fedin
f2d2826fc7 Make InstallLauncher accessible on any platform 2022-09-19 14:23:27 +04:00
Ilya Fedin
cfa12fb0cc Move AppRuntimeDirectory to private namespace 2022-09-19 14:23:27 +04:00
Ilya Fedin
d9318c9935 Move icon name getter to cross-platform header 2022-09-19 14:23:27 +04:00
Ilya Fedin
5132fd5010 Use KSandbox to check flatpak/snap environment 2022-09-19 14:23:27 +04:00
Ilya Fedin
89879e355d Replace EscapeShell with KShell::joinArgs 2022-09-19 14:20:02 +04:00
Ilya Fedin
88f1f8ff22 Move QGuiApplication::setDesktopFileName call to Platform::start
It depends on Core::UpdaterDisabled that is not initialized in Launcher::initHook yet
2022-09-05 08:24:48 +04:00
Ilya Fedin
feb6107ce6 Qt 6.4 supports window activation with tray on Wayland 2022-09-02 21:27:41 +04:00
Ilya Fedin
38da0e086d Get rid of lib_waylandshells 2022-09-02 21:27:41 +04:00
Ilya Fedin
f1092753fc Remove version from the .desktop file
Some desktop environments hide the launcher if they don't know the version
2022-09-01 13:53:53 +04:00
Ilya Fedin
5fc7caeec9 Provide old version to Platform::NewVersionLaunched 2022-09-01 13:53:53 +04:00
Ilya Fedin
8c1bef929e A better way of PiP aspect ratio handling on Wayland 2022-08-08 11:05:52 +04:00
Ilya Fedin
bf339de773 Always pass activation_token option
glib shows a warning about invalid GVariant and empty activation_token shouldn't hurt I believe
2022-08-04 17:12:07 +04:00
Ilya Fedin
9e63fc5acd Let PiP have custom buffer size on Wayland 2022-08-04 16:41:25 +04:00
Ilya Fedin
d500714242 Use xdg-activation to open URLs&files 2022-08-03 15:26:08 +04:00
Ilya Fedin
66c9587650 Add fail callback to linux notifications exceptions handler 2022-07-31 12:21:24 +04:00
Ilya Fedin
8e8a209aad Guard linux notification inhibition checks 2022-07-28 20:18:51 +04:00
Ilya Fedin
bb8ffcac3a Default to Wayland on GNOME for new installs 2022-07-28 20:17:49 +04:00
Ilya Fedin
9b8dcec26e Ensure notification manager is not null before first call to setManager in cross-platform code 2022-07-26 21:11:17 +04:00
Ilya Fedin
6718d238af Switch to the dummy notification manager when notification daemon is not running on Linux 2022-07-26 21:11:17 +04:00
Ilya Fedin
dd70a6f659 IsQualifiedDaemon -> ByDefault 2022-07-26 21:11:17 +04:00
Ilya Fedin
ff2bd86744 Have a central place for catch-based logging of linux native notifications 2022-07-26 21:11:17 +04:00
Ilya Fedin
d2e3c01c11 Get linux notification inhibition state asynchronously
This is the last sync request in the D-Bus notifications
2022-07-26 21:11:17 +04:00
Ilya Fedin
e8477e5911 Get rid of 'paramtersCopy' in dbus code 2022-07-26 21:09:30 +04:00
23rd
57f769f358 Returned lost method that checks tray existence. 2022-06-23 09:38:21 +03:00
Ilya Fedin
798998203a Get XDG activation token from native notification on Linux 2022-06-15 12:55:59 +04:00
Ilya Fedin
6ee08faa24 Migrate from kwayland to QtWaylandScanner 2022-06-14 16:36:44 +04:00
Ilya Fedin
391a3a77f6 Use Qt's xdg-desktop-portal file dialog implementation 2022-06-14 16:36:44 +04:00
Ilya Fedin
2477b35b42 Move tray availability logging to the appropriate class 2022-06-14 16:36:44 +04:00