changeset 17682:b865581db0d5

auto hide dvb menu if auto-close is specified in menu.conf; patch by Ben Zores ben a geexbox di org
author nicodvb
date Fri, 24 Feb 2006 23:01:40 +0000
parents 0acfff9388f6
children 39f67ee74bfe
files libmenu/menu_dvbin.c
diffstat 1 files changed, 8 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libmenu/menu_dvbin.c	Fri Feb 24 22:46:23 2006 +0000
+++ b/libmenu/menu_dvbin.c	Fri Feb 24 23:01:40 2006 +0000
@@ -39,6 +39,7 @@
   char* file;
   int card;
   int level;
+  int auto_close;
   dvb_config_t *config;
 };
 
@@ -49,6 +50,7 @@
 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 @@
   "channels.conf",
   0,
   0,
+  1,
   NULL,
 };
 
@@ -210,7 +213,11 @@
 		
 		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;