[MPlayer-cvslog] r31378 - in trunk: Changelog DOCS/tech/slave.txt command.c gui/interface.c gui/win32/interface.c input/input.c input/input.h

reimar subversion at mplayerhq.hu
Sun Jun 13 13:34:14 CEST 2010


Author: reimar
Date: Sun Jun 13 13:34:14 2010
New Revision: 31378

Log:
Remove Gui-specific slave commands and associated key-bindings and other code.

Modified:
   trunk/Changelog
   trunk/DOCS/tech/slave.txt
   trunk/command.c
   trunk/gui/interface.c
   trunk/gui/win32/interface.c
   trunk/input/input.c
   trunk/input/input.h

Modified: trunk/Changelog
==============================================================================
--- trunk/Changelog	Sun Jun 13 13:17:26 2010	(r31377)
+++ trunk/Changelog	Sun Jun 13 13:34:14 2010	(r31378)
@@ -3,6 +3,8 @@ MPlayer (1.0)
   rc4: "Yes We Can"
     Gui: Changes towards removing the Gui
     * The Gui will no longer display any error or warning messages
+    * Special Gui slave commands (gui_*) were removed, as well as
+      the related key bindings
 
     Decoders:
     * YUY2 Lossless Codec (YLC0) via binary DLL

Modified: trunk/DOCS/tech/slave.txt
==============================================================================
--- trunk/DOCS/tech/slave.txt	Sun Jun 13 13:17:26 2010	(r31377)
+++ trunk/DOCS/tech/slave.txt	Sun Jun 13 13:34:14 2010	(r31378)
@@ -174,9 +174,6 @@ screenshot <value>
         0 Take a single screenshot.
         1 Start/stop taking screenshot of each frame.
 
-gui_[about|loadfile|loadsubtitle|play|playlist|preferences|skinbrowser|stop]
-    GUI actions
-
 key_down_event <value>
     Inject <value> key code event into MPlayer.
 

Modified: trunk/command.c
==============================================================================
--- trunk/command.c	Sun Jun 13 13:17:26 2010	(r31377)
+++ trunk/command.c	Sun Jun 13 13:34:14 2010	(r31378)
@@ -995,7 +995,7 @@ static int mp_property_fullscreen(m_opti
     case M_PROPERTY_STEP_DOWN:
 #ifdef CONFIG_GUI
         if (use_gui)
-            guiGetEvent(guiIEvent, (char *) MP_CMD_GUI_FULLSCREEN);
+            guiGetEvent(guiIEvent, (char *) MP_CMD_VO_FULLSCREEN);
         else
 #endif
         if (vo_config_count)
@@ -3280,11 +3280,6 @@ int run_command(MPContext *mpctx, mp_cmd
         build_afilter_chain(sh_audio, &ao_data);
         break;
         default:
-#ifdef CONFIG_GUI
-            if ((use_gui) && (cmd->id > MP_CMD_GUI_EVENTS))
-                guiGetEvent(guiIEvent, (char *) cmd->id);
-            else
-#endif
                 mp_msg(MSGT_CPLAYER, MSGL_V,
                        "Received unknown cmd %s\n", cmd->name);
         }

Modified: trunk/gui/interface.c
==============================================================================
--- trunk/gui/interface.c	Sun Jun 13 13:17:26 2010	(r31377)
+++ trunk/gui/interface.c	Sun Jun 13 13:34:14 2010	(r31378)
@@ -356,19 +356,6 @@ void guiDone( void )
  wsXDone();
 }
 
-int guiCMDArray[] =
- {
-  evLoadPlay,
-  evLoadSubtitle,
-  evAbout,
-  evPlay,
-  evStop,
-  evPlayList,
-  evPreferences,
-  evFullScreen,
-  evSkinBrowser
- };
-
 extern int              stream_dump_type;
 extern int  		vcd_track;
 extern m_obj_settings_t * vf_settings;
@@ -621,8 +608,6 @@ int guiGetEvent( int type,void * arg )
 	  case MP_CMD_VO_FULLSCREEN:
 	       mplEventHandling( evFullScreen,0 );
 	       break;
-          default:
-	       mplEventHandling( guiCMDArray[ (int)arg - MP_CMD_GUI_EVENTS - 1 ],0 );
 	 }
 	break;
    case guiReDraw:

Modified: trunk/gui/win32/interface.c
==============================================================================
--- trunk/gui/win32/interface.c	Sun Jun 13 13:17:26 2010	(r31377)
+++ trunk/gui/win32/interface.c	Sun Jun 13 13:34:14 2010	(r31378)
@@ -676,7 +676,7 @@ int guiGetEvent(int type, void *arg)
             /* MPlayer asks us to quit */
             switch((int) arg)
             {
-                case MP_CMD_GUI_FULLSCREEN:
+                case MP_CMD_VO_FULLSCREEN:
                     mplFullScreen();
                     break;
                 case MP_CMD_QUIT:
@@ -687,32 +687,6 @@ int guiGetEvent(int type, void *arg)
                     exit_player(EXIT_QUIT);
                     return 0;
                 }
-                case MP_CMD_GUI_STOP:
-                    guiGetEvent(guiCEvent, (void *) guiSetStop);
-                    break;
-                case MP_CMD_GUI_PLAY:
-                    guiGetEvent(guiCEvent, (void *) guiSetPlay);
-                    break;
-                case MP_CMD_GUI_SKINBROWSER:
-                    if(fullscreen) guiSetEvent(evFullScreen);
-                    PostMessage(mygui->mainwindow, WM_COMMAND, (WPARAM) ID_SKINBROWSER, 0);
-                    break;
-                case MP_CMD_GUI_PLAYLIST:
-                    if(fullscreen) guiSetEvent(evFullScreen);
-                    PostMessage(mygui->mainwindow, WM_COMMAND, (WPARAM) ID_PLAYLIST, 0);
-                    break;
-                case MP_CMD_GUI_PREFERENCES:
-                    if(fullscreen) guiSetEvent(evFullScreen);
-                    PostMessage(mygui->mainwindow, WM_COMMAND, (WPARAM) ID_PREFS, 0);
-                    break;
-                case MP_CMD_GUI_LOADFILE:
-                    if(fullscreen) guiSetEvent(evFullScreen);
-                    PostMessage(mygui->mainwindow, WM_COMMAND, (WPARAM) IDFILE_OPEN, 0);
-                    break;
-                case MP_CMD_GUI_LOADSUBTITLE:
-                    if(fullscreen) guiSetEvent(evFullScreen);
-                    PostMessage(mygui->mainwindow, WM_COMMAND, (WPARAM) IDSUBTITLE_OPEN, 0);
-                    break;
                 default:
                     break;
             }

Modified: trunk/input/input.c
==============================================================================
--- trunk/input/input.c	Sun Jun 13 13:17:26 2010	(r31377)
+++ trunk/input/input.c	Sun Jun 13 13:34:14 2010	(r31378)
@@ -176,17 +176,6 @@ static const mp_cmd_t mp_cmds[] = {
   { MP_CMD_TV_TELETEXT_ADD_DEC, "teletext_add_dec", 1, { {MP_CMD_ARG_STRING,{0}}, {-1,{0}} } },
   { MP_CMD_TV_TELETEXT_GO_LINK, "teletext_go_link", 1, { {MP_CMD_ARG_INT,{0}}, {-1,{0}} } },
 
-#ifdef CONFIG_GUI
-  { MP_CMD_GUI_LOADFILE, "gui_loadfile", 0, { {-1,{0}} } },
-  { MP_CMD_GUI_LOADSUBTITLE, "gui_loadsubtitle", 0, { {-1,{0}} } },
-  { MP_CMD_GUI_ABOUT, "gui_about", 0, { {-1,{0}} } },
-  { MP_CMD_GUI_PLAY, "gui_play", 0, { {-1,{0}} } },
-  { MP_CMD_GUI_STOP, "gui_stop", 0, { {-1,{0}} } },
-  { MP_CMD_GUI_PLAYLIST, "gui_playlist", 0, { {-1,{0}} } },
-  { MP_CMD_GUI_PREFERENCES, "gui_preferences", 0, { {-1,{0}} } },
-  { MP_CMD_GUI_SKINBROWSER, "gui_skinbrowser", 0, { {-1,{0}} } },
-#endif
-
 #ifdef CONFIG_DVDNAV
   { MP_CMD_DVDNAV, "dvdnav", 1, { {MP_CMD_ARG_STRING, {0}}, {-1,{0}} } },
 #endif
@@ -501,21 +490,6 @@ static const mp_cmd_bind_t def_cmd_binds
 };
 
 
-#ifdef CONFIG_GUI
-static const mp_cmd_bind_t gui_def_cmd_binds[] = {
-
-  { { 'l', 0 }, "gui_loadfile" },
-  { { 't', 0 }, "gui_loadsubtitle" },
-  { { KEY_ENTER, 0 }, "gui_play" },
-  { { KEY_ESC, 0 }, "gui_stop" },
-  { { 'p', 0 }, "gui_playlist" },
-  { { 'r', 0 }, "gui_preferences" },
-  { { 'c', 0 }, "gui_skinbrowser" },
-
-  { { 0 }, NULL }
-};
-#endif
-
 #ifndef MP_MAX_KEY_FD
 #define MP_MAX_KEY_FD 10
 #endif
@@ -1551,13 +1525,6 @@ mp_input_bind_keys(const int keys[MP_MAX
 }
 
 static void
-mp_input_add_binds(const mp_cmd_bind_t* list) {
-  int i;
-  for(i = 0 ; list[i].cmd ; i++)
-    mp_input_bind_keys(list[i].input,list[i].cmd);
-}
-
-static void
 mp_input_free_binds(mp_cmd_bind_t* binds) {
   int i;
 
@@ -1746,11 +1713,6 @@ void
 mp_input_init(int use_gui) {
   char* file;
 
-#ifdef CONFIG_GUI
-  if(use_gui)
-    mp_input_add_binds(gui_def_cmd_binds);
-#endif
-
   file = config_file[0] != '/' ? get_path(config_file) : config_file;
   if(!file)
     return;

Modified: trunk/input/input.h
==============================================================================
--- trunk/input/input.h	Sun Jun 13 13:17:26 2010	(r31377)
+++ trunk/input/input.h	Sun Jun 13 13:34:14 2010	(r31378)
@@ -143,18 +143,6 @@ typedef enum {
   MP_CMD_DVDNAV_PREVMENU,
   MP_CMD_DVDNAV_MOUSECLICK,
 
-  /// GUI commands
-  MP_CMD_GUI_EVENTS = 5000,
-  MP_CMD_GUI_LOADFILE,
-  MP_CMD_GUI_LOADSUBTITLE,
-  MP_CMD_GUI_ABOUT,
-  MP_CMD_GUI_PLAY,
-  MP_CMD_GUI_STOP,
-  MP_CMD_GUI_PLAYLIST,
-  MP_CMD_GUI_PREFERENCES,
-  MP_CMD_GUI_FULLSCREEN,
-  MP_CMD_GUI_SKINBROWSER,
-
   /// DVB commands
   MP_CMD_DVB_SET_CHANNEL = 5101,
 


More information about the MPlayer-cvslog mailing list