changeset 14087:26937d8c5c9e

enable the run slave commande even without libmenu
author aurel
date Thu, 02 Dec 2004 14:37:16 +0000
parents 7a2d81d187c2
children 9b5cfd109fab
files input/input.c input/input.h libmenu/menu_console.c mplayer.c
diffstat 4 files changed, 4 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/input/input.c	Thu Dec 02 03:38:05 2004 +0000
+++ b/input/input.c	Thu Dec 02 14:37:16 2004 +0000
@@ -111,6 +111,7 @@
   { MP_CMD_SWITCH_VSYNC, "switch_vsync", 0, { {MP_CMD_ARG_INT,{0}}, {-1,{0}} } },
   { MP_CMD_LOADFILE, "loadfile", 1, { {MP_CMD_ARG_STRING, {0}}, {-1,{0}} } },
   { MP_CMD_LOADLIST, "loadlist", 1, { {MP_CMD_ARG_STRING, {0}}, {-1,{0}} } },
+  { MP_CMD_RUN, "run", 1, { {MP_CMD_ARG_STRING,{0}}, {-1,{0}} } },
   { MP_CMD_VF_CHANGE_RECTANGLE, "change_rectangle", 2, { {MP_CMD_ARG_INT,{0}}, {MP_CMD_ARG_INT,{0}}, {-1,{0}}}},
 
 #ifdef HAVE_NEW_GUI  
@@ -135,7 +136,6 @@
   { MP_CMD_CHELP, "help", 0, { {-1,{0}} } },
   { MP_CMD_CEXIT, "exit", 0, { {-1,{0}} } },
   { MP_CMD_CHIDE, "hide", 0, { {MP_CMD_ARG_INT,{3000}}, {-1,{0}} } },
-  { MP_CMD_CRUN, "run", 1, { {MP_CMD_ARG_STRING,{0}}, {-1,{0}} } },
 #endif
  
   { MP_CMD_GET_VO_FULLSCREEN, "get_vo_fullscreen", 0, { {-1,{0}} } },
--- a/input/input.h	Thu Dec 02 03:38:05 2004 +0000
+++ b/input/input.h	Thu Dec 02 14:37:16 2004 +0000
@@ -61,6 +61,7 @@
 #define MP_CMD_SPEED_INCR 57
 #define MP_CMD_SPEED_MULT 58
 #define MP_CMD_SPEED_SET 59
+#define MP_CMD_RUN 60
 
 #define MP_CMD_GUI_EVENTS       5000
 #define MP_CMD_GUI_LOADFILE     5001
@@ -90,7 +91,6 @@
 #define MP_CMD_CHELP 7000
 #define MP_CMD_CEXIT 7001
 #define MP_CMD_CHIDE 7002
-#define MP_CMD_CRUN 7003
 
 // The arg types
 #define MP_CMD_ARG_INT 0
--- a/libmenu/menu_console.c	Thu Dec 02 03:38:05 2004 +0000
+++ b/libmenu/menu_console.c	Thu Dec 02 14:37:16 2004 +0000
@@ -404,7 +404,7 @@
 	  menu->show = 0;
 	mpriv->show_ts = 0;
 	break;
-      case MP_CMD_CRUN:
+      case MP_CMD_RUN:
 	run_shell_cmd(menu,c->args[0].v.s);
 	break;
       default: // Send the other commands to mplayer
--- a/mplayer.c	Thu Dec 02 03:38:05 2004 +0000
+++ b/mplayer.c	Thu Dec 02 14:37:16 2004 +0000
@@ -3443,8 +3443,7 @@
     case MP_CMD_GET_PERCENT_POS : {
 	mp_msg(MSGT_GLOBAL,MSGL_INFO,MSGTR_AnsPercentPos, demuxer_get_percent_pos(demuxer));
     } break;
-#ifdef HAVE_MENU
-    case MP_CMD_CRUN : {
+    case MP_CMD_RUN : {
 #ifndef __MINGW32__
         if(!fork()) {
           execl("/bin/sh","sh","-c",cmd->args[0].v.s,NULL);
@@ -3452,7 +3451,6 @@
         }
 #endif
     } break;
-#endif
 
 #ifdef USE_DVDNAV
     case MP_CMD_DVDNAV_EVENT: {