Mercurial > mplayer.hg
diff libmenu/menu.c @ 25208:1b3dabc8c2b8
Add type info to menu_t, now we can get the menu name and the type name of menu.
author | ulion |
---|---|
date | Sun, 02 Dec 2007 11:14:50 +0000 |
parents | f01f7cc2b694 |
children | 96d0992c7920 |
line wrap: on
line diff
--- a/libmenu/menu.c Sat Dec 01 16:31:49 2007 +0000 +++ b/libmenu/menu.c Sun Dec 02 11:14:50 2007 +0000 @@ -46,12 +46,12 @@ NULL }; -typedef struct menu_def_st { +struct menu_def_st { char* name; menu_info_t* type; void* cfg; char* args; -} menu_def_t; +}; static struct MPContext *menu_ctx = NULL; static menu_def_t* menu_list = NULL; @@ -220,6 +220,7 @@ m->priv_st = &(menu_list[i].type->priv_st); m->priv = m_struct_copy(m->priv_st,menu_list[i].cfg); m->ctx = menu_ctx; + m->type = &menu_list[i]; if(menu_list[i].type->open(m,menu_list[i].args)) return m; if(m->priv)