Mercurial > mplayer.hg
comparison gui/dialog/dialog.c @ 35629:365dc9336f0d
Pass parameter instead of using global variable.
author | ib |
---|---|
date | Thu, 10 Jan 2013 11:20:18 +0000 |
parents | ce4b3cbeb1d0 |
children | 840e473ba4c0 |
comparison
equal
deleted
inserted
replaced
35628:df90b5c825f7 | 35629:365dc9336f0d |
---|---|
113 gtk_main_iteration_do(FALSE); | 113 gtk_main_iteration_do(FALSE); |
114 | 114 |
115 return (pixbuf != NULL); | 115 return (pixbuf != NULL); |
116 } | 116 } |
117 | 117 |
118 void gtkInit(void) | 118 void gtkInit(char *display_name) |
119 { | 119 { |
120 int argc = 0; | 120 int argc = 0; |
121 char *arg[3], **argv = arg; | 121 char *arg[3], **argv = arg; |
122 GtkIconTheme *theme; | 122 GtkIconTheme *theme; |
123 GdkPixmap *gdkIcon; | 123 GdkPixmap *gdkIcon; |
125 | 125 |
126 mp_msg(MSGT_GPLAYER, MSGL_V, "GTK init.\n"); | 126 mp_msg(MSGT_GPLAYER, MSGL_V, "GTK init.\n"); |
127 | 127 |
128 arg[argc++] = GMPlayer; | 128 arg[argc++] = GMPlayer; |
129 | 129 |
130 if (mDisplayName) { // MPlayer option '-display' was given | 130 if (display_name) { // MPlayer option '-display' was given |
131 arg[argc++] = "--display"; // Pass corresponding command line arguments to GTK, | 131 arg[argc++] = "--display"; // Pass corresponding command line arguments to GTK, |
132 arg[argc++] = mDisplayName; // to open the requested display for the GUI, too. | 132 arg[argc++] = display_name; // to open the requested display for the GUI, too. |
133 } | 133 } |
134 | 134 |
135 #ifdef CONFIG_GTK2 | 135 #ifdef CONFIG_GTK2 |
136 gtk_disable_setlocale(); | 136 gtk_disable_setlocale(); |
137 #endif | 137 #endif |