Mercurial > mplayer.hg
changeset 31312:0b7792622c88
Remove Gui-specific slave commands and associated key-bindings and other code.
author | reimar |
---|---|
date | Sun, 13 Jun 2010 11:34:14 +0000 |
parents | 9ce59b78dbfd |
children | b080b729c958 |
files | Changelog DOCS/tech/slave.txt command.c gui/interface.c gui/win32/interface.c input/input.c input/input.h |
diffstat | 7 files changed, 4 insertions(+), 101 deletions(-) [+] |
line wrap: on
line diff
--- a/Changelog Sun Jun 13 11:17:26 2010 +0000 +++ b/Changelog Sun Jun 13 11:34:14 2010 +0000 @@ -3,6 +3,8 @@ 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
--- a/DOCS/tech/slave.txt Sun Jun 13 11:17:26 2010 +0000 +++ b/DOCS/tech/slave.txt Sun Jun 13 11:34:14 2010 +0000 @@ -174,9 +174,6 @@ 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.
--- a/command.c Sun Jun 13 11:17:26 2010 +0000 +++ b/command.c Sun Jun 13 11:34:14 2010 +0000 @@ -995,7 +995,7 @@ 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 @@ 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); }
--- a/gui/interface.c Sun Jun 13 11:17:26 2010 +0000 +++ b/gui/interface.c Sun Jun 13 11:34:14 2010 +0000 @@ -356,19 +356,6 @@ 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 @@ case MP_CMD_VO_FULLSCREEN: mplEventHandling( evFullScreen,0 ); break; - default: - mplEventHandling( guiCMDArray[ (int)arg - MP_CMD_GUI_EVENTS - 1 ],0 ); } break; case guiReDraw:
--- a/gui/win32/interface.c Sun Jun 13 11:17:26 2010 +0000 +++ b/gui/win32/interface.c Sun Jun 13 11:34:14 2010 +0000 @@ -676,7 +676,7 @@ /* 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 @@ 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; }
--- a/input/input.c Sun Jun 13 11:17:26 2010 +0000 +++ b/input/input.c Sun Jun 13 11:34:14 2010 +0000 @@ -176,17 +176,6 @@ { 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 @@ }; -#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 @@ } 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 @@ 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;
--- a/input/input.h Sun Jun 13 11:17:26 2010 +0000 +++ b/input/input.h Sun Jun 13 11:34:14 2010 +0000 @@ -143,18 +143,6 @@ 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,