Mercurial > mplayer.hg
comparison mplayer.c @ 33476:d068eac6cbf9
Make option '-noidle' working for the GUI.
So far, -idle was implicitly a default option to the GUI (although
the corresponding option variable was set to the '-noidle' value).
Explicitly set option '-idle' in the GUI now, remove the error (both
message and exit) that "the -idle option cannot be used with GMPlayer",
start the GUI without filename in either mode (idle or noidle) and
go to play_next_file only as long as the GUI has something to play
(or -idle was given).
This allows using option '-noidle' for the GUI which can be used to
quit it after it has finished playing.
author | ib |
---|---|
date | Mon, 06 Jun 2011 11:55:35 +0000 |
parents | 45d8bfbd27bc |
children | de7945cbcfa0 |
comparison
equal
deleted
inserted
replaced
33475:b1bda1dded08 | 33476:d068eac6cbf9 |
---|---|
2958 } | 2958 } |
2959 | 2959 |
2960 if (opt_exit) | 2960 if (opt_exit) |
2961 exit_player(EXIT_NONE); | 2961 exit_player(EXIT_NONE); |
2962 | 2962 |
2963 if (player_idle_mode && use_gui) { | 2963 if (!filename) { |
2964 mp_msg(MSGT_CPLAYER, MSGL_FATAL, MSGTR_NoIdleAndGui); | 2964 if (use_gui) |
2965 exit_player_with_rc(EXIT_NONE, 1); | 2965 gui_no_filename = 1; |
2966 } | 2966 else if (!player_idle_mode) { |
2967 | |
2968 if (!filename && !player_idle_mode) { | |
2969 if (!use_gui) { | |
2970 // no file/vcd/dvd -> show HELP: | 2967 // no file/vcd/dvd -> show HELP: |
2971 mp_msg(MSGT_CPLAYER, MSGL_INFO, help_text); | 2968 mp_msg(MSGT_CPLAYER, MSGL_INFO, help_text); |
2972 exit_player_with_rc(EXIT_NONE, 0); | 2969 exit_player_with_rc(EXIT_NONE, 0); |
2973 } else | 2970 } |
2974 gui_no_filename = 1; | |
2975 } | 2971 } |
2976 | 2972 |
2977 /* Display what configure line was used */ | 2973 /* Display what configure line was used */ |
2978 mp_msg(MSGT_CPLAYER, MSGL_V, "Configuration: " CONFIGURATION "\n"); | 2974 mp_msg(MSGT_CPLAYER, MSGL_V, "Configuration: " CONFIGURATION "\n"); |
2979 | 2975 |
4171 #endif | 4167 #endif |
4172 mplEnd(); | 4168 mplEnd(); |
4173 } | 4169 } |
4174 #endif | 4170 #endif |
4175 | 4171 |
4176 if (use_gui || mpctx->playtree_iter != NULL || player_idle_mode) { | 4172 if ((use_gui && guiIntfStruct.Playing) || mpctx->playtree_iter != NULL || player_idle_mode) { |
4177 if (!mpctx->playtree_iter) | 4173 if (!mpctx->playtree_iter) |
4178 filename = NULL; | 4174 filename = NULL; |
4179 mpctx->eof = 0; | 4175 mpctx->eof = 0; |
4180 goto play_next_file; | 4176 goto play_next_file; |
4181 } | 4177 } |