applets/systemtray: prompt user only when entries actually changed
Reason for the change
- applets/systemtray: prompt user only when entries actually changed
The Entries config page currently always prompts the user if anything was changed, even if the original state was manually restored – but only for entry visibility, not for shortcuts, which are always applied immediately despite the explicit Apply button in the dialog.
This change makes the page consistently and only prompt the user if the current state was changed. This is somewhat more involved compared to usual applet config pages, due to the complex representation of state and the fact that the underlying model can change while the dialog is open and modified (by adding/removing open apps with SNIs), and we should handle this in a reasonable way. To do this, we keep separate lists of proposed changes, then apply them when saving. This also allows us to handle InlineMessages for particular states in a more declarative way.
Test plan
- Open System tray config -> Entries
- Change visibility / shortcuts
- Undo changes manually
- (without) apply enabled (with) apply disabled
Also worth testing: 1-2, add a SNI (e.g. enabling it in Neochat), remove it again, test both apply and manual undo still work correctly.
Screenshots or screen recordings
N/A
Bugs fixed
N/A
Supersedes !5390 (closed)