Bug 441847

Summary: No longer possible to change panel launcher icons to a different image
Product: [Frameworks and Libraries] frameworks-kio Reporter: PrimeSuspect <primesuspect>
Component: Properties dialogAssignee: KIO Bugs <kio-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: ctrlaltca, imagesfromobjects, kdelibs-bugs, nate, stevenfalco
Priority: NOR    
Version: 5.86.0   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In: 5.88
Sentry Crash Report:

Description PrimeSuspect 2021-09-01 07:52:25 UTC
SUMMARY


STEPS TO REPRODUCE
1. Right-click a program launcher assigned to the panel (add to panel - widget)
2. From the properties window click the default launcher icon image to change it 
3. Navigate to a different image from the system icons or to a saved image file 

OBSERVED RESULT
The final 'OK' to change the launcher icon is not selectable


EXPECTED RESULT
The launcher icon should change to the different image selected


SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Comment 1 Fabio 2021-10-07 08:06:35 UTC
I verified this bug, it happens with the "icon" applet.
The applet tries to set the "filename" lineedit readonly:

https://invent.kde.org/plasma/plasma-workspace/-/blob/master/applets/icon/iconapplet.cpp#L561

this causes the lineedit to get set to an empty text:

https://invent.kde.org/frameworks/kio/-/blob/master/src/widgets/kpropertiesdialog.cpp#L1242

but because of this signal/slot connection created on the ctor, the ok button gets disabled if the lineedit is empty:

https://invent.kde.org/frameworks/kio/-/blob/master/src/widgets/kpropertiesdialog.cpp#L1032

A possible solution would be to disable the connection to the KFilePropsPlugin::nameFileChanged slot when setFileNameReadOnly() gets called.


A quick workaround for users to edit the icons: locate the relevant desktop file in ~/.local/share/plasma_icons and run eg:

kioclient5 openProperties ~/.local/share/plasma_icons/org.kde.kate.desktop

Please don't change the file name, or it will probably break.
Comment 2 Bug Janitor Service 2021-10-07 15:45:33 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kio/-/merge_requests/597
Comment 3 Fabio Bas 2021-10-13 15:22:19 UTC
Git commit 3d257472c1e953f9e6e80247ba9554b0d286c494 by Fabio Bas.
Committed on 13/10/2021 at 15:17.
Pushed by meven into branch 'master'.

KFilePropsPlugin: Allow to edit properties when setFileNameReadOnly is set

Don't empty the fileNameLineEdit to avoid the dialog ok button being disabled by nameFileChanged()

M  +0    -1    src/widgets/kpropertiesdialog.cpp

https://invent.kde.org/frameworks/kio/commit/3d257472c1e953f9e6e80247ba9554b0d286c494
Comment 4 Patrick Silva 2021-10-16 14:02:35 UTC
*** Bug 443796 has been marked as a duplicate of this bug. ***
Comment 5 Ahmad Samir 2021-10-20 21:56:33 UTC
*** Bug 442183 has been marked as a duplicate of this bug. ***
Comment 6 Nate Graham 2021-11-03 15:09:52 UTC
*** Bug 444564 has been marked as a duplicate of this bug. ***