Implement autostart via xdg-desktop-portal
Created by: gasinvein
Fixes #428 (closed)
This abstacts platform-specific autostart management. Autostart managers inheriting the base AbstractAutostartMgr
provide methods bool isAvailable
, bool canCheckEnabled
(tells if we can get the info if autostart is enabled or not (we can't from XDP)), bool isAutostartEnabled
and the setAutostartEnabled(bool)
slot to toggle autostart. Also they must emit autostartEnabled(bool)
signal on successful toggle.
When settings are applied, setAutostartEnabled
is called, then autostartEnabled
signal is received and its value is saved in config. This way we can keep track of autostart setting state even if the manager doesn't provide this this information.