set the wallpaper when applying look and feel
Needs ReviewPublic

Authored by mart on May 15 2019, 2:00 PM.

Details

Reviewers
None
Group Reviewers
Plasma
Summary

A LNF package can optionally define a wallpaper
which can be either a wallpaper package name or a
file name to be found in either of the standard wallpaper locations
(/usr/share/wallpapers, ~/.local/share wallpapers and so on)

when a lnf is switched and the new one contains a wallpaper,
the wallpaper of the primary screen of the current activity of plasma
(and only that one) will be switched to the new wallpaper

D21226 takes care of loading the correct defaults when plasma starts with an empty config file

Test Plan

tested with both themes that specify a wallpaper and those who don't
also tested with themes with an invalid wallpaper in which case it notices and
doesn't try to switch

Diff Detail

Repository
R119 Plasma Desktop
Branch
mart/wallpaperLoolAndFeel
Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 11856
Build 11874: arc lint + arc unit
mart created this revision.May 15 2019, 2:00 PM
Restricted Application added a project: Plasma. · View Herald TranscriptMay 15 2019, 2:00 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
mart requested review of this revision.May 15 2019, 2:00 PM
mart updated this revision to Diff 58128.May 15 2019, 2:19 PM
  • add property for applyWallpaper

I'm not completely blocking this, but I have two concerns with this patch:


  1. wallpaper is somewhat different to the other configs, I'm not super convinced we want to reset it without prompts

  1. the resetting has potential to mess with 3rd parties setting the wallpaper.

From a customer project we have:
usr/share/plasma/look-and-feel/net.bluesystems.[redacted]/contents/plasmoidsetupscripts/org.kde.plasma.folder.js:applet.writeConfig("Image", "file:///usr/share/wallpapers/[redated]os.jpg")

Currently:
if you click on the lnf with reset layout you go to the lnf set one. That will result in it switching to the distro set one if available otherwise fall back to lnf
if you click on the lnf without reset layout you don't change the wallpaper at all

After this patch:
if you click on the lnf with reset layout everything is as before. That's all good.

if you click on the lnf without reset layout we will:

  • if defaults exist and wallpaper is set, change it
  • if defaults exist and wallpaper is not set, do nothing
  • if defaults does not exist, load the wallpaper from the superclass lnf

Which might seem a bit random.

I have a feeling we'll get user complaints and bug reports if we unconditionally reset the wallpaper when applying a global theme. Before we do this, I think we need to add a mechanism to allow the user to choose which parts get applied, per the discussion in T11746: Make it possible to see what a Global Theme will change and only apply certain parts of it.