[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [GITGRUB] New menu interface (implementation)
From: |
Bean |
Subject: |
Re: [GITGRUB] New menu interface (implementation) |
Date: |
Sun, 18 Oct 2009 04:01:13 +0800 |
Hi,
Update:
Add sub menu support, generate widgets dynamically using menu entries.
Now grub.cfg should look like this:
menuentry "AAA" {
set root=(hd0,1)
chainloader +1
}
menuentry "BBB" --class ubuntu {
true
}
. /menu/menu.cfg
The menu have three items, AAA, BBB and Tools, which is a menu
appended in menu.cfg.
Tools are a submenu, its content is defined using menu section:
menu {
Tools {
"Toggle Mode" {
command = menu_toggle_mode
}
"Terminal" {
command = "menu_popup term_window"
}
"Change Theme" {
Default {
command="load_config /menu/blue.txt\nmenu_refresh"
}
Green {
command="load_config /menu/green.txt\nmenu_refresh"
}
White {
command="load_config /menu/white.txt\nmenu_refresh"
}
}
"Layout Demo" {
command = "menu_popup layout_test"
}
Halt {
command = "halt"
}
Reboot {
command = "reboot"
}
}
}
merge_config command would append this with user defined menu items.
The screen section is very simple now:
screen {
panel {
extend = 1
valign = center
halign = center
panel {
class = frame
id = __menu__
}
}
}
command menu_create would scan screen for id __menu__, and add widgets
according to the menu content. The generated widget entry looks like
this:
panel
{
class = select
command = COMMAND
image { class = CLASS }
text { text = TITLE }
}
The submenu is this:
panel
{
class = frame
command = "menu_popup -r menu_tree N"
}
--
Bean
gitgrub home: http://github.com/grub/grub/
my fork page: http://github.com/bean123/grub/
- Re: [GITGRUB] New menu interface (implementation), (continued)
- Re: [GITGRUB] New menu interface (implementation), Michal Suchanek, 2009/10/09
- Re: [GITGRUB] New menu interface (implementation), Bean, 2009/10/09
- Re: [GITGRUB] New menu interface (implementation), Michal Suchanek, 2009/10/09
- Re: [GITGRUB] New menu interface (implementation), Bean, 2009/10/09
- Re: [GITGRUB] New menu interface (implementation), Michal Suchanek, 2009/10/10
- Re: [GITGRUB] New menu interface (implementation), Bean, 2009/10/10
- Re: [GITGRUB] New menu interface (implementation), Michal Suchanek, 2009/10/10
- Re: [GITGRUB] New menu interface (implementation), Bean, 2009/10/10
- Re: [GITGRUB] New menu interface (implementation), Michal Suchanek, 2009/10/11
- Re: [GITGRUB] New menu interface (implementation), Bean, 2009/10/16
- Re: [GITGRUB] New menu interface (implementation),
Bean <=
- Re: [GITGRUB] New menu interface (implementation), Bean, 2009/10/18
- Re: [GITGRUB] New menu interface (implementation), Bean, 2009/10/20
- Re: [GITGRUB] New menu interface (implementation), Michal Suchanek, 2009/10/20
- Re: [GITGRUB] New menu interface (implementation), Peter Cros, 2009/10/20
- Re: [GITGRUB] New menu interface (implementation), Bean, 2009/10/21
- Re: [GITGRUB] New menu interface (implementation), Michal Suchanek, 2009/10/21
- Re: [GITGRUB] New menu interface (implementation), Bean, 2009/10/21
- Re: [GITGRUB] New menu interface (implementation), Michal Suchanek, 2009/10/20
- Re: [GITGRUB] New menu interface (implementation), Bean, 2009/10/20
- Re: [GITGRUB] New menu interface (implementation), Michal Suchanek, 2009/10/21