Link between "mainMenu" in keymap.xml and "Mainmenu" in menu.xml

  • Hi,


    In /usr/share/enigma2/keymap.xml, there is (for example)


    Code
    <map context="InfobarMenuActions">
    		<key id="KEY_MENU" mapto="mainMenu" flags="mr" />
    	</map>


    My question is - where is "mainMenu" defined ?


    KEY_MENU obviously calls /usr/share/enigma2/menu.xml which is headed :-


    Code
    <menu text="Mainmenu" title="Mainmenu">
    	<id val="mainmenu" />


    I would like to know where the link is made between "mainMenu" and "Mainmenu" of the two .xml files ? In another words, why "mainMenu" calls menu.xml ?


    Will be grateful for advice.


    Regards, pcd.

    Einmal editiert, zuletzt von pcd ()

  • KEY_MENU is mapped to the action "mainMenu" when in "InfobarMenuActions" context...


    So we check where to find InfobarMenuActions.
    Its "class InfoBarMenu" in Screens.InfoBarGenerics


    There we can see that the actions "mainMenu" is mapped to the function self.mainMenu (line 346 in current CVS).


    And InfoBarMenu.mainMenu opens up Screens.Menu with the item from mainmenu (first child of menu xml).



    This descriptions still requires some knowledge of Python and E2 internals so if you need any more explaination, just ask.

    Homescreen eurer Apple-Geräte noch nicht voll genug?


    dreaMote: Fernbedienung für Dreamboxen
    Mobile WOL: Wake-on-LAN Client für iOS mit optionalem Widget
    My Home Remote: Fernkontrolle für Homematic CCU/CCU2 optimiert für mobile Benutzung

  • Reichi


    Thank you. I realized that. But the question was the 'link'.


    ritzMo


    Many thanks. That is what I was looking for. I somehow did not see Screens.InfoBarGenerics.


    Anyway I should be ok now. I am trying to link a customised menu to the blue button.


    Regards, pcd. :smiling_face: