[MPlayer-cvslog] r19361 - in trunk: DOCS/man/en/mplayer.1 cfg-mplayer.h mplayer.c

reimar subversion at mplayerhq.hu
Tue Aug 8 16:13:52 CEST 2006


Author: reimar
Date: Tue Aug  8 16:13:51 2006
New Revision: 19361

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

Changes in other areas also in this revision:
Modified:
   trunk/DOCS/man/en/mplayer.1

Log:
Reintroduce an ugly variant of the -gui/-nogui options.


Modified: trunk/cfg-mplayer.h
==============================================================================
--- trunk/cfg-mplayer.h	(original)
+++ trunk/cfg-mplayer.h	Tue Aug  8 16:13:51 2006
@@ -329,9 +329,8 @@
 	{"lircconf", &lirc_configfile, CONF_TYPE_STRING, CONF_GLOBAL, 0, 0, NULL},
 #endif
 
-	{"gui", "Please remove gui=yes from your config file. Run gmplayer if you want the GUI.\n", CONF_TYPE_PRINT, 0, 0, 0, NULL},
-//	{"gui", &use_gui, CONF_TYPE_FLAG, CONF_GLOBAL|CONF_NOCMD, 0, 1, NULL},
-//	{"nogui", &use_gui, CONF_TYPE_FLAG, CONF_GLOBAL, 1, 0, NULL},
+	{"gui", "The -gui option will only work as first commandline argument.\n", CONF_TYPE_PRINT, 0, 0, 0, (void *)1},
+	{"nogui", "The -nogui option will only work as first commandline argument.\n", CONF_TYPE_PRINT, 0, 0, 0, (void *)1},
       
 #ifdef HAVE_NEW_GUI
 	{"skin", &skinName, CONF_TYPE_STRING, CONF_GLOBAL, 0, 0, NULL},

Modified: trunk/mplayer.c
==============================================================================
--- trunk/mplayer.c	(original)
+++ trunk/mplayer.c	Tue Aug  8 16:13:51 2006
@@ -2625,6 +2625,10 @@
   tv_param_immediate = 1;
 #endif
 
+  if (argc > 1 && argv[1] &&
+      (!strcmp(argv[1], "-gui") || !strcmp(argv[1], "-nogui"))) {
+    use_gui = !strcmp(argv[1], "-gui");
+  } else
   if ( argv[0] )
   {
     char *base = strrchr(argv[0], '/');



More information about the MPlayer-cvslog mailing list