changeset 19489:87c339558bc1

fix menu toggle/hide issues
author ben
date Tue, 22 Aug 2006 19:40:50 +0000
parents 3b869f58b027
children f57977ac0394
files libmenu/vf_menu.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libmenu/vf_menu.c	Tue Aug 22 12:42:55 2006 +0000
+++ b/libmenu/vf_menu.c	Tue Aug 22 19:40:50 2006 +0000
@@ -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);