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

Reply via email to