Bug 457019 - Can't remove manually added wallpaper
Summary: Can't remove manually added wallpaper
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Image & Slideshow wallpaper plugins (show other bugs)
Version: 5.25.3
Platform: Neon Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-07-22 14:10 UTC by Yaroslav Sidlovsky
Modified: 2022-07-24 01:10 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.24.7
Sentry Crash Report:


Attachments
wallpaper-remove-bug.mp4 (3.79 MB, video/mp4)
2022-07-22 14:10 UTC, Yaroslav Sidlovsky
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Yaroslav Sidlovsky 2022-07-22 14:10:16 UTC
Created attachment 150819 [details]
wallpaper-remove-bug.mp4

STEPS TO REPRODUCE
0. Download some new image for example `~/Pictures` folder;
1. Right click on desktop, click on `Configure Desktop and Wallpaper...` -> `Add Image...`, than select image from step 1;
2. Close `Desktop Folder Settings` dialog;
3. Open `Desktop Folder Settings` dialog again => delete button for new wallpaper is gone :(

OBSERVED RESULT
Delete button for new wallpaper is missing.

EXPECTED RESULT
Delete button should be visible for user added wallpapers.

SOFTWARE/OS VERSIONS
Operating System: KDE neon 5.25
KDE Plasma Version: 5.25.3
KDE Frameworks Version: 5.96.0
Qt Version: 5.15.5
Kernel Version: 5.15.0-41-generic (64-bit)
Graphics Platform: X11
Processors: 2 × AMD Ryzen 5 3600 6-Core Processor
Memory: 7.8 GiB of RAM
Graphics Processor: llvmpipe
Manufacturer: innotek GmbH
Product Name: VirtualBox
System Version: 1.2
Comment 1 Fushan Wen 2022-07-22 14:14:50 UTC
I don't remember the bug exists in 5.24 and the code is not changed in 
5.25. Can you post ~/.config/plasmarc before and after the custom 
wallpaper is added?
Comment 2 Yaroslav Sidlovsky 2022-07-22 14:17:38 UTC
P.S. If I save wallpaper image into `~/.local/share/wallpapers/` - image will be always removable.
See this line: https://invent.kde.org/plasma/plasma-workspace/-/blob/0f01d289befec6b3cc0135bb6bc2fa31cf52f00d/wallpapers/image/plugin/model/imagelistmodel.cpp#L97.
Comment 3 Yaroslav Sidlovsky 2022-07-22 14:18:11 UTC
(In reply to Fushan Wen from comment #1)
> I don't remember the bug exists in 5.24 and the code is not changed in 
> 5.25. Can you post ~/.config/plasmarc before and after the custom 
> wallpaper is added?

Wait a sec.
Comment 4 Yaroslav Sidlovsky 2022-07-22 14:27:34 UTC
(In reply to Fushan Wen from comment #1)
> I don't remember the bug exists in 5.24 and the code is not changed in 
> 5.25. Can you post ~/.config/plasmarc before and after the custom 
> wallpaper is added?

plasmarc doesn't exists before wallpaper was added, and after new wallpaper has been added it contains:
```
[Wallpapers]
usersWallpapers=/home/neon/Pictures/wallhaven-j3g7yy.jpg
```
Comment 5 Fushan Wen 2022-07-22 14:55:41 UTC
I suspect the config is not read if it does not exist before adding a 
custom wallpaper. But I can't reproduce on Plasma 5.26 as the wallpaper 
plugin has been refactored greatly.
Comment 6 Yaroslav Sidlovsky 2022-07-22 15:05:51 UTC
(In reply to Fushan Wen from comment #5)
> I suspect the config is not read if it does not exist before adding a custom wallpaper.

I can reproduce this bug even when plasmarc already exists on my home PC running Fedora.

> But I can't reproduce on Plasma 5.26 as the wallpaper plugin has been refactored greatly.

Then let's wait for version 5.26 :)

Thanks!
Comment 7 Nate Graham 2022-07-22 17:33:11 UTC
I can also not reproduce with current git master. Feel free to re-open if it still happens in Plasma 5.26. Thanks!
Comment 8 popov895 2022-07-23 13:15:32 UTC
Hmm, what about Plasma 5.25? Plasma 5.26 will only be released in three months.

P.S. I cannot reproduce this issue on openSUSE Tumbleweed.
Comment 9 Nate Graham 2022-07-23 16:58:31 UTC
The big refactor for Plasma 5.26 can't really be backported. It's just too much.

Please don't re-open issues that have been marked as FIXED unless you have new information indicating that the issue is not actually fixed in the version it is marked as fixed in.
Comment 10 Fushan Wen 2022-07-24 00:18:49 UTC
Git commit d6d47393bab32dc60b43e0eeac16c035000a0358 by Fushan Wen, on behalf of Eugene Popov.
Committed on 24/07/2022 at 00:18.
Pushed by fusionfuture into branch 'Plasma/5.25'.

[FIX] Unable to remove manually added wallpaper

It's not necessary to assign m_removableWallpapers asynchronously, because the value assigned to it doesn't depend on the result of that asynch function.

!!! This MR is for the Plasma/5.25 branch only and it SHOULD NOT be cherry-picket into the master branch.

M  +2    -1    wallpapers/image/plugin/backgroundlistmodel.cpp

https://invent.kde.org/plasma/plasma-workspace/commit/d6d47393bab32dc60b43e0eeac16c035000a0358
Comment 11 Fushan Wen 2022-07-24 00:19:46 UTC
Git commit ac6f1c858e1e6fa1f0a97f52769585d38ea098f3 by Fushan Wen, on behalf of Eugene Popov.
Committed on 24/07/2022 at 00:19.
Pushed by fusionfuture into branch 'Plasma/5.24'.

[FIX] Unable to remove manually added wallpaper

It's not necessary to assign m_removableWallpapers asynchronously, because the value assigned to it doesn't depend on the result of that asynch function.

!!! This MR is for the Plasma/5.25 branch only and it SHOULD NOT be cherry-picket into the master branch.


(cherry picked from commit d6d47393bab32dc60b43e0eeac16c035000a0358)

M  +2    -1    wallpapers/image/backgroundlistmodel.cpp

https://invent.kde.org/plasma/plasma-workspace/commit/ac6f1c858e1e6fa1f0a97f52769585d38ea098f3