show plasma shortcuts for applets

--when shortcuts badges are shown then the
plasma assigned shortcuts are preferred to
be presented to the user
pull/4/head
Michail Vourlakos 6 years ago
parent a2569664b3
commit f31df4ee71

@ -95,7 +95,7 @@ QString UniversalSettings::appletShortcutBadge(int appletId)
return m_appletShortcuts[appletId];
}
return QString;
return QString();
}
QString UniversalSettings::shortcutToBadge(QStringList shortcutRecords)

@ -26,8 +26,7 @@ Loader{
id: appletNumberLoader
active: appletItem.canShowAppletNumberBadge &&
((root.showAppletsNumbers && root.unifiedGlobalShortcuts)
|| (root.showMetaBadge && applet.id===applicationLauncherId))
(root.showAppletsNumbers || (root.showMetaBadge && applet.id===applicationLauncherId))
asynchronous: true
visible: badgeString!==""
@ -36,7 +35,7 @@ Loader{
property string badgeString: ""
onActiveChanged: {
if (active) {
if (active && root.unifiedGlobalShortcuts) {
fixedIndex = parabolicManager.pseudoAppletIndex(index);
}
}
@ -52,6 +51,14 @@ Loader{
return;
}
if (root.showAppletsNumbers) {
var plasmaShortcut = universalSettings.appletShortcutBadge(applet.id);
if (plasmaShortcut !== "") {
return plasmaShortcut;
}
}
if (root.showMetaBadge && applet && applet.id === applicationLauncherId) {
return '\u2318';
} else if (appletNumberLoader.fixedIndex>=1 && appletNumberLoader.fixedIndex<20) {

Loading…
Cancel
Save