[Applet / Wallpaper Configuration] Load config page with initial cfg properties already set
ClosedPublic

Authored by broulik on Mar 25 2016, 4:06 PM.

Details

Summary

Rather than creating the config page and then setting the properties afterwards have StackView load the item with all the cfg properties already set.

This prevents situations where a binding might limit a value to some range based on some config which isn't set by the time the limit is enforced as can be seen in the slideshow interval config.

Moreover, it makes Component.onCompleted in the config pages actually useful, I hope it will make dealing with ComboBoxes less tedious. On the downside it might break applet configs that rely on cfg_fooChanged to populate themselves which previously was required as at the time of Component.onCompleted the cfg_ properties were not yet populated.

Test Plan

I tried a bunch of aplets and observed that the configs were properly restored on opening the dialog, switching between config pages, the apply button worked properly, and the settings were applied correctly. Both in applet and wallpaper configs.

I noticed that switching between Image and Slideshow wallpapers breaks sizing of the images and everything but I think this has been the case previously, too, most likely because the wallpaper plugin checks for currentWallpaper being slideshow, so during the switch animation the old wallpaper config is still there and notices it's now slideshow and then shit hits the fan. Not sure if we actually support the usecase of if (configDialog.currentWallpaper === "foo"), we should make that a property on the config page like cfg_ rather than having it access stuff outside but that's another patch to be done :)

Diff Detail

Repository
R119 Plasma Desktop
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
broulik updated this revision to Diff 2953.Mar 25 2016, 4:06 PM
broulik retitled this revision from to [Applet / Wallpaper Configuration] Load config page with initial cfg properties already set.
broulik updated this object.
broulik edited the test plan for this revision. (Show Details)
broulik added a reviewer: Plasma.
broulik set the repository for this revision to R119 Plasma Desktop.
broulik added a project: Plasma.
Restricted Application added a subscriber: plasma-devel. · View Herald TranscriptMar 25 2016, 4:06 PM
mart accepted this revision.Apr 4 2016, 9:38 AM
mart added a reviewer: mart.
This revision is now accepted and ready to land.Apr 4 2016, 9:38 AM
This revision was automatically updated to reflect the committed changes.