Hi, i’m developing gnome shell extension which should add element to top panel. What i’m trying to do is to give user ability to choose in which place of top panel(left|center|right) he would like to see this element. If i add element with Main.panel.addToStatusArea('stocksTicker', stocksTicker, 0, 'right') – everything works as expected.
But if i try to use Main.panel._rightBox.insert_child_at_index(stocksTicker, 0) – i get error message in logs:
clutter_actor_insert_child_at_index: assertion ‘child->priv->parent == NULL’ failed
But unless you have a very good reason, you should stick to the addToStatusArea() API. For example if we ever change PanelMenu.Button to remote that oddity, we’ll keep that API working if at all possible, while using insert_child_at_index() directly will necessarily break.