No way to show a popover from an action in the new header

Bug #1329125 reported by Michael Spencer
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu UI Toolkit
New
Undecided
Unassigned

Bug Description

I have a action in the new header that I would like to trigger a popover when clicked. However, there is no way to attach the popover to the UI element that triggered the action, so it just pops up in the center of the screen.

Revision history for this message
Michael Spencer (ibelieve) wrote :

As a temporary workaround, you can find the caller using this hack:

var caller = findChild(mainView.header, action.objectName + "_header_button")

function findChild(obj,objectName) {
    var childs = new Array(0);
    childs.push(obj)
    while (childs.length > 0) {
        if (childs[0].objectName == objectName) {
            return childs[0]
        }
        for (var i in childs[0].data) {
            childs.push(childs[0].data[i])
        }
        childs.splice(0, 1);
    }
    return null;
}

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.