Gentoo Archives: gentoo-commits

From: Andreas Sturmlechner <asturm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: kde-plasma/plasma-workspace/, kde-plasma/plasma-workspace/files/
Date: Tue, 17 May 2022 19:02:14
Message-Id: 1652814109.4a9df068d846b2e6c60ccef203a71a92eb6fd9e5.asturm@gentoo
1 commit: 4a9df068d846b2e6c60ccef203a71a92eb6fd9e5
2 Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
3 AuthorDate: Tue May 17 18:36:47 2022 +0000
4 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
5 CommitDate: Tue May 17 19:01:49 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4a9df068
7
8 kde-plasma/plasma-workspace: Backport several 5.24.6 fixes
9
10 Package-Manager: Portage-3.0.30, Repoman-3.0.3
11 Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
12
13 ...ppmenu-fix-top-level-menu-text-coloration.patch | 40 ++++
14 ...cker-refresh-RootModel-on-session-backend.patch | 92 +++++++++
15 ...ystemtray-prefer-IconName-over-IconPixmap.patch | 137 +++++++++++++
16 ...asmashell-crash-on-panel-w-systray-remove.patch | 34 ++++
17 ...ms-desktoptheme-detect-installed-styles-1.patch | 41 ++++
18 ...ms-desktoptheme-detect-installed-styles-2.patch | 72 +++++++
19 ...sddm-theme-KeyboardButton-fix-layout-name.patch | 39 ++++
20 ...s-image-fix-missing-folder-action-buttons.patch | 30 +++
21 .../plasma-workspace-5.24.5-r1.ebuild | 226 +++++++++++++++++++++
22 9 files changed, 711 insertions(+)
23
24 diff --git a/kde-plasma/plasma-workspace/files/plasma-workspace-5.24.5-applets-appmenu-fix-top-level-menu-text-coloration.patch b/kde-plasma/plasma-workspace/files/plasma-workspace-5.24.5-applets-appmenu-fix-top-level-menu-text-coloration.patch
25 new file mode 100644
26 index 000000000000..d61877300d27
27 --- /dev/null
28 +++ b/kde-plasma/plasma-workspace/files/plasma-workspace-5.24.5-applets-appmenu-fix-top-level-menu-text-coloration.patch
29 @@ -0,0 +1,40 @@
30 +From 4d3f99558cff95259590e70dfbf854a479f772ce Mon Sep 17 00:00:00 2001
31 +From: Nate Graham <nate@×××.org>
32 +Date: Wed, 4 May 2022 10:45:52 -0600
33 +Subject: [PATCH 2/8] applets/appmenu: fix top-level menu text coloration
34 +
35 +28537cf3ff3cd9210f7568f40334ac3a2c9bed18 made the color dynamic, but
36 +neglected to respect the Plasma color scheme, if any. This causes
37 +problems with Plasma themes that have their own colors and don't
38 +respect the systemwide color scheme, such as Breeze Twilight.
39 +
40 +Fix it by using the appropriate colors from the PlasmaCore color scheme
41 +object, not the systemwide object provided by Qt.
42 +
43 +BUG: 453348
44 +FIXED-IN: 5.24.6
45 +
46 +
47 +(cherry picked from commit 19d9bc7e395d8c6e007afdc3b3b5c11a7d02190e)
48 +---
49 + applets/appmenu/package/contents/ui/MenuDelegate.qml | 5 +----
50 + 1 file changed, 1 insertion(+), 4 deletions(-)
51 +
52 +diff --git a/applets/appmenu/package/contents/ui/MenuDelegate.qml b/applets/appmenu/package/contents/ui/MenuDelegate.qml
53 +index 441e99016..afb37589a 100644
54 +--- a/applets/appmenu/package/contents/ui/MenuDelegate.qml
55 ++++ b/applets/appmenu/package/contents/ui/MenuDelegate.qml
56 +@@ -66,9 +66,6 @@ AbstractButton {
57 +
58 + contentItem: PC3.Label {
59 + text: controlRoot.Kirigami.MnemonicData.richTextLabel
60 +- // Kirigami.Theme.highlightedTextColor returns different colors
61 +- // depending on window focus, which does not apply to this applet
62 +- // instead, we use palette.highlightedText here, which returns consistent result
63 +- color: background.state == MenuDelegate.State.Rest ? palette.windowText : palette.highlightedText
64 ++ color: background.state == MenuDelegate.State.Rest ? PlasmaCore.Theme.textColor : PlasmaCore.Theme.highlightedTextColor
65 + }
66 + }
67 +--
68 +2.35.1
69 +
70
71 diff --git a/kde-plasma/plasma-workspace/files/plasma-workspace-5.24.5-applets-kicker-refresh-RootModel-on-session-backend.patch b/kde-plasma/plasma-workspace/files/plasma-workspace-5.24.5-applets-kicker-refresh-RootModel-on-session-backend.patch
72 new file mode 100644
73 index 000000000000..8cffd8d372ed
74 --- /dev/null
75 +++ b/kde-plasma/plasma-workspace/files/plasma-workspace-5.24.5-applets-kicker-refresh-RootModel-on-session-backend.patch
76 @@ -0,0 +1,92 @@
77 +From d0340868619c26de5892f8bd095456dc5a32d0ce Mon Sep 17 00:00:00 2001
78 +From: Amy Rose <amy@×××××.tech>
79 +Date: Tue, 17 May 2022 07:38:03 +0000
80 +Subject: [PATCH 8/8] applets/kicker: refresh RootModel on session backend
81 + state change
82 +
83 +BUG: 427530
84 +
85 +Hunting this one down since mid-March...
86 +
87 +In "native" Plasma containments like the panel, desktop, and plasmawindowed, the `LogindSessionBackend` in `libkworkspace` enters the "Ready" state nearly instantly, before any signals can even be attached. In other containments like Latte Dock and plasmoidviewer, however, the initialization takes some time to complete (unsure why). RootModel was not watching or waiting to check what the session backend's state was, resulting in validity checks being done too soon and never checked again.
88 +
89 +
90 +(cherry picked from commit 2cc819f39bcce9ca83ab3767c42beb1e500e55b1)
91 +---
92 + applets/kicker/plugin/rootmodel.cpp | 1 +
93 + applets/kicker/plugin/systementry.cpp | 1 +
94 + applets/kicker/plugin/systementry.h | 1 +
95 + applets/kicker/plugin/systemmodel.cpp | 2 ++
96 + applets/kicker/plugin/systemmodel.h | 3 +++
97 + 5 files changed, 8 insertions(+)
98 +
99 +diff --git a/applets/kicker/plugin/rootmodel.cpp b/applets/kicker/plugin/rootmodel.cpp
100 +index 4ec323683..837108744 100644
101 +--- a/applets/kicker/plugin/rootmodel.cpp
102 ++++ b/applets/kicker/plugin/rootmodel.cpp
103 +@@ -449,6 +449,7 @@ void RootModel::refresh()
104 + }
105 +
106 + m_systemModel = new SystemModel(this);
107 ++ QObject::connect(m_systemModel, &SystemModel::sessionManagementStateChanged, this, &RootModel::refresh);
108 +
109 + if (m_showPowerSession) {
110 + m_entryList << new GroupEntry(this, i18n("Power / Session"), QStringLiteral("system-log-out"), m_systemModel);
111 +diff --git a/applets/kicker/plugin/systementry.cpp b/applets/kicker/plugin/systementry.cpp
112 +index fdd86ece3..939e2119e 100644
113 +--- a/applets/kicker/plugin/systementry.cpp
114 ++++ b/applets/kicker/plugin/systementry.cpp
115 +@@ -79,6 +79,7 @@ void SystemEntry::refresh()
116 + {
117 + if (!s_sessionManagement) {
118 + s_sessionManagement = new SessionManagement();
119 ++ QObject::connect(s_sessionManagement, &SessionManagement::stateChanged, this, &SystemEntry::sessionManagementStateChanged);
120 + }
121 +
122 + bool valid = false;
123 +diff --git a/applets/kicker/plugin/systementry.h b/applets/kicker/plugin/systementry.h
124 +index a0a258024..981a3a5f5 100644
125 +--- a/applets/kicker/plugin/systementry.h
126 ++++ b/applets/kicker/plugin/systementry.h
127 +@@ -54,6 +54,7 @@ public:
128 +
129 + Q_SIGNALS:
130 + void isValidChanged() const;
131 ++ void sessionManagementStateChanged();
132 +
133 + private Q_SLOTS:
134 + void refresh();
135 +diff --git a/applets/kicker/plugin/systemmodel.cpp b/applets/kicker/plugin/systemmodel.cpp
136 +index 656bbdc4e..844f80d09 100644
137 +--- a/applets/kicker/plugin/systemmodel.cpp
138 ++++ b/applets/kicker/plugin/systemmodel.cpp
139 +@@ -92,10 +92,12 @@ void SystemModel::populate()
140 +
141 + auto addIfValid = [=](const SystemEntry::Action action) {
142 + SystemEntry *entry = new SystemEntry(this, action);
143 ++ QObject::connect(entry, &SystemEntry::sessionManagementStateChanged, this, &SystemModel::sessionManagementStateChanged);
144 +
145 + if (entry->isValid()) {
146 + m_entries << entry;
147 + }
148 ++
149 + QObject::connect(entry, &SystemEntry::isValidChanged, this, &AbstractModel::refresh, Qt::UniqueConnection);
150 + };
151 +
152 +diff --git a/applets/kicker/plugin/systemmodel.h b/applets/kicker/plugin/systemmodel.h
153 +index cd9048de1..29ae9e428 100644
154 +--- a/applets/kicker/plugin/systemmodel.h
155 ++++ b/applets/kicker/plugin/systemmodel.h
156 +@@ -25,6 +25,9 @@ public:
157 +
158 + Q_INVOKABLE bool trigger(int row, const QString &actionId, const QVariant &argument) override;
159 +
160 ++Q_SIGNALS:
161 ++ void sessionManagementStateChanged();
162 ++
163 + protected Q_SLOTS:
164 + void refresh() override;
165 +
166 +--
167 +2.35.1
168 +
169
170 diff --git a/kde-plasma/plasma-workspace/files/plasma-workspace-5.24.5-applets-systemtray-prefer-IconName-over-IconPixmap.patch b/kde-plasma/plasma-workspace/files/plasma-workspace-5.24.5-applets-systemtray-prefer-IconName-over-IconPixmap.patch
171 new file mode 100644
172 index 000000000000..0ac8ed788ade
173 --- /dev/null
174 +++ b/kde-plasma/plasma-workspace/files/plasma-workspace-5.24.5-applets-systemtray-prefer-IconName-over-IconPixmap.patch
175 @@ -0,0 +1,137 @@
176 +From ea2833e4dd7114f8bf22a322a26c6c05ebf767f2 Mon Sep 17 00:00:00 2001
177 +From: Vlad Zahorodnii <vlad.zahorodnii@×××.org>
178 +Date: Mon, 25 Apr 2022 21:58:58 +0300
179 +Subject: [PATCH 3/8] applets/systemtray: Prefer IconName over IconPixmap
180 +
181 +In case both IconName and IconPixmap are provided, the system tray
182 +applet is going to prefer the pixmap.
183 +
184 +That can create a dark icon on dark background bug because plasma can't
185 +recolor pixmaps.
186 +
187 +The SNI spec recommends visualizations to prefer icons over pixmaps:
188 +
189 +> An icon can either be identified by its Freedesktop-compliant icon
190 +> name, carried by this property of by the icon data itself, carried by
191 +> the property IconPixmap. Visualizations are encouraged to prefer icon
192 +> names over icon pixmaps if both are available (FIXME: still not very
193 +> defined: could e the pixmap used as fallback if an icon name is not found?)
194 +
195 +BUG: 418996
196 +
197 +- Unset iconName when icon can't be loaded
198 +- no code duplication
199 +(cherry picked from commit 7363d0e0f3c1a447e6264e92762735bd33da2682)
200 +---
201 + .../systemtray/statusnotifieritemsource.cpp | 82 ++++++++-----------
202 + 1 file changed, 33 insertions(+), 49 deletions(-)
203 +
204 +diff --git a/applets/systemtray/statusnotifieritemsource.cpp b/applets/systemtray/statusnotifieritemsource.cpp
205 +index f67845e42..731aecadc 100644
206 +--- a/applets/systemtray/statusnotifieritemsource.cpp
207 ++++ b/applets/systemtray/statusnotifieritemsource.cpp
208 +@@ -286,68 +286,52 @@ void StatusNotifierItemSource::refreshCallback(QDBusPendingCallWatcher *call)
209 + QIcon overlay;
210 + QStringList overlayNames;
211 +
212 +- // Icon
213 ++ // Overlay icon
214 + {
215 +- KDbusImageVector image;
216 +- QIcon icon;
217 +- QString iconName;
218 +-
219 +- properties[QStringLiteral("OverlayIconPixmap")].value<QDBusArgument>() >> image;
220 +- if (image.isEmpty()) {
221 +- QString iconName = properties[QStringLiteral("OverlayIconName")].toString();
222 +- m_overlayIconName = iconName;
223 +- if (!iconName.isEmpty()) {
224 ++ m_overlayIconName = QString();
225 ++
226 ++ const QString iconName = properties[QStringLiteral("OverlayIconName")].toString();
227 ++ if (!iconName.isEmpty()) {
228 ++ overlay = QIcon(new KIconEngine(iconName, iconLoader()));
229 ++ if (!overlay.isNull()) {
230 ++ m_overlayIconName = iconName;
231 + overlayNames << iconName;
232 +- overlay = QIcon(new KIconEngine(iconName, iconLoader()));
233 + }
234 +- } else {
235 +- overlay = imageVectorToPixmap(image);
236 + }
237 ++ if (overlay.isNull()) {
238 ++ KDbusImageVector image;
239 ++ properties[QStringLiteral("OverlayIconPixmap")].value<QDBusArgument>() >> image;
240 ++ if (!image.isEmpty()) {
241 ++ overlay = imageVectorToPixmap(image);
242 ++ }
243 ++ }
244 ++ }
245 +
246 +- properties[QStringLiteral("IconPixmap")].value<QDBusArgument>() >> image;
247 +- if (image.isEmpty()) {
248 +- iconName = properties[QStringLiteral("IconName")].toString();
249 +- if (!iconName.isEmpty()) {
250 +- icon = QIcon(new KIconEngine(iconName, iconLoader(), overlayNames));
251 +-
252 +- if (overlayNames.isEmpty() && !overlay.isNull()) {
253 ++ auto loadIcon = [this, &properties, &overlay, &overlayNames](const QString &iconKey, const QString &pixmapKey) -> std::tuple<QIcon, QString> {
254 ++ const QString iconName = properties[iconKey].toString();
255 ++ if (!iconName.isEmpty()) {
256 ++ QIcon icon = QIcon(new KIconEngine(iconName, iconLoader(), overlayNames));
257 ++ if (!icon.isNull()) {
258 ++ if (!overlay.isNull() && overlayNames.isEmpty()) {
259 + overlayIcon(&icon, &overlay);
260 + }
261 ++ return {icon, iconName};
262 + }
263 +- } else {
264 +- icon = imageVectorToPixmap(image);
265 ++ }
266 ++ KDbusImageVector image;
267 ++ properties[pixmapKey].value<QDBusArgument>() >> image;
268 ++ if (!image.isEmpty()) {
269 ++ QIcon icon = imageVectorToPixmap(image);
270 + if (!icon.isNull() && !overlay.isNull()) {
271 + overlayIcon(&icon, &overlay);
272 + }
273 ++ return {icon, QString()};
274 + }
275 +- m_icon = icon;
276 +- m_iconName = iconName;
277 +- }
278 ++ return {};
279 ++ };
280 +
281 +- // Attention icon
282 +- {
283 +- KDbusImageVector image;
284 +- QIcon attentionIcon;
285 +-
286 +- properties[QStringLiteral("AttentionIconPixmap")].value<QDBusArgument>() >> image;
287 +- if (image.isEmpty()) {
288 +- QString iconName = properties[QStringLiteral("AttentionIconName")].toString();
289 +- m_attentionIconName = iconName;
290 +- if (!iconName.isEmpty()) {
291 +- attentionIcon = QIcon(new KIconEngine(iconName, iconLoader(), overlayNames));
292 +-
293 +- if (overlayNames.isEmpty() && !overlay.isNull()) {
294 +- overlayIcon(&attentionIcon, &overlay);
295 +- }
296 +- }
297 +- } else {
298 +- attentionIcon = imageVectorToPixmap(image);
299 +- if (!attentionIcon.isNull() && !overlay.isNull()) {
300 +- overlayIcon(&attentionIcon, &overlay);
301 +- }
302 +- }
303 +- m_attentionIcon = attentionIcon;
304 +- }
305 ++ std::tie(m_icon, m_iconName) = loadIcon(QStringLiteral("IconName"), QStringLiteral("IconPixmap"));
306 ++ std::tie(m_attentionIcon, m_attentionIconName) = loadIcon(QStringLiteral("AttentionIconName"), QStringLiteral("AttentionIconPixmap"));
307 +
308 + // ToolTip
309 + {
310 +--
311 +2.35.1
312 +
313
314 diff --git a/kde-plasma/plasma-workspace/files/plasma-workspace-5.24.5-fix-plasmashell-crash-on-panel-w-systray-remove.patch b/kde-plasma/plasma-workspace/files/plasma-workspace-5.24.5-fix-plasmashell-crash-on-panel-w-systray-remove.patch
315 new file mode 100644
316 index 000000000000..609ab0f011cd
317 --- /dev/null
318 +++ b/kde-plasma/plasma-workspace/files/plasma-workspace-5.24.5-fix-plasmashell-crash-on-panel-w-systray-remove.patch
319 @@ -0,0 +1,34 @@
320 +From 7795e5fb4f7e2a79e15a9e5711149f71144e73c9 Mon Sep 17 00:00:00 2001
321 +From: Fushan Wen <qydwhotmail@×××××.com>
322 +Date: Fri, 13 May 2022 14:43:44 +0800
323 +Subject: [PATCH 5/8] applets/systemtray: disconnect KConfigLoader signal when
324 + instance is about to be deleted
325 +
326 +When an applet is about to be deleted, it will save its config
327 +automatically, but in this case the system tray doesn't need to load the
328 +config again.
329 +
330 +BUG: 453726
331 +
332 +
333 +(cherry picked from commit 6da91d053b4f142277d60db4a1a17eded9249d11)
334 +---
335 + applets/systemtray/systemtray.cpp | 2 ++
336 + 1 file changed, 2 insertions(+)
337 +
338 +diff --git a/applets/systemtray/systemtray.cpp b/applets/systemtray/systemtray.cpp
339 +index 3b7f688a6..0d889b3f0 100644
340 +--- a/applets/systemtray/systemtray.cpp
341 ++++ b/applets/systemtray/systemtray.cpp
342 +@@ -40,6 +40,8 @@ SystemTray::SystemTray(QObject *parent, const KPluginMetaData &data, const QVari
343 +
344 + SystemTray::~SystemTray()
345 + {
346 ++ // When the applet is about to be deleted, delete now to avoid calling loadConfig()
347 ++ delete m_settings;
348 + }
349 +
350 + void SystemTray::init()
351 +--
352 +2.35.1
353 +
354
355 diff --git a/kde-plasma/plasma-workspace/files/plasma-workspace-5.24.5-kcms-desktoptheme-detect-installed-styles-1.patch b/kde-plasma/plasma-workspace/files/plasma-workspace-5.24.5-kcms-desktoptheme-detect-installed-styles-1.patch
356 new file mode 100644
357 index 000000000000..57477173acbb
358 --- /dev/null
359 +++ b/kde-plasma/plasma-workspace/files/plasma-workspace-5.24.5-kcms-desktoptheme-detect-installed-styles-1.patch
360 @@ -0,0 +1,41 @@
361 +From 1a966d3fb979cf0f0080c805aed248ee77978800 Mon Sep 17 00:00:00 2001
362 +From: Fushan Wen <qydwhotmail@×××××.com>
363 +Date: Mon, 16 May 2022 16:18:00 +0800
364 +Subject: [PATCH 6/8] kcms/desktoptheme: find metadata.json when loading
365 + ThemesModel
366 +
367 +Before this commit ThemesModel only finds metadata.desktop, but after
368 +KF5.94, the default theme metadata files have been ported to json format.
369 +
370 +BUG: 453830
371 +
372 +
373 +(cherry picked from commit 10aa9bb8dca91e92e3009ed57613d43d610da63e)
374 +---
375 + kcms/desktoptheme/themesmodel.cpp | 10 +++++++++-
376 + 1 file changed, 9 insertions(+), 1 deletion(-)
377 +
378 +diff --git a/kcms/desktoptheme/themesmodel.cpp b/kcms/desktoptheme/themesmodel.cpp
379 +index 6f0ecf4e3..296951742 100644
380 +--- a/kcms/desktoptheme/themesmodel.cpp
381 ++++ b/kcms/desktoptheme/themesmodel.cpp
382 +@@ -155,7 +155,15 @@ void ThemesModel::load()
383 + const QDir cd(ppath);
384 + const QStringList &entries = cd.entryList(QDir::Dirs | QDir::Hidden | QDir::NoDotAndDotDot);
385 + for (const QString &pack : entries) {
386 +- const QString _metadata = ppath + QLatin1Char('/') + pack + QStringLiteral("/metadata.desktop");
387 ++ const QString prefix = QStringLiteral("%1%2%3%4metadata.").arg(ppath, QDir::separator(), pack, QDir::separator());
388 ++
389 ++ QString _metadata = QStringLiteral("%1json").arg(prefix);
390 ++ if (QFile::exists(_metadata)) {
391 ++ themes << _metadata;
392 ++ continue;
393 ++ }
394 ++
395 ++ _metadata = QStringLiteral("%1desktop").arg(prefix);
396 + if (QFile::exists(_metadata)) {
397 + themes << _metadata;
398 + }
399 +--
400 +2.35.1
401 +
402
403 diff --git a/kde-plasma/plasma-workspace/files/plasma-workspace-5.24.5-kcms-desktoptheme-detect-installed-styles-2.patch b/kde-plasma/plasma-workspace/files/plasma-workspace-5.24.5-kcms-desktoptheme-detect-installed-styles-2.patch
404 new file mode 100644
405 index 000000000000..2a379c707efe
406 --- /dev/null
407 +++ b/kde-plasma/plasma-workspace/files/plasma-workspace-5.24.5-kcms-desktoptheme-detect-installed-styles-2.patch
408 @@ -0,0 +1,72 @@
409 +From c602c52578da1331d2466ff9803c7e0b9287c24c Mon Sep 17 00:00:00 2001
410 +From: Alexander Lohnau <alexander.lohnau@×××.de>
411 +Date: Mon, 16 May 2022 14:49:46 +0200
412 +Subject: [PATCH 7/8] kcms/desktoptheme: Fix reading of metadata in ThemesModel
413 +
414 +We can not use KConfig to read the desktop file.
415 +
416 +CCBUG: 453830
417 +
418 +
419 +(cherry picked from commit 43ae993da35bb408b4fabb5c4514feff97628e0d)
420 +---
421 + kcms/desktoptheme/themesmodel.cpp | 27 +++++++++++++++++++--------
422 + 1 file changed, 19 insertions(+), 8 deletions(-)
423 +
424 +diff --git a/kcms/desktoptheme/themesmodel.cpp b/kcms/desktoptheme/themesmodel.cpp
425 +index 296951742..ce3cac14b 100644
426 +--- a/kcms/desktoptheme/themesmodel.cpp
427 ++++ b/kcms/desktoptheme/themesmodel.cpp
428 +@@ -16,6 +16,7 @@
429 +
430 + #include <KColorScheme>
431 + #include <KDesktopFile>
432 ++#include <KPluginMetaData>
433 +
434 + #include <KConfigGroup>
435 + #include <KSharedConfig>
436 +@@ -176,15 +177,25 @@ void ThemesModel::load()
437 + int themeNameSepIndex = themeRoot.lastIndexOf(QLatin1Char('/'), -1);
438 + const QString packageName = themeRoot.right(themeRoot.length() - themeNameSepIndex - 1);
439 +
440 +- KDesktopFile df(theme);
441 ++ QString name;
442 ++ QString comment;
443 +
444 +- if (df.noDisplay()) {
445 +- continue;
446 +- }
447 ++ if (theme.endsWith(QLatin1String(".json"))) {
448 ++ KPluginMetaData data = KPluginMetaData::fromJsonFile(theme);
449 ++ name = data.name();
450 ++ comment = data.description();
451 ++ } else {
452 ++ KDesktopFile df(theme);
453 +
454 +- QString name = df.readName();
455 +- if (name.isEmpty()) {
456 +- name = packageName;
457 ++ if (df.noDisplay()) {
458 ++ continue;
459 ++ }
460 ++
461 ++ name = df.readName();
462 ++ if (name.isEmpty()) {
463 ++ name = packageName;
464 ++ }
465 ++ comment = df.readComment();
466 + }
467 + const bool isLocal = QFileInfo(theme).isWritable();
468 + bool hasPluginName = std::any_of(m_data.begin(), m_data.end(), [&](const ThemesModelData &item) {
469 +@@ -205,7 +216,7 @@ void ThemesModel::load()
470 + type = LightTheme;
471 + }
472 + }
473 +- ThemesModelData item{name, packageName, df.readComment(), type, isLocal, false};
474 ++ ThemesModelData item{name, packageName, comment, type, isLocal, false};
475 + m_data.append(item);
476 + }
477 + }
478 +--
479 +2.35.1
480 +
481
482 diff --git a/kde-plasma/plasma-workspace/files/plasma-workspace-5.24.5-sddm-theme-KeyboardButton-fix-layout-name.patch b/kde-plasma/plasma-workspace/files/plasma-workspace-5.24.5-sddm-theme-KeyboardButton-fix-layout-name.patch
483 new file mode 100644
484 index 000000000000..594efe7df172
485 --- /dev/null
486 +++ b/kde-plasma/plasma-workspace/files/plasma-workspace-5.24.5-sddm-theme-KeyboardButton-fix-layout-name.patch
487 @@ -0,0 +1,39 @@
488 +From e2b631d43528c3e41d53c8a359b6129c616bc271 Mon Sep 17 00:00:00 2001
489 +From: ivan tkachenko <me@×××××××.tk>
490 +Date: Sat, 30 Apr 2022 03:20:11 +0300
491 +Subject: [PATCH 1/8] [sddm-theme] KeyboardButton: Fix layout name not being
492 + shown
493 +
494 +It used to cause an error like this:
495 +
496 + [03:21:31.246] (WW) GREETER: file:///usr/share/sddm/themes/breeze/KeyboardButton.qml:19: TypeError: Cannot read property 'shortName' of null
497 +
498 +(cherry picked from commit 2e9020ca6c1d55842a4b014623f0d88697972000)
499 +---
500 + sddm-theme/KeyboardButton.qml | 3 +--
501 + 1 file changed, 1 insertion(+), 2 deletions(-)
502 +
503 +diff --git a/sddm-theme/KeyboardButton.qml b/sddm-theme/KeyboardButton.qml
504 +index d5d5a446c..712096d87 100644
505 +--- a/sddm-theme/KeyboardButton.qml
506 ++++ b/sddm-theme/KeyboardButton.qml
507 +@@ -10,7 +10,7 @@ PlasmaComponents.ToolButton {
508 +
509 + property int currentIndex: -1
510 +
511 +- text: i18nd("plasma_lookandfeel_org.kde.lookandfeel", "Keyboard Layout: %1", instantiator.objectAt(currentIndex).shortName)
512 ++ text: i18nd("plasma_lookandfeel_org.kde.lookandfeel", "Keyboard Layout: %1", keyboard.layouts[currentIndex].shortName)
513 + implicitWidth: minimumWidth
514 +
515 + visible: menu.items.length > 1
516 +@@ -27,7 +27,6 @@ PlasmaComponents.ToolButton {
517 + onObjectRemoved: keyboardMenu.removeItem( object )
518 + delegate: QQC.MenuItem {
519 + text: modelData.longName
520 +- property string shortName: modelData.shortName
521 + onTriggered: {
522 + keyboard.currentLayout = model.index
523 + }
524 +--
525 +2.35.1
526 +
527
528 diff --git a/kde-plasma/plasma-workspace/files/plasma-workspace-5.24.5-wallpapers-image-fix-missing-folder-action-buttons.patch b/kde-plasma/plasma-workspace/files/plasma-workspace-5.24.5-wallpapers-image-fix-missing-folder-action-buttons.patch
529 new file mode 100644
530 index 000000000000..d09b60ce6ce4
531 --- /dev/null
532 +++ b/kde-plasma/plasma-workspace/files/plasma-workspace-5.24.5-wallpapers-image-fix-missing-folder-action-buttons.patch
533 @@ -0,0 +1,30 @@
534 +From dd8f1b5e302717c84f6a05af36c621122ead6d99 Mon Sep 17 00:00:00 2001
535 +From: Fushan Wen <qydwhotmail@×××××.com>
536 +Date: Fri, 6 May 2022 21:36:09 +0800
537 +Subject: [PATCH 4/8] wallpapers/image: Fix missing folder action buttons
538 +
539 +The width of the action area needs to be substracted in contentItem's
540 +width.
541 +
542 +Also use `Kirigami.Units.gridUnit * 4` because `overlayWidth` was
543 +introduced in Frameworks 5.94, and people using Plasma 5.24 may have an
544 +older Frameworks version.
545 +---
546 + wallpapers/image/imagepackage/contents/ui/config.qml | 1 +
547 + 1 file changed, 1 insertion(+)
548 +
549 +diff --git a/wallpapers/image/imagepackage/contents/ui/config.qml b/wallpapers/image/imagepackage/contents/ui/config.qml
550 +index 97f9f81a5..7bb675f23 100644
551 +--- a/wallpapers/image/imagepackage/contents/ui/config.qml
552 ++++ b/wallpapers/image/imagepackage/contents/ui/config.qml
553 +@@ -331,6 +331,7 @@ ColumnLayout {
554 + // Don't need a highlight or hover effects
555 + hoverEnabled: false
556 + contentItem: Kirigami.BasicListItem {
557 ++ width: slidePathsView.width - (parent.hasOwnProperty("overlayWidth") ? overlayWidth : Kirigami.Units.gridUnit * 4)
558 + // Don't need a highlight or hover effects
559 + hoverEnabled: false
560 + separatorVisible: false
561 +--
562 +2.35.1
563 +
564
565 diff --git a/kde-plasma/plasma-workspace/plasma-workspace-5.24.5-r1.ebuild b/kde-plasma/plasma-workspace/plasma-workspace-5.24.5-r1.ebuild
566 new file mode 100644
567 index 000000000000..9fa47cdd5c54
568 --- /dev/null
569 +++ b/kde-plasma/plasma-workspace/plasma-workspace-5.24.5-r1.ebuild
570 @@ -0,0 +1,226 @@
571 +# Copyright 1999-2022 Gentoo Authors
572 +# Distributed under the terms of the GNU General Public License v2
573 +
574 +EAPI=8
575 +
576 +ECM_HANDBOOK="forceoptional"
577 +ECM_TEST="forceoptional"
578 +KFMIN=5.90.0
579 +PVCUT=$(ver_cut 1-3)
580 +QTMIN=5.15.2
581 +VIRTUALX_REQUIRED="test"
582 +inherit ecm kde.org
583 +
584 +DESCRIPTION="KDE Plasma workspace"
585 +
586 +LICENSE="GPL-2" # TODO: CHECK
587 +SLOT="5"
588 +KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~x86"
589 +IUSE="appstream +calendar +fontconfig geolocation gps +policykit
590 +screencast +semantic-desktop telemetry"
591 +
592 +REQUIRED_USE="gps? ( geolocation )"
593 +RESTRICT="test"
594 +
595 +# slot op: various private QtWaylandClient headers
596 +COMMON_DEPEND="
597 + >=dev-libs/wayland-1.15
598 + >=dev-qt/qtdbus-${QTMIN}:5
599 + >=dev-qt/qtdeclarative-${QTMIN}:5[widgets]
600 + >=dev-qt/qtgui-${QTMIN}:5=[jpeg,libinput]
601 + >=dev-qt/qtnetwork-${QTMIN}:5
602 + >=dev-qt/qtsql-${QTMIN}:5
603 + >=dev-qt/qtsvg-${QTMIN}:5
604 + >=dev-qt/qtwayland-${QTMIN}:5=
605 + >=dev-qt/qtwidgets-${QTMIN}:5
606 + >=dev-qt/qtx11extras-${QTMIN}:5
607 + >=dev-qt/qtxml-${QTMIN}:5
608 + >=kde-frameworks/kactivities-${KFMIN}:5
609 + >=kde-frameworks/kactivities-stats-${KFMIN}:5
610 + >=kde-frameworks/karchive-${KFMIN}:5
611 + >=kde-frameworks/kauth-${KFMIN}:5
612 + >=kde-frameworks/kbookmarks-${KFMIN}:5
613 + >=kde-frameworks/kcompletion-${KFMIN}:5
614 + >=kde-frameworks/kconfig-${KFMIN}:5
615 + >=kde-frameworks/kconfigwidgets-${KFMIN}:5
616 + >=kde-frameworks/kcoreaddons-${KFMIN}:5
617 + >=kde-frameworks/kcrash-${KFMIN}:5
618 + >=kde-frameworks/kdbusaddons-${KFMIN}:5
619 + >=kde-frameworks/kdeclarative-${KFMIN}:5
620 + >=kde-frameworks/kded-${KFMIN}:5
621 + >=kde-frameworks/kglobalaccel-${KFMIN}:5
622 + >=kde-frameworks/kguiaddons-${KFMIN}:5
623 + >=kde-frameworks/ki18n-${KFMIN}:5
624 + >=kde-frameworks/kiconthemes-${KFMIN}:5
625 + >=kde-frameworks/kidletime-${KFMIN}:5
626 + >=kde-frameworks/kinit-${KFMIN}:5
627 + >=kde-frameworks/kio-${KFMIN}:5
628 + >=kde-frameworks/kitemmodels-${KFMIN}:5
629 + >=kde-frameworks/kitemviews-${KFMIN}:5
630 + >=kde-frameworks/kjobwidgets-${KFMIN}:5
631 + >=kde-frameworks/knewstuff-${KFMIN}:5
632 + >=kde-frameworks/knotifications-${KFMIN}:5
633 + >=kde-frameworks/knotifyconfig-${KFMIN}:5
634 + >=kde-frameworks/kpackage-${KFMIN}:5
635 + >=kde-frameworks/kpeople-${KFMIN}:5
636 + >=kde-frameworks/krunner-${KFMIN}:5
637 + >=kde-frameworks/kservice-${KFMIN}:5
638 + >=kde-frameworks/ktexteditor-${KFMIN}:5
639 + >=kde-frameworks/ktextwidgets-${KFMIN}:5
640 + >=kde-frameworks/kunitconversion-${KFMIN}:5
641 + >=kde-frameworks/kwallet-${KFMIN}:5
642 + >=kde-frameworks/kwayland-${KFMIN}:5
643 + >=kde-frameworks/kwidgetsaddons-${KFMIN}:5
644 + >=kde-frameworks/kwindowsystem-${KFMIN}:5
645 + >=kde-frameworks/kxmlgui-${KFMIN}:5
646 + >=kde-frameworks/plasma-${KFMIN}:5
647 + >=kde-frameworks/prison-${KFMIN}:5[qml]
648 + >=kde-frameworks/solid-${KFMIN}:5
649 + >=kde-plasma/breeze-${PVCUT}:5
650 + >=kde-plasma/kscreenlocker-${PVCUT}:5
651 + >=kde-plasma/kwin-${PVCUT}:5
652 + >=kde-plasma/layer-shell-qt-${PVCUT}:5
653 + >=kde-plasma/libkscreen-${PVCUT}:5
654 + >=kde-plasma/libksysguard-${PVCUT}:5
655 + >=kde-plasma/libkworkspace-${PVCUT}:5
656 + >=media-libs/phonon-4.11.0
657 + sci-libs/libqalculate:=
658 + sys-libs/zlib
659 + x11-libs/libICE
660 + x11-libs/libSM
661 + x11-libs/libX11
662 + x11-libs/libXau
663 + x11-libs/libxcb
664 + x11-libs/libXcursor
665 + x11-libs/libXfixes
666 + x11-libs/libXrender
667 + x11-libs/libXtst
668 + x11-libs/xcb-util
669 + x11-libs/xcb-util-image
670 + appstream? ( dev-libs/appstream[qt5] )
671 + calendar? ( >=kde-frameworks/kholidays-${KFMIN}:5 )
672 + fontconfig? (
673 + >=dev-qt/qtprintsupport-${QTMIN}:5
674 + media-libs/fontconfig
675 + x11-libs/libXft
676 + x11-libs/xcb-util-image
677 + )
678 + geolocation? ( >=kde-frameworks/networkmanager-qt-${KFMIN}:5 )
679 + gps? ( sci-geosciences/gpsd )
680 + policykit? ( virtual/libcrypt:= )
681 + screencast? (
682 + >=dev-qt/qtgui-${QTMIN}:5=[egl]
683 + media-libs/libglvnd
684 + >=media-video/pipewire-0.3:=
685 + x11-libs/libdrm
686 + )
687 + semantic-desktop? ( >=kde-frameworks/baloo-${KFMIN}:5 )
688 + telemetry? ( dev-libs/kuserfeedback:5 )
689 +"
690 +DEPEND="${COMMON_DEPEND}
691 + >=dev-libs/plasma-wayland-protocols-1.6.0
692 + >=dev-qt/qtconcurrent-${QTMIN}:5
693 + >=dev-util/wayland-scanner-1.19.0
694 + x11-base/xorg-proto
695 + fontconfig? ( x11-libs/libXrender )
696 +"
697 +RDEPEND="${COMMON_DEPEND}
698 + app-text/iso-codes
699 + >=dev-qt/qdbus-${QTMIN}:*
700 + >=dev-qt/qtgraphicaleffects-${QTMIN}:5
701 + >=dev-qt/qtpaths-${QTMIN}:5
702 + >=dev-qt/qtquickcontrols-${QTMIN}:5[widgets]
703 + >=dev-qt/qtquickcontrols2-${QTMIN}:5
704 + kde-apps/kio-extras:5
705 + >=kde-frameworks/kirigami-${KFMIN}:5
706 + >=kde-frameworks/kquickcharts-${KFMIN}:5
707 + >=kde-plasma/milou-${PVCUT}:5
708 + >=kde-plasma/plasma-integration-${PVCUT}:5
709 + sys-apps/dbus
710 + x11-apps/xmessage
711 + x11-apps/xprop
712 + x11-apps/xrdb
713 + x11-apps/xsetroot
714 + !<kde-plasma/breeze-5.22.90:5
715 + !<kde-plasma/plasma-desktop-5.23.90:5
716 + policykit? ( sys-apps/accountsservice )
717 +"
718 +BDEPEND="
719 + >=dev-qt/qtwaylandscanner-${QTMIN}:5
720 + virtual/pkgconfig
721 +"
722 +PDEPEND=">=kde-plasma/kde-cli-tools-${PVCUT}:5"
723 +
724 +PATCHES=(
725 + "${FILESDIR}"/${PN}-5.21.5-split-libkworkspace.patch # downstream
726 + "${FILESDIR}"/${PN}-5.22.5-krunner-cwd-at-home.patch # TODO upstream: KDE-bug 432975, bug 767478
727 + "${FILESDIR}"/${P}-sddm-theme-KeyboardButton-fix-layout-name.patch
728 + "${FILESDIR}"/${P}-applets-appmenu-fix-top-level-menu-text-coloration.patch # KDE-bug 453348
729 + "${FILESDIR}"/${P}-applets-systemtray-prefer-IconName-over-IconPixmap.patch # KDE-bug 418996
730 + "${FILESDIR}"/${P}-wallpapers-image-fix-missing-folder-action-buttons.patch
731 + "${FILESDIR}"/${P}-fix-plasmashell-crash-on-panel-w-systray-remove.patch # KDE-bug 453726
732 + "${FILESDIR}"/${P}-kcms-desktoptheme-detect-installed-styles-{1,2}.patch # KDE-bug 453830
733 + "${FILESDIR}"/${P}-applets-kicker-refresh-RootModel-on-session-backend.patch # KDE-bug 427530
734 +)
735 +
736 +src_prepare() {
737 + ecm_src_prepare
738 +
739 + cmake_comment_add_subdirectory libkworkspace
740 + # delete colliding libkworkspace translations
741 + if [[ ${KDE_BUILD_TYPE} = release ]]; then
742 + find po -type f -name "*po" -and -name "libkworkspace*" -delete || die
743 + fi
744 +
745 + # TODO: try to get a build switch upstreamed
746 + if ! use screencast; then
747 + sed -e "s/^pkg_check_modules.*PipeWire/#&/" -i CMakeLists.txt || die
748 + fi
749 +
750 + # TODO: try to get a build switch upstreamed
751 + if use geolocation; then
752 + use gps || sed -e "s/^pkg_check_modules.*LIBGPS/#&/" \
753 + -i dataengines/geolocation/CMakeLists.txt || die
754 + fi
755 +
756 + if ! use policykit; then
757 + cmake_run_in kcms cmake_comment_add_subdirectory users
758 + fi
759 +
760 + ecm_punt_kf_module Su
761 +}
762 +
763 +src_configure() {
764 + local mycmakeargs=(
765 + -DBUILD_xembed-sni-proxy=OFF
766 + -DCMAKE_DISABLE_FIND_PACKAGE_PackageKitQt5=ON
767 + $(cmake_use_find_package appstream AppStreamQt)
768 + $(cmake_use_find_package calendar KF5Holidays)
769 + $(cmake_use_find_package fontconfig Fontconfig)
770 + $(cmake_use_find_package geolocation KF5NetworkManagerQt)
771 + $(cmake_use_find_package semantic-desktop KF5Baloo)
772 + $(cmake_use_find_package telemetry KUserFeedback)
773 + )
774 +
775 + ecm_src_configure
776 +}
777 +
778 +src_install() {
779 + ecm_src_install
780 +
781 + # default startup and shutdown scripts
782 + insinto /etc/xdg/plasma-workspace/env
783 + doins "${FILESDIR}"/10-agent-startup.sh
784 +
785 + insinto /etc/xdg/plasma-workspace/shutdown
786 + doins "${FILESDIR}"/10-agent-shutdown.sh
787 + fperms +x /etc/xdg/plasma-workspace/shutdown/10-agent-shutdown.sh
788 +}
789 +
790 +pkg_postinst () {
791 + ecm_pkg_postinst
792 +
793 + elog "To enable gpg-agent and/or ssh-agent in Plasma sessions,"
794 + elog "edit ${EPREFIX}/etc/xdg/plasma-workspace/env/10-agent-startup.sh"
795 + elog "and ${EPREFIX}/etc/xdg/plasma-workspace/shutdown/10-agent-shutdown.sh"
796 +}