unity-dev team mailing list archive
-
unity-dev team
-
Mailing list archive
-
Message #00534
Re: menu bar understanding
On Thu, 2012-08-30 at 11:12 +0200, Francesco M. wrote:
> I'm trying to understand how the menu bar works. I would like to
> understand how menus are "taken" from applications and rendered in
> Unity.
>
> In PanelMenuView's constructor there is a reference to a variable
> named "layout_". Where is that variable defined? In the header file
> there is a (unused?) "_menu_layout".
> The first line of the constructor says to render menu items aligned
> from the left to the right. Where is the layout definition?
>
> And could someone tell me where happens the population of this layout
> with menu items?
Hello Francesco,
The way that the panel works is that it is basically the host for a
series of indicators. The menus are no different in that regard. So
the code that you're probably looking for is in indicator-appmenu:
http://launchpad.net/indicator-appmenu
The application loads a module that parses the menus in memory and
creates a representation of them on DBus. Then indicator-appmenu finds
that representation and displays it in the panel when the application
has focus.
Hope that helps!
--Ted
Attachment:
signature.asc
Description: This is a digitally signed message part
References