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 m_appletShortcuts[appletId];
} }
return QString; return QString();
} }
QString UniversalSettings::shortcutToBadge(QStringList shortcutRecords) QString UniversalSettings::shortcutToBadge(QStringList shortcutRecords)

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

Loading…
Cancel
Save