Bug 438585

Summary: Removing wallpaper doesn't trigger Apply button
Product: [Applications] systemsettings Reporter: medin <med.medin.2014>
Component: kcm_screenlockerAssignee: Plasma Bugs List <plasma-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: bugseforuns, nate, plasma-bugs-null, qydwhotmail
Priority: NOR    
Version First Reported In: 5.21.5   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In: 5.26
Sentry Crash Report:
Attachments: Removing wallpaper doesn't trigger Apply button

Description medin 2021-06-14 01:43:48 UTC
Created attachment 139299 [details]
Removing wallpaper doesn't trigger Apply button

Both in Desktop Folder and Lock Screen settings, if you click on remove icon of any image the Apply button remains disabled.
See attached video for more info.

Operating System: Manjaro Linux
KDE Plasma Version: 5.21.5
KDE Frameworks Version: 5.82.0
Qt Version: 5.15.2
Kernel Version: 5.4.123-1-MANJARO
OS Type: 64-bit
Graphics Platform: X11
Comment 1 Patrick Silva 2021-06-14 13:25:26 UTC
Can reproduce on neon unstable.
Comment 2 Nate Graham 2021-06-16 15:31:46 UTC
Typically I would say that it's just missing a `setNeedsSave(true);` call somewhere, but this isn't a KCM so that doesn't exist. Not sure how dirty state management is handled here.
Comment 3 medin 2022-07-15 18:09:57 UTC
This was fixed only for desktop wallpaper but not for lock screen wallpaper.
Comment 4 medin 2022-07-15 18:11:12 UTC
Tested on:
Operating System: Manjaro Linux
KDE Plasma Version: 5.25.80
KDE Frameworks Version: 5.97.0
Qt Version: 5.15.5
Kernel Version: 5.17.15-1-MANJARO (64-bit)
Graphics Platform: X11
Comment 5 Fushan Wen 2022-09-25 11:13:01 UTC
Git commit a7a48b39451794f9134df3ba3804031b16d88c6e by Fushan Wen.
Committed on 25/09/2022 at 11:12.
Pushed by fusionfuture into branch 'Plasma/5.26'.

wallpapers/image: always emit `configurationChanged` after a wallpaper is removed
(cherry picked from commit eb1d7431dfad10b7f9bd71be6d0dc633b5bc9cc2)

M  +1    -2    wallpapers/image/imagepackage/contents/ui/WallpaperDelegate.qml

https://invent.kde.org/plasma/plasma-workspace/commit/a7a48b39451794f9134df3ba3804031b16d88c6e
Comment 6 Fushan Wen 2022-09-25 11:13:24 UTC
Git commit eb1d7431dfad10b7f9bd71be6d0dc633b5bc9cc2 by Fushan Wen.
Committed on 25/09/2022 at 11:11.
Pushed by fusionfuture into branch 'master'.

wallpapers/image: always emit `configurationChanged` after a wallpaper is removed

M  +1    -2    wallpapers/image/imagepackage/contents/ui/WallpaperDelegate.qml

https://invent.kde.org/plasma/plasma-workspace/commit/eb1d7431dfad10b7f9bd71be6d0dc633b5bc9cc2
Comment 7 Bug Janitor Service 2022-09-25 11:51:17 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kscreenlocker/-/merge_requests/102
Comment 8 Fushan Wen 2022-09-30 00:11:39 UTC
Git commit 2f31a3387bac46dba11d8f64b970df06b43efafe by Fushan Wen.
Committed on 30/09/2022 at 00:10.
Pushed by fusionfuture into branch 'master'.

wallpapers/image: allow wallpaper plugin to force enable the apply button

Currently there is no way to enable the apply button if the wallpaper
config is not changed, but the image wallpaper plugin needs to force
enable the apply button after an image is removed temporarily. This
allows to force enable the apply button by adding a boolean to kcm, to
let `isSaveNeeded` depend on the boolean, so when the boolean is true,
the apply button can be enabled without the need to have any change in
wallpaper config.
FIXED-IN: 5.26

M  +9    -1    kcm/kcm.cpp
M  +2    -0    kcm/kcm.h
M  +1    -0    kcm/package/contents/ui/Appearance.qml
M  +6    -0    kcm/package/contents/ui/WallpaperConfig.qml

https://invent.kde.org/plasma/kscreenlocker/commit/2f31a3387bac46dba11d8f64b970df06b43efafe
Comment 9 Fushan Wen 2022-09-30 00:14:20 UTC
Git commit f40a15c0067781fb91f28676e9340780bc58e223 by Fushan Wen.
Committed on 30/09/2022 at 00:14.
Pushed by fusionfuture into branch 'Plasma/5.26'.

wallpapers/image: allow wallpaper plugin to force enable the apply button

Currently there is no way to enable the apply button if the wallpaper
config is not changed, but the image wallpaper plugin needs to force
enable the apply button after an image is removed temporarily. This
allows to force enable the apply button by adding a boolean to kcm, to
let `isSaveNeeded` depend on the boolean, so when the boolean is true,
the apply button can be enabled without the need to have any change in
wallpaper config.
FIXED-IN: 5.26


(cherry picked from commit 2f31a3387bac46dba11d8f64b970df06b43efafe)

M  +9    -1    kcm/kcm.cpp
M  +2    -0    kcm/kcm.h
M  +1    -0    kcm/package/contents/ui/Appearance.qml
M  +6    -0    kcm/package/contents/ui/WallpaperConfig.qml

https://invent.kde.org/plasma/kscreenlocker/commit/f40a15c0067781fb91f28676e9340780bc58e223