1
0
mirror of https://github.com/mpv-player/mpv synced 2025-01-23 08:03:19 +00:00

auto hide dvb menu if auto-close is specified in menu.conf; patch by Ben Zores ben a geexbox di org

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@17683 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
nicodvb 2006-02-24 23:01:40 +00:00
parent b4c7e5cf9b
commit 25e163a19b

View File

@ -39,6 +39,7 @@ struct menu_priv_s {
char* file;
int card;
int level;
int auto_close;
dvb_config_t *config;
};
@ -49,6 +50,7 @@ struct menu_priv_s {
static m_option_t cfg_fields[] = {
MENU_LIST_PRIV_FIELDS,
{ "title", ST_OFF(title), CONF_TYPE_STRING, 0, 0, 0, NULL },
{ "auto-close", ST_OFF(auto_close), CONF_TYPE_FLAG, 0, 0, 1, NULL },
{ NULL, NULL, NULL, 0,0,0,NULL },
};
@ -59,6 +61,7 @@ static struct menu_priv_s cfg_dflt = {
"channels.conf",
0,
0,
1,
NULL,
};
@ -210,7 +213,11 @@ static void read_cmd(menu_t* menu, int cmd)
c = mp_input_parse_cmd(cmd_name);
if(c)
mp_input_queue_cmd(c);
{
if (mpriv->auto_close)
mp_input_queue_cmd (mp_input_parse_cmd ("menu hide"));
mp_input_queue_cmd(c);
}
}
}
break;