comparison gui/dialog/dialog.c @ 37176:2208a16cc562

Remove GTK+ and GLib versions 1 relatedness from the GUI. This isn't really a cut-back, because although it seemed that compiling with GTK+ and GLib versions 1 were possible, compiling actually hadn't been possible for quite some time.
author ib
date Mon, 08 Sep 2014 20:17:01 +0000
parents b28b632efeef
children
comparison
equal deleted inserted replaced
37175:ba344b4947c5 37176:2208a16cc562
111 */ 111 */
112 void gtkInit(char *display_name) 112 void gtkInit(char *display_name)
113 { 113 {
114 int argc = 0; 114 int argc = 0;
115 char *arg[3], **argv = arg; 115 char *arg[3], **argv = arg;
116 #ifdef CONFIG_GTK2
117 char *env; 116 char *env;
118 #endif
119 GtkIconTheme *theme; 117 GtkIconTheme *theme;
120 GdkPixmap *gdkIcon; 118 GdkPixmap *gdkIcon;
121 GdkBitmap *gdkIconMask; 119 GdkBitmap *gdkIconMask;
122 120
123 mp_msg(MSGT_GPLAYER, MSGL_V, "GTK init.\n"); 121 mp_msg(MSGT_GPLAYER, MSGL_V, "GTK init.\n");
127 if (display_name) { // MPlayer option '-display' was given 125 if (display_name) { // MPlayer option '-display' was given
128 arg[argc++] = "--display"; // Pass corresponding command line arguments to GTK, 126 arg[argc++] = "--display"; // Pass corresponding command line arguments to GTK,
129 arg[argc++] = display_name; // to open the requested display for the GUI, too. 127 arg[argc++] = display_name; // to open the requested display for the GUI, too.
130 } 128 }
131 129
132 #ifdef CONFIG_GTK2
133 gtk_disable_setlocale(); 130 gtk_disable_setlocale();
134 131
135 env = getenv("G_FILENAME_ENCODING"); 132 env = getenv("G_FILENAME_ENCODING");
136 133
137 if ((!env && getenv("G_BROKEN_FILENAMES")) || (gstrncmp(env, "@locale", 7) == 0)) 134 if ((!env && getenv("G_BROKEN_FILENAMES")) || (gstrncmp(env, "@locale", 7) == 0))
138 mp_msg(MSGT_GPLAYER, MSGL_WARN, MSGTR_GUI_MSG_LocaleEncoding); 135 mp_msg(MSGT_GPLAYER, MSGL_WARN, MSGTR_GUI_MSG_LocaleEncoding);
139 #endif
140 136
141 gtk_init(&argc, &argv); 137 gtk_init(&argc, &argv);
142 wsSetErrorHandler(); // GDK has just set its own handler 138 wsSetErrorHandler(); // GDK has just set its own handler
143 139
144 theme = gtk_icon_theme_get_default(); 140 theme = gtk_icon_theme_get_default();