1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
|
diff -urN MPlayer-1.0pre3.old/Gui/mplayer/gtk/about.c MPlayer-1.0pre3/Gui/mplayer/gtk/about.c
--- MPlayer-1.0pre3.old/Gui/mplayer/gtk/about.c 2003-03-16 16:48:26.000000000 -0800
+++ MPlayer-1.0pre3/Gui/mplayer/gtk/about.c 2003-12-11 22:58:54.000000000 -0800
@@ -28,6 +28,11 @@
GtkWidget * AboutText;
GtkWidget * Ok;
+#ifdef HAVE_GTK2_GUI
+ GtkTextBuffer * AboutTextBuffer;
+ GtkTextIter iter;
+#endif //HAVE_GTK2_GUI
+
GtkStyle * pixmapstyle;
GdkPixmap * pixmapwid;
GdkBitmap * mask;
@@ -67,11 +72,24 @@
gtk_box_pack_start( GTK_BOX( vbox ),scrolledwindow1,TRUE,TRUE,0 );
gtk_scrolled_window_set_policy( GTK_SCROLLED_WINDOW( scrolledwindow1 ),GTK_POLICY_AUTOMATIC,GTK_POLICY_AUTOMATIC );
- AboutText=gtk_text_new( NULL,NULL );
+ #ifdef HAVE_GTK2_GUI
+ AboutText = gtk_text_view_new();
+ AboutTextBuffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (AboutText));
+ gtk_text_buffer_get_iter_at_offset (AboutTextBuffer, &iter, 0);
+ #else
+ AboutText = gtk_text_new( NULL,NULL );
+ #endif //HAVE_GTK2_GUI
+
gtk_widget_set_name( AboutText,"AboutText" );
gtk_widget_show( AboutText );
gtk_container_add( GTK_CONTAINER( scrolledwindow1 ),AboutText );
- gtk_text_insert( GTK_TEXT( AboutText ),NULL,NULL,NULL,
+
+ #ifdef HAVE_GTK2_GUI
+ gtk_text_buffer_insert (AboutTextBuffer, &iter,
+ #else
+ gtk_text_insert( GTK_TEXT( AboutText ),NULL,NULL,NULL,
+ #endif //HAVE_GTK2_GUI
+
"\n"
MSGTR_ABOUT_UHU
" (http://www.uhulinux.hu/)\n"
diff -urN MPlayer-1.0pre3.old/configure MPlayer-1.0pre3/configure
--- MPlayer-1.0pre3.old/configure 2003-12-08 13:33:31.000000000 -0800
+++ MPlayer-1.0pre3/configure 2003-12-11 23:12:31.000000000 -0800
@@ -149,6 +149,7 @@
Optional features:
--disable-mencoder disable mencoder (a/v encoder) compilation [enable]
--enable-gui enable gmplayer compilation (gtk-1.2 GUI) [disable]
+ --enable-gtk2 enable gtk2 port of the gui [disable]
--enable-largefiles enable support for files > 2 GBytes [disable]
--enable-linux-devfs set default devices to devfs ones [disable]
--enable-termcap use termcap database for key codes [autodetect]
@@ -1162,6 +1163,7 @@
_lirc=auto
_lircc=auto
_gui=no
+_gtk2=no
_termcap=auto
_termios=auto
_3dfx=no
@@ -1363,6 +1365,8 @@
--disable-lircc) _lircc=no ;;
--enable-gui) _gui=yes ;;
--disable-gui) _gui=no ;;
+ --enable-gtk2) _gtk2=yes ;;
+ --disable-gtk2) _gtk2=no ;;
--enable-termcap) _termcap=yes ;;
--disable-termcap) _termcap=no ;;
--enable-termios) _termios=yes ;;
@@ -5537,41 +5541,69 @@
fi
echores "$_xshape"
+ #Check for new GTK (2.x.x)
+ if test "$_gtk2" = yes ; then
- # Check for GTK:
- echocheck "gtk version"
- if test -z "$_gtkconfig" ; then
- if ( gtk-config --version ) >/dev/null 2>&1 ; then
- _gtkconfig="gtk-config"
- elif ( gtk12-config --version ) >/dev/null 2>&1 ; then
- _gtkconfig="gtk12-config"
- else
- die "The GUI requires GTK devel packages (which were not found)."
- fi
- fi
- _gtk=`$_gtkconfig --version 2>&1`
- _inc_gtk=`$_gtkconfig --cflags 2>&1`
- _ld_gtk=`$_gtkconfig --libs 2>&1`
- echores "$_gtk (using $_gtkconfig)"
-
- # Check for GLIB
- echocheck "glib version"
- if test -z "$_glibconfig" ; then
- if ( glib-config --version ) >/dev/null 2>&1 ; then
- _glibconfig="glib-config"
- elif ( glib12-config --version ) >/dev/null 2>&1 ; then
- _glibconfig="glib12-config"
- else
- die "The GUI requires GLib devel packages (which were not found)"
- fi
- fi
- _glib=`$_glibconfig --version 2>&1`
- _inc_glib=`$_glibconfig --cflags 2>&1`
- _ld_glib=`$_glibconfig --libs 2>&1`
- echores "$_glib (using $_glibconfig)"
+ #Check for GTK:
+ echocheck "GTK+ version"
- _def_gui='#define HAVE_NEW_GUI 1'
- _ld_gui='$(GTKLIB) $(GLIBLIB)'
+ _gtk=`pkg-config gtk+-2.0 --modversion 2>&1`
+ _inc_gtk=`pkg-config gtk+-2.0 --cflags 2>&1`
+ _ld_gtk=`pkg-config gtk+-2.0 --libs 2>&1`
+ echores "$_gtk"
+
+ # Check for GLIB
+ echocheck "glib version"
+ _glib=`pkg-config glib-2.0 --modversion 2>&1`
+ _inc_glib=`pkg-config glib-2.0 --cflags 2>&1`
+ _ld_glib=`pkg-config glib-2.0 --libs 2>&1`
+ echores "$_glib"
+
+ _def_gui='#define HAVE_NEW_GUI 1'
+ _def_gtk2_gui='#define HAVE_GTK2_GUI 1'
+ _ld_gui='$(GTKLIB) $(GLIBLIB)'
+
+ # Check for "old GTK (1.2.x)
+ else
+
+ # Check for GTK:
+ echochek "GTK+ version"
+ if test -z "$_gtkconfig" ; then
+ if ( gtk-config --version ) >/dev/null 2>&1 ; then
+ _gtkconfig="gtk-config"
+ elif ( gtk12-config --version ) >/dev/null 2>&1 ; then
+ _gtkconfig="gtk12-config"
+ else
+ die "the GUI requires GTK+ (which was not found)"
+ fi
+ fi
+ _gtk=`$_gtkconfig --version 2>&1`
+ _inc_gtk=`$_gtkconfig --cflags 2>&1`
+ _ld_gtk=`$_gtkconfig --libs 2>&1`
+ echores "$_gtk (using $_gtkconfig)"
+
+ # Check for GLIB
+ echocheck "glib version"
+ if test -z "$_glibconfig" ; then
+ if ( glib-config --version ) >/dev/null 2>&1 ; then
+ _glibconfig="glib-config"
+ elif (glib12-config --version ) >/dev/null 2>&1 ; then
+ _glibconfig"glib12-config"
+ else
+ die "the GUI requires GLIB (which was not found)"
+ fi
+ fi
+
+ _glib=`$_glibconfig --version 2>&1`
+ _inc_glib=`$_glibconfig --cflags 2>&1`
+ _ld_glib=`$_glibconfig --libs 2>&1`
+ echores "$_glib (using $_glibconfig)"
+
+ _def_gui='#define HAVE_NEW_GUI 1'
+ _def_gtk2_gui='#undef HAVE_GTK2_GUI'
+ _ld_gui='$(GTKLIB) $(GLIBLIB)'
+
+ fi
echo "Creating Gui/config.mak"
cat > Gui/config.mak << EOF
@@ -5586,6 +5618,7 @@
else
_def_gui='#undef HAVE_NEW_GUI'
+ _def_gtk2_gui='#undef HAVE_GTK2_GUI'
fi
# --------------- GUI specific tests end -------------------
@@ -6217,6 +6250,7 @@
/* gui support, please do not edit this option */
$_def_gui
+$_def_gtk2_gui
/* Audio output drivers */
$_def_ossaudio
|