[MPlayer-cvslog] r33554 - in trunk: gui/interface.h gui/mplayer/widgets.c mplayer.c

ib subversion at mplayerhq.hu
Fri Jun 3 17:43:39 CEST 2011


Author: ib
Date: Fri Jun  3 17:43:38 2011
New Revision: 33554

Log:
Define "gmplayer" as symbolic constant.

This defines a hardcoded value at one single point.

Modified:
   trunk/gui/interface.h
   trunk/gui/mplayer/widgets.c
   trunk/mplayer.c

Modified: trunk/gui/interface.h
==============================================================================
--- trunk/gui/interface.h	Fri Jun  3 17:15:19 2011	(r33553)
+++ trunk/gui/interface.h	Fri Jun  3 17:43:38 2011	(r33554)
@@ -34,6 +34,8 @@
 extern int use_gui;             // this is defined in mplayer.c
 // ------------------------------------------------------------
 
+#define GMPlayer "gmplayer"
+
 #define guiXEvent          0
 #define guiCEvent          1
 #define guiIEvent          2

Modified: trunk/gui/mplayer/widgets.c
==============================================================================
--- trunk/gui/mplayer/widgets.c	Fri Jun  3 17:15:19 2011	(r33553)
+++ trunk/gui/mplayer/widgets.c	Fri Jun  3 17:43:38 2011	(r33554)
@@ -39,6 +39,7 @@
 
 #include "widgets.h"
 #include "gui/app.h"
+#include "gui/interface.h"
 #include "gui/wm/ws.h"
 
 
@@ -78,7 +79,7 @@ void gtkInit( void )
  int argc = 0;
  char *arg[3], **argv = arg;
 
- arg[argc++] = "gmplayer";
+ arg[argc++] = GMPlayer;
 
  if (mDisplayName)                 // MPlayer option '-display' was given
  {

Modified: trunk/mplayer.c
==============================================================================
--- trunk/mplayer.c	Fri Jun  3 17:15:19 2011	(r33553)
+++ trunk/mplayer.c	Fri Jun  3 17:43:38 2011	(r33554)
@@ -2823,7 +2823,7 @@ int main(int argc, char *argv[])
     if (argc > 1 && argv[1] &&
         (!strcmp(argv[1], "-gui") || !strcmp(argv[1], "-nogui"))) {
         use_gui = !strcmp(argv[1], "-gui");
-    } else if (argv[0] && strstr(mp_basename(argv[0]), "gmplayer")) {
+    } else if (argv[0] && strstr(mp_basename(argv[0]), GMPlayer)) {
         use_gui = 1;
     }
 


More information about the MPlayer-cvslog mailing list