[MPlayer-cvslog] r19495 - trunk/libmenu/vf_menu.c

ben subversion at mplayerhq.hu
Tue Aug 22 21:40:50 CEST 2006


Author: ben
Date: Tue Aug 22 21:40:50 2006
New Revision: 19495

Modified:
   trunk/libmenu/vf_menu.c

Log:
fix menu toggle/hide issues

Modified: trunk/libmenu/vf_menu.c
==============================================================================
--- trunk/libmenu/vf_menu.c	(original)
+++ trunk/libmenu/vf_menu.c	Tue Aug 22 21:40:50 2006
@@ -101,7 +101,7 @@
   case MP_CMD_MENU : {  // Convert txt cmd from the users into libmenu stuff
     char* arg = cmd->args[0].v.s;
     
-    if(!priv->current->show)
+    if(!priv->current->show && !(strcmp(arg,"hide") == 0) )
       priv->current->show = 1;
     else if(strcmp(arg,"up") == 0)
       menu_read_cmd(priv->current,MENU_CMD_UP);
@@ -115,7 +115,7 @@
       menu_read_cmd(priv->current,MENU_CMD_OK);
     else if(strcmp(arg,"cancel") == 0)
       menu_read_cmd(priv->current,MENU_CMD_CANCEL);
-    else if(strcmp(arg,"hide") == 0)
+    else if(strcmp(arg,"hide") == 0 || strcmp(arg,"toggle") == 0)
       priv->current->show = 0;
     else
       mp_msg(MSGT_GLOBAL,MSGL_WARN,MSGTR_LIBMENU_UnknownMenuCommand,arg);



More information about the MPlayer-cvslog mailing list