[MPlayer-cvslog] r35723 - in trunk/gui: dialog/dialog.c dialog/dialog.h interface.c

ib subversion at mplayerhq.hu
Thu Jan 10 12:20:18 CET 2013


Author: ib
Date: Thu Jan 10 12:20:18 2013
New Revision: 35723

Log:
Pass parameter instead of using global variable.

Modified:
   trunk/gui/dialog/dialog.c
   trunk/gui/dialog/dialog.h
   trunk/gui/interface.c

Modified: trunk/gui/dialog/dialog.c
==============================================================================
--- trunk/gui/dialog/dialog.c	Thu Jan 10 12:12:40 2013	(r35722)
+++ trunk/gui/dialog/dialog.c	Thu Jan 10 12:20:18 2013	(r35723)
@@ -115,7 +115,7 @@ static int gtkLoadIcon(GtkIconTheme *the
     return (pixbuf != NULL);
 }
 
-void gtkInit(void)
+void gtkInit(char *display_name)
 {
     int argc = 0;
     char *arg[3], **argv = arg;
@@ -127,9 +127,9 @@ void gtkInit(void)
 
     arg[argc++] = GMPlayer;
 
-    if (mDisplayName) {            // MPlayer option '-display' was given
+    if (display_name) {            // MPlayer option '-display' was given
         arg[argc++] = "--display"; // Pass corresponding command line arguments to GTK,
-        arg[argc++] = mDisplayName; // to open the requested display for the GUI, too.
+        arg[argc++] = display_name; // to open the requested display for the GUI, too.
     }
 
 #ifdef CONFIG_GTK2

Modified: trunk/gui/dialog/dialog.h
==============================================================================
--- trunk/gui/dialog/dialog.h	Thu Jan 10 12:12:40 2013	(r35722)
+++ trunk/gui/dialog/dialog.h	Thu Jan 10 12:20:18 2013	(r35723)
@@ -64,7 +64,7 @@ extern guiIcon_t guiIcon;
 
 void widgetsCreate(void);
 
-void gtkInit(void);
+void gtkInit(char *display_name);
 void gtkAddIcon(GtkWidget *window);
 
 int gtkFillSkinList(gchar *dir);

Modified: trunk/gui/interface.c
==============================================================================
--- trunk/gui/interface.c	Thu Jan 10 12:12:40 2013	(r35722)
+++ trunk/gui/interface.c	Thu Jan 10 12:20:18 2013	(r35723)
@@ -111,7 +111,7 @@ void guiInit(void)
     /* initialize graphical user interfaces */
 
     wsXInit(mDisplay);
-    gtkInit();
+    gtkInit(mDisplayName);
 
     /* load skin */
 


More information about the MPlayer-cvslog mailing list