Bug 402930 - After you use the image picker to change the background image, your chosen image appears in the picker, but disappears if you navigate away from the KCM and then go back
Summary: After you use the image picker to change the background image, your chosen im...
Status: RESOLVED FIXED
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_sddm (show other bugs)
Version: 5.14.4
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: David Edmundson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-01-06 15:58 UTC by Nate Graham
Modified: 2019-02-05 16:31 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 5.15.0


Attachments
Prospective patch (1.03 KB, patch)
2019-01-06 23:32 UTC, Nate Graham
Details
Patch take two (1.38 KB, patch)
2019-01-07 11:39 UTC, Nate Graham
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nate Graham 2019-01-06 15:58:40 UTC
SUMMARY


STEPS TO REPRODUCE
1. Use the image picker to select an image
2. Apply
3. See that the image shows up in the image picker
4. Navigate somewhere else
5. Go back to the SDDM KCM

OBSERVED RESULT
The image picker shows a generic image

EXPECTED RESULT
The image picker should show the image you chose last time
Comment 1 David Edmundson 2019-01-06 21:46:50 UTC
Works here.
After apply and go through all the kauth stuff?
Comment 2 Nate Graham 2019-01-06 21:58:45 UTC
Found the bug: it's storing the file path as just the filename, not the full path. Putting a full absolute file path in the Background= key in /usr/share/sddm/themes/breeze/theme.conf.user fixes the issue for me. Patch coming soon...
Comment 3 Nate Graham 2019-01-06 23:32:55 UTC
Created attachment 117312 [details]
Prospective patch

I might need a little help here, if you can spare the time. The attached patch fixes the issue in the KCM for me, but then SDDM doesn't load after a reboot, and I'm not really knowledgeable enough about how it works to figure out why.
Comment 4 Nate Graham 2019-01-07 11:38:42 UTC
Hmm, even putting an absolute path in /usr/share/sddm/themes/breeze/theme.conf.user without changing any code breaks login in the same way.
Comment 5 Nate Graham 2019-01-07 11:39:48 UTC
Created attachment 117326 [details]
Patch take two

This one might be a better approach but also breaks.
Comment 6 Nate Graham 2019-01-31 00:26:22 UTC
It turns out that the breakage I encountered while trying patches to fix this bug is a pre-existing issue that was not introduced with my patch: https://github.com/sddm/sddm/issues/1132

Both patches actually worked!
Comment 7 David Edmundson 2019-02-05 10:39:36 UTC
Git commit dc1922e6aa486500cb3d4cfeb0243bb2f5fdeb25 by David Edmundson.
Committed on 05/02/2019 at 10:39.
Pushed by davidedmundson into branch 'Plasma/5.15'.

Fix loading of background image preview

Summary:
50445f794b3142f29dcc043f3af83c549c694bcd changed how wallpapers worked.
Instead of storing an absolute path in the config we move the file and
saves a relative path.

The preview icon still expected an absolute path.

This patch loads the image in the same way SDDM expects.
FIXED-IN: 5.15.0

Test Plan:
Set image
Reopened KCM

Reviewers: #plasma, ngraham

Reviewed By: ngraham

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D18614

M  +6    -4    src/themeconfig.cpp
M  +1    -1    src/themeconfig.h

https://commits.kde.org/sddm-kcm/dc1922e6aa486500cb3d4cfeb0243bb2f5fdeb25
Comment 8 David Edmundson 2019-02-05 10:39:36 UTC
Git commit 159e2dcbf935c1aa543a33b1865b6f4a986401e6 by David Edmundson.
Committed on 05/02/2019 at 10:39.
Pushed by davidedmundson into branch 'Plasma/5.15'.

Fix mime type filter on background selection button

Summary:
Ported to explicit QFileDialog instance instead of static method partly
because I don't understand how to use the magic nameFilter syntax to set
mimes, partly to ease the eventual porting to QtQuick which can't have a
blockign dialog.

Test Plan:
Clicked on the button
Only image files were listed
Selecting one still worked

Reviewers: #plasma, ngraham

Reviewed By: ngraham

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D18615

M  +16   -5    src/configwidgets/selectimagebutton.cpp

https://commits.kde.org/sddm-kcm/159e2dcbf935c1aa543a33b1865b6f4a986401e6