mirror of
https://github.com/mpv-player/mpv
synced 2025-02-02 21:21:33 +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:
parent
b4c7e5cf9b
commit
25e163a19b
@ -39,6 +39,7 @@ struct menu_priv_s {
|
|||||||
char* file;
|
char* file;
|
||||||
int card;
|
int card;
|
||||||
int level;
|
int level;
|
||||||
|
int auto_close;
|
||||||
dvb_config_t *config;
|
dvb_config_t *config;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -49,6 +50,7 @@ struct menu_priv_s {
|
|||||||
static m_option_t cfg_fields[] = {
|
static m_option_t cfg_fields[] = {
|
||||||
MENU_LIST_PRIV_FIELDS,
|
MENU_LIST_PRIV_FIELDS,
|
||||||
{ "title", ST_OFF(title), CONF_TYPE_STRING, 0, 0, 0, NULL },
|
{ "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 },
|
{ NULL, NULL, NULL, 0,0,0,NULL },
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -59,6 +61,7 @@ static struct menu_priv_s cfg_dflt = {
|
|||||||
"channels.conf",
|
"channels.conf",
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
|
1,
|
||||||
NULL,
|
NULL,
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -210,9 +213,13 @@ static void read_cmd(menu_t* menu, int cmd)
|
|||||||
|
|
||||||
c = mp_input_parse_cmd(cmd_name);
|
c = mp_input_parse_cmd(cmd_name);
|
||||||
if(c)
|
if(c)
|
||||||
|
{
|
||||||
|
if (mpriv->auto_close)
|
||||||
|
mp_input_queue_cmd (mp_input_parse_cmd ("menu hide"));
|
||||||
mp_input_queue_cmd(c);
|
mp_input_queue_cmd(c);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case MENU_CMD_CANCEL:
|
case MENU_CMD_CANCEL:
|
||||||
|
Loading…
Reference in New Issue
Block a user