File: upstream_cdca22a5_applets-kicker-handle-icon-dialog-being-accepted.patch

package info (click to toggle)
plasma-desktop 4%3A6.3.6-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 61,044 kB
  • sloc: cpp: 37,691; ansic: 2,617; python: 1,386; javascript: 1,163; xml: 1,082; sh: 128; makefile: 16
file content (38 lines) | stat: -rw-r--r-- 1,579 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
From cdca22a5361911eba406956616b57d8da314958e Mon Sep 17 00:00:00 2001
From: Christoph Wolk <cwo.kde@posteo.net>
Date: Sun, 6 Apr 2025 18:38:50 +0200
Subject: [PATCH] applets/kicker: handle icon dialog being accepted

Kicker's custom icon button handles the icon dialog's iconName property
being changed, and stores the result in its own configuration. This will
fail sometimes: if the user sets a custom icon, clears it using the icon
button's "Clear Icon" function, and sets the same custom icon again, the
icon will not be changed as the icon dialog's property is unchanged by
selecting the same icon again.

Instead, we listen to the icon dialog's accepted signal, and only set
the custom icon if an icon was actually chosen.
---
 applets/kicker/package/contents/ui/ConfigGeneral.qml | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/applets/kicker/package/contents/ui/ConfigGeneral.qml b/applets/kicker/package/contents/ui/ConfigGeneral.qml
index 574252275b..1b8abe1060 100644
--- a/applets/kicker/package/contents/ui/ConfigGeneral.qml
+++ b/applets/kicker/package/contents/ui/ConfigGeneral.qml
@@ -96,8 +96,10 @@ KCMUtils.SimpleKCM {
                     configGeneral.cfg_useCustomButtonImage = true;
                 }
 
-                onIconNameChanged: iconName => {
-                    setCustomButtonImage(iconName);
+                onAccepted: {
+                    if (iconDialog.iconName != "") {
+                        setCustomButtonImage(iconDialog.iconName)
+                    }
                 }
             }
 
-- 
GitLab