Draft: applets/systemtray: track unsaved changes in visibility configuration & track unsaved changes in visibility configuration

Reason for the change

The Entries page of the System Tray configuration is mostly explicit apply, but not the keyboard shortcuts - these are applied immediately when a new shortcut is entered. This is confusing (as the dialog has an Apply button) and breaks consistency with individual applet's Shortcuts configuration page, which is explicit apply.

This change makes this dialog explicit apply, and will only prompt the user to Apply if the current state is different from the previously saved state.

  • applets/systemtray: track unsaved changes in visibility configuration

The visibility configuration for system tray entries is done as several (string) lists; item order does not matter. Currently, changing the configuration for one of them will mark the configuration as changed with no further check whether the configuration is actually different. Changing the state may change the order of things in the list even if the original state is restored, so the automatic handling in the general applet configuration will consider them different.

To solve this, we switch to an intermediate set of lists that is filled with the configuration initially, and write to the real config properties only when saving.

Test plan

  1. Open System Tray configuration
  2. Change a shortcut
  3. (without) shortcut work immediately, can't cancel (with) Apply active, shortcut works only after saving config
  4. change visibility of an entry
  5. undo previous changes
  6. (without) Apply still enabled (with) Apply disabled

Screenshots or screen recordings

N/A

Bugs fixed

N/A

Merge request reports

Loading