[MPlayer-cvslog] r33564 - in trunk: DOCS/man/de/mplayer.1 DOCS/man/en/mplayer.1 gui/cfg.c help/help_mp-cs.h help/help_mp-de.h help/help_mp-en.h help/help_mp-es.h help/help_mp-fr.h help/help_mp-hu.h help/help_mp-it....

ib subversion at mplayerhq.hu
Mon Jun 6 13:55:35 CEST 2011


Author: ib
Date: Mon Jun  6 13:55:35 2011
New Revision: 33564

Log:
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.

Modified:
   trunk/gui/cfg.c
   trunk/mplayer.c
   trunk/mplayer.h

Changes in other areas also in this revision:
Modified:
   trunk/DOCS/man/de/mplayer.1
   trunk/DOCS/man/en/mplayer.1
   trunk/help/help_mp-cs.h
   trunk/help/help_mp-de.h
   trunk/help/help_mp-en.h
   trunk/help/help_mp-es.h
   trunk/help/help_mp-fr.h
   trunk/help/help_mp-hu.h
   trunk/help/help_mp-it.h
   trunk/help/help_mp-pl.h
   trunk/help/help_mp-ru.h
   trunk/help/help_mp-sk.h
   trunk/help/help_mp-tr.h
   trunk/help/help_mp-uk.h
   trunk/help/help_mp-zh_CN.h
   trunk/help/help_mp-zh_TW.h

Modified: trunk/gui/cfg.c
==============================================================================
--- trunk/gui/cfg.c	Sun Jun  5 16:54:41 2011	(r33563)
+++ trunk/gui/cfg.c	Mon Jun  6 13:55:35 2011	(r33564)
@@ -256,6 +256,8 @@ int cfg_read(void)
     char *cfg;
     FILE *f;
 
+    player_idle_mode = 1;   // GUI is in idle mode by default
+
     // configuration
 
     cfg = get_path("gui.conf");

Modified: trunk/mplayer.c
==============================================================================
--- trunk/mplayer.c	Sun Jun  5 16:54:41 2011	(r33563)
+++ trunk/mplayer.c	Mon Jun  6 13:55:35 2011	(r33564)
@@ -2960,18 +2960,14 @@ int main(int argc, char *argv[])
     if (opt_exit)
         exit_player(EXIT_NONE);
 
-    if (player_idle_mode && use_gui) {
-        mp_msg(MSGT_CPLAYER, MSGL_FATAL, MSGTR_NoIdleAndGui);
-        exit_player_with_rc(EXIT_NONE, 1);
-    }
-
-    if (!filename && !player_idle_mode) {
-        if (!use_gui) {
+    if (!filename) {
+        if (use_gui)
+            gui_no_filename = 1;
+        else if (!player_idle_mode) {
             // no file/vcd/dvd -> show HELP:
             mp_msg(MSGT_CPLAYER, MSGL_INFO, help_text);
             exit_player_with_rc(EXIT_NONE, 0);
-        } else
-            gui_no_filename = 1;
+        }
     }
 
     /* Display what configure line was used */
@@ -4173,7 +4169,7 @@ goto_next_file:  // don't jump here afte
     }
 #endif
 
-    if (use_gui || mpctx->playtree_iter != NULL || player_idle_mode) {
+    if ((use_gui && guiIntfStruct.Playing) || mpctx->playtree_iter != NULL || player_idle_mode) {
         if (!mpctx->playtree_iter)
             filename = NULL;
         mpctx->eof = 0;

Modified: trunk/mplayer.h
==============================================================================
--- trunk/mplayer.h	Sun Jun  5 16:54:41 2011	(r33563)
+++ trunk/mplayer.h	Mon Jun  6 13:55:35 2011	(r33564)
@@ -31,6 +31,7 @@ extern unsigned int osd_visible;
 extern int autosync;
 extern int frame_dropping;
 extern int slave_mode;
+extern int player_idle_mode;
 extern int use_menu;
 
 extern float  audio_delay;


More information about the MPlayer-cvslog mailing list