D17410: Add alternatives button to applet configuration in panel edit mode
Björn Feber
noreply at phabricator.kde.org
Sat Dec 15 11:49:51 GMT 2018
GB_2 added a comment.
In D17410#374062 <https://phabricator.kde.org/D17410#374062>, @davidedmundson wrote:
> > I'm trying to emit the signal contextualActionsAboutToShow in the (QML) onVisualParentChanged function, but it doesn't work...
>
> Use console.log to check your code is being called at the right time.
> Also search for contextualActionsAboutToShow in other code and then you'll have a reference you can copy.
It is being called at the right time (I can see the output):
onVisualParentChanged: {
if (visualParent) {
...
console.log("Call contextualActionsAboutToShow");
currentApplet.applet.contextualActionsAboutToShow();
}
}
And it should only show the button if there are specific alternatives:
PlasmaComponents.ToolButton {
id: alternativesButton
...
visible: currentApplet.applet.action("alternatives").visible
...
}
But it doesn't work, it prints out `Cannot read property 'applet' of null` and `currentApplet.applet.action("alternatives").visible` is always `false`.
REPOSITORY
R119 Plasma Desktop
REVISION DETAIL
https://phabricator.kde.org/D17410
To: GB_2, #plasma, #vdg
Cc: davidedmundson, ngraham, ndavis, #vdg, plasma-devel, #plasma, squeakypancakes, alexde, IohannesPetros, GB_2, trickyricky26, ragreen, Pitel, crozbo, ZrenBot, firef, skadinna, lesliezhai, ali-mohamed, jensreuterberg, aaronhoneycutt, abetts, sebas, apol, mbohlender, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20181215/edea46f8/attachment.html>
More information about the Plasma-devel
mailing list