Mercurial > mplayer.hg
annotate gui/dialog/equalizer.c @ 35954:b1d68e8f28c0
build: Drop unused part of sysi86() check.
author | diego |
---|---|
date | Sat, 23 Mar 2013 14:48:22 +0000 |
parents | 8ad4d2fb46e8 |
children | 249207676edf |
rev | line source |
---|---|
33572 | 1 /* |
2 * This file is part of MPlayer. | |
3 * | |
4 * MPlayer is free software; you can redistribute it and/or modify | |
5 * it under the terms of the GNU General Public License as published by | |
6 * the Free Software Foundation; either version 2 of the License, or | |
7 * (at your option) any later version. | |
8 * | |
9 * MPlayer is distributed in the hope that it will be useful, | |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
12 * GNU General Public License for more details. | |
13 * | |
14 * You should have received a copy of the GNU General Public License along | |
15 * with MPlayer; if not, write to the Free Software Foundation, Inc., | |
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | |
17 */ | |
18 | |
19 #include <stdlib.h> | |
20 #include <stdio.h> | |
21 #include <sys/types.h> | |
22 #include <sys/stat.h> | |
23 #include <unistd.h> | |
24 #include <string.h> | |
25 | |
26 #include <gdk/gdkkeysyms.h> | |
27 #include <gtk/gtk.h> | |
28 | |
35525 | 29 #include "gui/app/app.h" |
30 #include "gui/app/cfg.h" | |
33738 | 31 #include "gui/interface.h" |
33572 | 32 #include "help_mp.h" |
33 #include "libaf/equalizer.h" | |
33689
8d0290220239
Replace numeric constants for gtkEquChannels array size.
ib
parents:
33646
diff
changeset
|
34 #include "libavutil/common.h" |
33572 | 35 #include "libvo/video_out.h" |
36 #include "stream/stream.h" | |
37 #include "libmpdemux/demuxer.h" | |
38 #include "libmpdemux/stheader.h" | |
39 #include "libmpcodecs/dec_video.h" | |
35529 | 40 #include "dialog.h" |
33739 | 41 #include "gui/util/mem.h" |
33737 | 42 #include "gui/util/string.h" |
33572 | 43 |
44 #include "equalizer.h" | |
45 #include "tools.h" | |
46 | |
47 #define eqRange 15 | |
48 | |
49 GtkWidget * Equalizer = NULL; | |
50 static GtkWidget * EquConfig; | |
51 | |
52 static GtkWidget * Notebook; | |
53 static GtkWidget * ChannelsList; | |
54 static GtkWidget * VContrast, * VBrightness, * VHue, * VSaturation; | |
55 static GtkAdjustment * VContrastadj, * VBrightnessadj, * VHueadj, * VSaturationadj; | |
56 static GtkWidget * Ok, * Clear, * Config; | |
57 static GtkWidget * A3125, * A125, * A6250, * A250, * A500, * A1000, * A2000, * A4000, * A8000, * A16000; | |
58 static GtkAdjustment * A3125adj, * A125adj, * A6250adj, * A250adj, * A500adj, * A1000adj, * A2000adj, * A4000adj, * A8000adj, * A16000adj; | |
59 | |
60 static int Channel = -1; | |
61 | |
62 // --- | |
63 | |
64 char * gtkEquChannel1 = NULL; | |
65 char * gtkEquChannel2 = NULL; | |
66 char * gtkEquChannel3 = NULL; | |
67 char * gtkEquChannel4 = NULL; | |
68 char * gtkEquChannel5 = NULL; | |
69 char * gtkEquChannel6 = NULL; | |
70 | |
71 // --- | |
72 | |
73 void ShowEquConfig( void ); | |
74 void HideEquConfig( void ); | |
75 | |
76 static void eqSetBands( int channel ) | |
77 { | |
78 if ( channel < 0 ) channel=0; | |
79 gtk_adjustment_set_value( A3125adj,0.0f - gtkEquChannels[channel][0] ); | |
80 gtk_adjustment_set_value( A6250adj,0.0f - gtkEquChannels[channel][1] ); | |
81 gtk_adjustment_set_value( A125adj,0.0f - gtkEquChannels[channel][2] ); | |
82 gtk_adjustment_set_value( A250adj,0.0f - gtkEquChannels[channel][3] ); | |
83 gtk_adjustment_set_value( A500adj,0.0f - gtkEquChannels[channel][4] ); | |
84 gtk_adjustment_set_value( A1000adj,0.0f - gtkEquChannels[channel][5] ); | |
85 gtk_adjustment_set_value( A2000adj,0.0f - gtkEquChannels[channel][6] ); | |
86 gtk_adjustment_set_value( A4000adj,0.0f - gtkEquChannels[channel][7] ); | |
87 gtk_adjustment_set_value( A8000adj,0.0f - gtkEquChannels[channel][8] ); | |
88 gtk_adjustment_set_value( A16000adj,0.0f - gtkEquChannels[channel][9] ); | |
89 | |
90 if ( guiInfo.sh_video ) | |
91 { | |
92 get_video_colors( guiInfo.sh_video,"brightness",&vo_gamma_brightness ); | |
93 get_video_colors( guiInfo.sh_video,"contrast",&vo_gamma_contrast ); | |
94 get_video_colors( guiInfo.sh_video,"hue",&vo_gamma_hue ); | |
95 get_video_colors( guiInfo.sh_video,"saturation",&vo_gamma_saturation ); | |
96 } | |
97 | |
98 gtk_adjustment_set_value( VContrastadj,(float)vo_gamma_contrast ); | |
99 gtk_adjustment_set_value( VBrightnessadj,(float)vo_gamma_brightness ); | |
100 gtk_adjustment_set_value( VHueadj,(float)vo_gamma_hue ); | |
101 gtk_adjustment_set_value( VSaturationadj,(float)vo_gamma_saturation ); | |
102 } | |
103 | |
104 static void eqSetChannelNames( void ) | |
105 { | |
106 gchar * str[2]; | |
107 gtk_clist_clear( GTK_CLIST( ChannelsList ) ); | |
108 str[1]=""; | |
109 str[0]=MSGTR_EQU_All; | |
110 gtk_clist_append( GTK_CLIST( ChannelsList ) ,str); | |
33646 | 111 if ( guiInfo.AudioChannels > 1 ) |
33572 | 112 { |
113 str[0]=gtkEquChannel1; gtk_clist_append( GTK_CLIST( ChannelsList ) ,str); | |
114 str[0]=gtkEquChannel2; gtk_clist_append( GTK_CLIST( ChannelsList ) ,str); | |
115 } | |
33646 | 116 if ( guiInfo.AudioChannels > 2 ) |
33572 | 117 { |
118 str[0]=gtkEquChannel3; gtk_clist_append( GTK_CLIST( ChannelsList ) ,str); | |
119 str[0]=gtkEquChannel4; gtk_clist_append( GTK_CLIST( ChannelsList ) ,str); | |
120 } | |
33646 | 121 if ( guiInfo.AudioChannels > 4 ) |
33572 | 122 { |
123 str[0]=gtkEquChannel5; gtk_clist_append( GTK_CLIST( ChannelsList ) ,str); | |
124 str[0]=gtkEquChannel6; gtk_clist_append( GTK_CLIST( ChannelsList ) ,str); | |
125 } | |
126 gtk_clist_select_row( GTK_CLIST( ChannelsList ),0,0 ); | |
127 } | |
128 | |
129 void ShowEqualizer( void ) | |
130 { | |
131 if ( Equalizer ) gtkActive( Equalizer ); | |
132 else Equalizer=create_Equalizer(); | |
133 | |
134 if ( !gtkEquChannel1 ) gtkEquChannel1=strdup( MSGTR_EQU_Front_Right ); | |
135 if ( !gtkEquChannel2 ) gtkEquChannel2=strdup( MSGTR_EQU_Front_Left ); | |
136 if ( !gtkEquChannel3 ) gtkEquChannel3=strdup( MSGTR_EQU_Back_Right ); | |
137 if ( !gtkEquChannel4 ) gtkEquChannel4=strdup( MSGTR_EQU_Back_Left ); | |
138 if ( !gtkEquChannel5 ) gtkEquChannel5=strdup( MSGTR_EQU_Center ); | |
139 if ( !gtkEquChannel6 ) gtkEquChannel6=strdup( MSGTR_EQU_Bass ); | |
140 | |
141 eqSetChannelNames(); | |
142 | |
143 if ( !guiInfo.Playing || !guiInfo.sh_video ) | |
144 { | |
145 gtk_widget_set_sensitive( VContrast,FALSE ); | |
146 gtk_widget_set_sensitive( VBrightness,FALSE ); | |
147 gtk_widget_set_sensitive( VHue,FALSE ); | |
148 gtk_widget_set_sensitive( VSaturation,FALSE ); | |
149 } | |
150 Channel=-1; | |
151 eqSetBands( 0 ); | |
152 if ( !guiInfo.Playing || !gtkEnableAudioEqualizer ) | |
153 { | |
154 gtk_widget_set_sensitive( ChannelsList,FALSE ); | |
155 gtk_widget_set_sensitive( A3125,FALSE ); | |
156 gtk_widget_set_sensitive( A125,FALSE ); | |
157 gtk_widget_set_sensitive( A6250,FALSE ); | |
158 gtk_widget_set_sensitive( A250,FALSE ); | |
159 gtk_widget_set_sensitive( A500,FALSE ); | |
160 gtk_widget_set_sensitive( A1000,FALSE ); | |
161 gtk_widget_set_sensitive( A2000,FALSE ); | |
162 gtk_widget_set_sensitive( A4000,FALSE ); | |
163 gtk_widget_set_sensitive( A8000,FALSE ); | |
164 gtk_widget_set_sensitive( A16000,FALSE ); | |
165 } | |
166 | |
167 if ( gtk_notebook_get_current_page( GTK_NOTEBOOK( Notebook ) ) == 0 ) gtk_widget_show( Config ); | |
168 gtk_widget_show( Equalizer ); | |
169 } | |
170 | |
171 static void HideEqualizer( void ) | |
172 { | |
173 if ( !Equalizer ) return; | |
174 gtk_widget_hide( Equalizer ); | |
175 gtk_widget_destroy( Equalizer ); | |
176 Equalizer=NULL; | |
177 if ( EquConfig ) HideEquConfig(); | |
178 } | |
179 | |
180 static gboolean eqHScaleMotion( GtkWidget * widget,GdkEventMotion * event,gpointer user_data ) | |
181 { | |
182 equalizer_t eq; | |
183 switch ( (int)user_data ) | |
184 { | |
185 case 0: eq.gain=A3125adj->value; break; | |
186 case 1: eq.gain=A6250adj->value; break; | |
187 case 2: eq.gain=A125adj->value; break; | |
188 case 3: eq.gain=A250adj->value; break; | |
189 case 4: eq.gain=A500adj->value; break; | |
190 case 5: eq.gain=A1000adj->value; break; | |
191 case 6: eq.gain=A2000adj->value; break; | |
192 case 7: eq.gain=A4000adj->value; break; | |
193 case 8: eq.gain=A8000adj->value; break; | |
194 case 9: eq.gain=A16000adj->value; break; | |
195 default: return FALSE; | |
196 } | |
197 eq.gain=0.0f - eq.gain; | |
198 eq.band=(int)user_data; | |
199 if ( Channel == -1 ) | |
200 { | |
201 int i; | |
202 for ( i=0;i<6;i++ ) | |
33766 | 203 { eq.channel=i; mplayer( MPLAYER_SET_EQUALIZER,0,&eq ); } |
204 } else { eq.channel=Channel; mplayer( MPLAYER_SET_EQUALIZER,0,&eq ); } | |
33572 | 205 |
206 return FALSE; | |
207 } | |
208 | |
209 static gboolean eqVScaleMotion( GtkWidget * widget,GdkEventMotion * event,gpointer user_data ) | |
210 { | |
211 | |
212 switch( (int)user_data ) | |
213 { | |
33769 | 214 case 1: mplayer( MPLAYER_SET_CONTRAST,VContrastadj->value,0 ); break; |
215 case 2: mplayer( MPLAYER_SET_BRIGHTNESS,VBrightnessadj->value,0 ); break; | |
216 case 3: mplayer( MPLAYER_SET_HUE,VHueadj->value,0 ); break; | |
217 case 4: mplayer( MPLAYER_SET_SATURATION,VSaturationadj->value,0 ); break; | |
33572 | 218 } |
219 | |
220 return FALSE; | |
221 } | |
222 | |
223 static void eqButtonReleased( GtkButton * button,gpointer user_data ) | |
224 { | |
225 switch( (int)user_data ) | |
226 { | |
227 case 0: HideEqualizer(); break; | |
228 case 1: | |
229 if ( gtk_notebook_get_current_page( GTK_NOTEBOOK( Notebook ) ) == 0 ) | |
230 { | |
231 if ( !guiInfo.Playing || !gtkEnableAudioEqualizer ) break; | |
33766 | 232 mplayer( MPLAYER_SET_EQUALIZER,0,NULL ); |
33572 | 233 eqSetBands( Channel ); |
234 } | |
235 else | |
236 { | |
237 if ( !guiInfo.Playing ) break; | |
33769 | 238 mplayer( MPLAYER_SET_CONTRAST,0,0 ); |
239 mplayer( MPLAYER_SET_BRIGHTNESS,0,0 ); | |
240 mplayer( MPLAYER_SET_HUE,0,0 ); | |
241 mplayer( MPLAYER_SET_SATURATION,0,0 ); | |
33572 | 242 eqSetBands( Channel ); |
243 } | |
244 break; | |
245 case 2: | |
246 ShowEquConfig(); | |
247 break; | |
248 } | |
249 } | |
250 | |
34466
a650895d50a5
Use correct data types and common variable names in GTK callback functions.
ib
parents:
33769
diff
changeset
|
251 static gboolean eqFocus( GtkWidget * widget,GdkEvent * event,gpointer user_data ) |
a650895d50a5
Use correct data types and common variable names in GTK callback functions.
ib
parents:
33769
diff
changeset
|
252 { |
a650895d50a5
Use correct data types and common variable names in GTK callback functions.
ib
parents:
33769
diff
changeset
|
253 eqSetBands( Channel ); |
a650895d50a5
Use correct data types and common variable names in GTK callback functions.
ib
parents:
33769
diff
changeset
|
254 return FALSE; |
a650895d50a5
Use correct data types and common variable names in GTK callback functions.
ib
parents:
33769
diff
changeset
|
255 } |
33572 | 256 |
257 static void eqSelectChannelsListRow( GtkCList * clist,gint row,gint column,GdkEvent * event,gpointer user_data ) | |
258 { | |
259 Channel=row - 1; | |
260 eqSetBands( Channel ); | |
261 if ( Channel == -1 ) | |
262 { | |
33756
e55098a29bcb
Use unsigned index variable for comparison with array size.
ib
parents:
33743
diff
changeset
|
263 unsigned int i,j; equalizer_t eq; |
33689
8d0290220239
Replace numeric constants for gtkEquChannels array size.
ib
parents:
33646
diff
changeset
|
264 for ( i=1;i<FF_ARRAY_ELEMS(gtkEquChannels);i++ ) |
8d0290220239
Replace numeric constants for gtkEquChannels array size.
ib
parents:
33646
diff
changeset
|
265 for ( j=0;j<FF_ARRAY_ELEMS(*gtkEquChannels);j++ ) |
33766 | 266 { eq.band=j; eq.channel=i; eq.gain=gtkEquChannels[0][j]; mplayer( MPLAYER_SET_EQUALIZER,0,&eq ); } |
33572 | 267 } |
268 } | |
269 | |
34466
a650895d50a5
Use correct data types and common variable names in GTK callback functions.
ib
parents:
33769
diff
changeset
|
270 static void eqNotebook( GtkNotebook * notebook, gpointer page, |
a650895d50a5
Use correct data types and common variable names in GTK callback functions.
ib
parents:
33769
diff
changeset
|
271 guint page_num, gpointer user_data ) |
33572 | 272 { |
273 if ( page_num ) gtk_widget_hide( Config ); | |
274 else gtk_widget_show( Config ); | |
275 } | |
276 | |
277 GtkWidget * create_Equalizer( void ) | |
278 { | |
279 GtkWidget * vbox1; | |
280 GtkWidget * hbox1; | |
281 GtkWidget * scrolledwindow1; | |
282 GtkWidget * table1; | |
283 GtkWidget * hbuttonbox1; | |
284 GtkAccelGroup * accel_group; | |
285 | |
286 accel_group=gtk_accel_group_new(); | |
287 | |
288 Equalizer=gtk_window_new( GTK_WINDOW_TOPLEVEL ); | |
289 gtk_widget_set_name( Equalizer,MSGTR_Equalizer ); | |
290 gtk_object_set_data( GTK_OBJECT( Equalizer ),MSGTR_Equalizer,Equalizer ); | |
291 gtk_widget_set_usize( Equalizer,-1,256 ); | |
292 gtk_window_set_title( GTK_WINDOW( Equalizer ),MSGTR_Equalizer ); | |
293 gtk_window_set_position( GTK_WINDOW( Equalizer ),GTK_WIN_POS_CENTER ); | |
294 gtk_window_set_policy( GTK_WINDOW( Equalizer ),FALSE,FALSE,FALSE ); | |
295 gtk_window_set_wmclass( GTK_WINDOW( Equalizer ),"Equalizer","MPlayer" ); | |
296 | |
297 gtk_widget_realize( Equalizer ); | |
298 gtkAddIcon( Equalizer ); | |
299 | |
300 vbox1=AddVBox( AddDialogFrame( Equalizer ),0 ); | |
301 | |
302 Notebook=gtk_notebook_new(); | |
303 gtk_widget_set_name( Notebook,"Notebook" ); | |
304 gtk_widget_show( Notebook ); | |
305 gtk_box_pack_start( GTK_BOX( vbox1 ),Notebook,TRUE,TRUE,0 ); | |
306 gtk_container_set_border_width( GTK_CONTAINER( Notebook ),1 ); | |
307 | |
308 hbox1=AddHBox( Notebook,0 ); | |
309 | |
310 scrolledwindow1=gtk_scrolled_window_new( NULL,NULL ); | |
311 gtk_widget_set_name( scrolledwindow1,"scrolledwindow1" ); | |
312 gtk_widget_show( scrolledwindow1 ); | |
313 gtk_box_pack_start( GTK_BOX( hbox1 ),scrolledwindow1,FALSE,FALSE,0 ); | |
314 gtk_widget_set_usize( scrolledwindow1,106,-2 ); | |
315 gtk_scrolled_window_set_policy( GTK_SCROLLED_WINDOW( scrolledwindow1 ),GTK_POLICY_AUTOMATIC,GTK_POLICY_AUTOMATIC ); | |
316 | |
317 ChannelsList=gtk_clist_new( 1 ); | |
318 gtk_widget_set_name( ChannelsList,"ChannelsList" ); | |
319 gtk_widget_show( ChannelsList ); | |
320 gtk_container_add( GTK_CONTAINER( scrolledwindow1 ),ChannelsList ); | |
321 gtk_clist_set_column_width( GTK_CLIST( ChannelsList ),0,80 ); | |
322 gtk_clist_column_titles_hide( GTK_CLIST( ChannelsList ) ); | |
323 | |
324 table1=gtk_table_new( 2,10,FALSE ); | |
325 gtk_widget_set_name( table1,"table1" ); | |
326 gtk_widget_show( table1 ); | |
327 gtk_box_pack_start( GTK_BOX( hbox1 ),table1,FALSE,FALSE,0 ); | |
328 gtk_table_set_row_spacings( GTK_TABLE( table1 ),4 ); | |
329 gtk_table_set_col_spacings( GTK_TABLE( table1 ),9 ); | |
330 | |
331 A3125adj=GTK_ADJUSTMENT( gtk_adjustment_new( 0,-eqRange,eqRange,0.5,0,0 ) ); | |
332 A3125=AddVScaler( A3125adj,NULL,-1 ); | |
333 gtk_table_attach( GTK_TABLE( table1 ),A3125,0,1,0,1,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),0,0 ); | |
334 | |
335 A6250adj=GTK_ADJUSTMENT( gtk_adjustment_new( 0,-eqRange,eqRange,0.5,0,0 ) ); | |
336 A6250=AddVScaler( A6250adj,NULL,-1 ); | |
337 gtk_table_attach( GTK_TABLE( table1 ),A6250,1,2,0,1,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),0,0 ); | |
338 | |
339 A125adj=GTK_ADJUSTMENT( gtk_adjustment_new( 0,-eqRange,eqRange,0.5,0,0 ) ); | |
340 A125=AddVScaler( A125adj,NULL,-1 ); | |
341 gtk_table_attach( GTK_TABLE( table1 ),A125,2,3,0,1,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),0,0 ); | |
342 | |
343 A250adj=GTK_ADJUSTMENT( gtk_adjustment_new( 0,-eqRange,eqRange,0.5,0,0 ) ); | |
344 A250=AddVScaler( A250adj,NULL,-1 ); | |
345 gtk_table_attach( GTK_TABLE( table1 ),A250,3,4,0,1,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),0,0 ); | |
346 | |
347 A500adj=GTK_ADJUSTMENT( gtk_adjustment_new( 0,-eqRange,eqRange,0.5,0,0 ) ); | |
348 A500=AddVScaler( A500adj,NULL,-1 ); | |
349 gtk_table_attach( GTK_TABLE( table1 ),A500,4,5,0,1,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),0,0 ); | |
350 | |
351 A1000adj=GTK_ADJUSTMENT( gtk_adjustment_new( 0,-eqRange,eqRange,0.5,0,0 ) ); | |
352 A1000=AddVScaler( A1000adj,NULL,-1 ); | |
353 gtk_table_attach( GTK_TABLE( table1 ),A1000,5,6,0,1,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),0,0 ); | |
354 | |
355 A2000adj=GTK_ADJUSTMENT( gtk_adjustment_new( 0,-eqRange,eqRange,0.5,0,0 ) ); | |
356 A2000=AddVScaler( A2000adj,NULL,-1 ); | |
357 gtk_table_attach( GTK_TABLE( table1 ),A2000,6,7,0,1,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),0,0 ); | |
358 | |
359 A4000adj=GTK_ADJUSTMENT( gtk_adjustment_new( 0,-eqRange,eqRange,0.5,0,0 ) ); | |
360 A4000=AddVScaler( A4000adj,NULL,-1 ); | |
361 gtk_table_attach( GTK_TABLE( table1 ),A4000,7,8,0,1,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),0,0 ); | |
362 | |
363 A8000adj=GTK_ADJUSTMENT( gtk_adjustment_new( 0,-eqRange,eqRange,0.5,0,0 ) ); | |
364 A8000=AddVScaler( A8000adj,NULL,-1 ); | |
365 gtk_table_attach( GTK_TABLE( table1 ),A8000,8,9,0,1,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),0,0 ); | |
366 | |
367 A16000adj=GTK_ADJUSTMENT( gtk_adjustment_new( 0,-eqRange,eqRange,0.5,0,0 ) ); | |
368 A16000=AddVScaler( A16000adj,NULL,-1 ); | |
369 gtk_table_attach( GTK_TABLE( table1 ),A16000,9,10,0,1,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),0,0 ); | |
370 | |
371 gtk_table_attach( GTK_TABLE( table1 ), | |
372 AddLabel( "31.25",NULL ), | |
373 0,1,1,2,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 ); | |
374 | |
375 gtk_table_attach( GTK_TABLE( table1 ), | |
376 AddLabel( "62.50",NULL ), | |
377 1,2,1,2,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 ); | |
378 | |
379 gtk_table_attach( GTK_TABLE( table1 ), | |
380 AddLabel( "125",NULL ), | |
381 2,3,1,2,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 ); | |
382 | |
383 gtk_table_attach( GTK_TABLE( table1 ), | |
384 AddLabel( "250",NULL ), | |
385 3,4,1,2,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 ); | |
386 | |
387 gtk_table_attach( GTK_TABLE( table1 ), | |
388 AddLabel( "500",NULL ), | |
389 4,5,1,2,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 ); | |
390 | |
391 gtk_table_attach( GTK_TABLE( table1 ), | |
392 AddLabel( "1000",NULL ), | |
393 5,6,1,2,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 ); | |
394 | |
395 gtk_table_attach( GTK_TABLE( table1 ), | |
396 AddLabel( "2000",NULL ), | |
397 6,7,1,2,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 ); | |
398 | |
399 gtk_table_attach( GTK_TABLE( table1 ), | |
400 AddLabel( "4000",NULL ), | |
401 7,8,1,2,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 ); | |
402 | |
403 gtk_table_attach( GTK_TABLE( table1 ), | |
404 AddLabel( "8000",NULL ), | |
405 8,9,1,2,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 ); | |
406 | |
407 gtk_table_attach( GTK_TABLE( table1 ), | |
408 AddLabel( "16000",NULL ), | |
409 9,10,1,2,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 ); | |
410 | |
411 gtk_notebook_set_tab_label( GTK_NOTEBOOK( Notebook ),gtk_notebook_get_nth_page( GTK_NOTEBOOK( Notebook ),0 ), | |
412 AddLabel( MSGTR_EQU_Audio,NULL ) ); | |
413 | |
414 table1=gtk_table_new( 4,2,FALSE ); | |
415 gtk_widget_set_name( table1,"table1" ); | |
416 gtk_widget_show( table1 ); | |
417 gtk_container_add( GTK_CONTAINER( Notebook ),table1 ); | |
418 | |
419 gtk_table_attach( GTK_TABLE( table1 ), | |
420 AddLabel( MSGTR_EQU_Contrast,NULL ), | |
421 0,1,0,1,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 ); | |
422 | |
423 gtk_table_attach( GTK_TABLE( table1 ), | |
424 AddLabel( MSGTR_EQU_Brightness,NULL ), | |
425 0,1,1,2,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 ); | |
426 | |
427 gtk_table_attach( GTK_TABLE( table1 ), | |
428 AddLabel( MSGTR_EQU_Hue,NULL ), | |
429 0,1,2,3,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 ); | |
430 | |
431 gtk_table_attach( GTK_TABLE( table1 ), | |
432 AddLabel( MSGTR_EQU_Saturation,NULL ), | |
433 0,1,3,4,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 ); | |
434 | |
435 VContrastadj=GTK_ADJUSTMENT( gtk_adjustment_new( 0,-100,100,1,0,0 ) ); | |
436 VContrast=AddHScaler( VContrastadj,NULL,1 ); | |
437 gtk_table_attach( GTK_TABLE( table1 ),VContrast,1,2,0,1,(GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 ); | |
438 gtk_widget_set_usize( VContrast,-1,45 ); | |
439 | |
440 VBrightnessadj=GTK_ADJUSTMENT( gtk_adjustment_new( 0,-100,100,1,0,0 ) ); | |
441 VBrightness=AddHScaler( VBrightnessadj,NULL,1 ); | |
442 gtk_table_attach( GTK_TABLE( table1 ),VBrightness,1,2,1,2,(GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 ); | |
443 gtk_widget_set_usize( VBrightness,-1,45 ); | |
444 | |
445 VHueadj=GTK_ADJUSTMENT( gtk_adjustment_new( 0,-100,100,1,0,0 ) ); | |
446 VHue=AddHScaler( VHueadj,NULL,1 ); | |
447 gtk_table_attach( GTK_TABLE( table1 ),VHue,1,2,2,3,(GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 ); | |
448 gtk_widget_set_usize( VHue,-1,45 ); | |
449 | |
450 VSaturationadj=GTK_ADJUSTMENT( gtk_adjustment_new( 0,-100,100,1,0,0 ) ); | |
451 VSaturation=AddHScaler( VSaturationadj,NULL,1 ); | |
452 gtk_table_attach( GTK_TABLE( table1 ),VSaturation,1,2,3,4,(GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 ); | |
453 gtk_widget_set_usize( VSaturation,-1,45 ); | |
454 | |
455 gtk_notebook_set_tab_label( GTK_NOTEBOOK( Notebook ),gtk_notebook_get_nth_page( GTK_NOTEBOOK( Notebook ),1 ), | |
456 AddLabel( MSGTR_EQU_Video,NULL ) ); | |
457 | |
458 AddHSeparator( vbox1 ); | |
459 | |
460 hbuttonbox1=AddHButtonBox( vbox1 ); | |
461 gtk_button_box_set_layout( GTK_BUTTON_BOX( hbuttonbox1 ),GTK_BUTTONBOX_END ); | |
462 gtk_button_box_set_spacing( GTK_BUTTON_BOX( hbuttonbox1 ),10 ); | |
463 | |
464 Config=AddButton( MSGTR_Config,hbuttonbox1 ); | |
465 Clear=AddButton( MSGTR_Clear,hbuttonbox1 ); | |
466 Ok=AddButton( MSGTR_Ok,hbuttonbox1 ); | |
467 | |
468 gtk_widget_add_accelerator( Ok,"clicked",accel_group,GDK_Escape,0,GTK_ACCEL_VISIBLE ); | |
469 gtk_widget_add_accelerator( Ok,"clicked",accel_group,GDK_Return,0,GTK_ACCEL_VISIBLE ); | |
470 | |
471 gtk_signal_connect( GTK_OBJECT( Equalizer ),"destroy",GTK_SIGNAL_FUNC( WidgetDestroy ),&Equalizer ); | |
472 gtk_signal_connect( GTK_OBJECT( Equalizer ),"focus_in_event",GTK_SIGNAL_FUNC( eqFocus ),(void *)2 ); | |
473 | |
474 gtk_signal_connect( GTK_OBJECT( ChannelsList ),"select_row",GTK_SIGNAL_FUNC( eqSelectChannelsListRow ),NULL ); | |
475 | |
476 gtk_signal_connect( GTK_OBJECT( A3125 ),"motion_notify_event",GTK_SIGNAL_FUNC( eqHScaleMotion ),(void*)0 ); | |
477 gtk_signal_connect( GTK_OBJECT( A6250 ),"motion_notify_event",GTK_SIGNAL_FUNC( eqHScaleMotion ),(void*)1 ); | |
478 gtk_signal_connect( GTK_OBJECT( A125 ),"motion_notify_event",GTK_SIGNAL_FUNC( eqHScaleMotion ),(void*)2 ); | |
479 gtk_signal_connect( GTK_OBJECT( A250 ),"motion_notify_event",GTK_SIGNAL_FUNC( eqHScaleMotion ),(void*)3 ); | |
480 gtk_signal_connect( GTK_OBJECT( A500 ),"motion_notify_event",GTK_SIGNAL_FUNC( eqHScaleMotion ),(void*)4 ); | |
481 gtk_signal_connect( GTK_OBJECT( A1000 ),"motion_notify_event",GTK_SIGNAL_FUNC( eqHScaleMotion ),(void*)5 ); | |
482 gtk_signal_connect( GTK_OBJECT( A2000 ),"motion_notify_event",GTK_SIGNAL_FUNC( eqHScaleMotion ),(void*)6 ); | |
483 gtk_signal_connect( GTK_OBJECT( A4000 ),"motion_notify_event",GTK_SIGNAL_FUNC( eqHScaleMotion ),(void*)7 ); | |
484 gtk_signal_connect( GTK_OBJECT( A8000 ),"motion_notify_event",GTK_SIGNAL_FUNC( eqHScaleMotion ),(void*)8 ); | |
485 gtk_signal_connect( GTK_OBJECT( A16000 ),"motion_notify_event",GTK_SIGNAL_FUNC( eqHScaleMotion ),(void*)9 ); | |
486 | |
487 gtk_signal_connect( GTK_OBJECT( VContrast ),"motion_notify_event",GTK_SIGNAL_FUNC( eqVScaleMotion ),(void*)1 ); | |
488 gtk_signal_connect( GTK_OBJECT( VBrightness ),"motion_notify_event",GTK_SIGNAL_FUNC( eqVScaleMotion ),(void*)2 ); | |
489 gtk_signal_connect( GTK_OBJECT( VHue ),"motion_notify_event",GTK_SIGNAL_FUNC( eqVScaleMotion ),(void*)3 ); | |
490 gtk_signal_connect( GTK_OBJECT( VSaturation ),"motion_notify_event",GTK_SIGNAL_FUNC( eqVScaleMotion ),(void *)4 ); | |
491 | |
492 gtk_signal_connect( GTK_OBJECT( Ok ),"clicked",GTK_SIGNAL_FUNC( eqButtonReleased ),(void *)0 ); | |
493 gtk_signal_connect( GTK_OBJECT( Clear ),"clicked",GTK_SIGNAL_FUNC( eqButtonReleased ),(void *)1 ); | |
494 gtk_signal_connect( GTK_OBJECT( Config ),"clicked",GTK_SIGNAL_FUNC( eqButtonReleased ),(void *)2 ); | |
495 | |
496 gtk_signal_connect( GTK_OBJECT( Notebook ),"switch_page",GTK_SIGNAL_FUNC( eqNotebook ),NULL ); | |
497 | |
498 gtk_window_add_accel_group( GTK_WINDOW( Equalizer ),accel_group ); | |
499 | |
500 return Equalizer; | |
501 } | |
502 | |
34684 | 503 /* equalizer config dialog box */ |
33572 | 504 |
505 static GtkWidget * CBChannel1; | |
506 static GtkWidget * CEChannel1; | |
507 static GtkWidget * CBChannel2; | |
508 static GtkWidget * CEChannel2; | |
509 static GtkWidget * CBChannel3; | |
510 static GtkWidget * CEChannel3; | |
511 static GtkWidget * CBChannel4; | |
512 static GtkWidget * CEChannel4; | |
513 static GtkWidget * CBChannel5; | |
514 static GtkWidget * CEChannel5; | |
515 static GtkWidget * CBChannel6; | |
516 static GtkWidget * CEChannel6; | |
517 static GtkWidget * ecOk; | |
518 static GtkWidget * ecCancel; | |
519 | |
520 GtkWidget * create_EquConfig( void ); | |
521 | |
522 void ShowEquConfig( void ) | |
523 { | |
524 GList * Items = NULL; | |
525 | |
526 if ( EquConfig ) gtkActive( EquConfig ); | |
527 else EquConfig=create_EquConfig(); | |
528 | |
529 Items=g_list_append( Items,(gpointer)MSGTR_EQU_Front_Right ); | |
530 Items=g_list_append( Items,(gpointer)MSGTR_EQU_Front_Left ); | |
531 Items=g_list_append( Items,(gpointer)MSGTR_EQU_Back_Right ); | |
532 Items=g_list_append( Items,(gpointer)MSGTR_EQU_Back_Left ); | |
533 Items=g_list_append( Items,(gpointer)MSGTR_EQU_Center ); | |
534 Items=g_list_append( Items,(gpointer)MSGTR_EQU_Bass ); | |
535 | |
536 gtk_combo_set_popdown_strings( GTK_COMBO( CBChannel1 ),Items ); | |
537 gtk_combo_set_popdown_strings( GTK_COMBO( CBChannel2 ),Items ); | |
538 gtk_combo_set_popdown_strings( GTK_COMBO( CBChannel3 ),Items ); | |
539 gtk_combo_set_popdown_strings( GTK_COMBO( CBChannel4 ),Items ); | |
540 gtk_combo_set_popdown_strings( GTK_COMBO( CBChannel5 ),Items ); | |
541 gtk_combo_set_popdown_strings( GTK_COMBO( CBChannel6 ),Items ); | |
542 | |
543 g_list_free( Items ); | |
544 | |
545 gtk_entry_set_text( GTK_ENTRY( CEChannel1 ),gtkEquChannel1 ); gtk_entry_set_editable( GTK_ENTRY( CEChannel1 ),FALSE ); | |
546 gtk_entry_set_text( GTK_ENTRY( CEChannel2 ),gtkEquChannel2 ); gtk_entry_set_editable( GTK_ENTRY( CEChannel2 ),FALSE ); | |
547 gtk_entry_set_text( GTK_ENTRY( CEChannel3 ),gtkEquChannel3 ); gtk_entry_set_editable( GTK_ENTRY( CEChannel3 ),FALSE ); | |
548 gtk_entry_set_text( GTK_ENTRY( CEChannel4 ),gtkEquChannel4 ); gtk_entry_set_editable( GTK_ENTRY( CEChannel4 ),FALSE ); | |
549 gtk_entry_set_text( GTK_ENTRY( CEChannel5 ),gtkEquChannel5 ); gtk_entry_set_editable( GTK_ENTRY( CEChannel5 ),FALSE ); | |
550 gtk_entry_set_text( GTK_ENTRY( CEChannel6 ),gtkEquChannel6 ); gtk_entry_set_editable( GTK_ENTRY( CEChannel6 ),FALSE ); | |
551 | |
552 gtk_widget_show( EquConfig ); | |
553 gtkSetLayer( EquConfig ); | |
554 } | |
555 | |
556 void HideEquConfig( void ) | |
557 { | |
558 if ( !EquConfig ) return; | |
559 gtk_widget_hide( EquConfig ); | |
560 gtk_widget_destroy( EquConfig ); | |
561 EquConfig=NULL; | |
562 } | |
563 | |
564 static void ecButtonReleased( GtkButton * button,gpointer user_data ) | |
565 { | |
566 if ( (int)user_data ) | |
567 { // if you pressed Ok | |
33739 | 568 nfree( gtkEquChannel1 ); gtkEquChannel1=gstrdup( gtk_entry_get_text( GTK_ENTRY( CEChannel1 ) ) ); |
569 nfree( gtkEquChannel2 ); gtkEquChannel2=gstrdup( gtk_entry_get_text( GTK_ENTRY( CEChannel2 ) ) ); | |
570 nfree( gtkEquChannel3 ); gtkEquChannel3=gstrdup( gtk_entry_get_text( GTK_ENTRY( CEChannel3 ) ) ); | |
571 nfree( gtkEquChannel4 ); gtkEquChannel4=gstrdup( gtk_entry_get_text( GTK_ENTRY( CEChannel4 ) ) ); | |
572 nfree( gtkEquChannel5 ); gtkEquChannel5=gstrdup( gtk_entry_get_text( GTK_ENTRY( CEChannel5 ) ) ); | |
573 nfree( gtkEquChannel6 ); gtkEquChannel6=gstrdup( gtk_entry_get_text( GTK_ENTRY( CEChannel6 ) ) ); | |
33572 | 574 eqSetChannelNames(); |
575 } | |
576 HideEquConfig(); | |
577 } | |
578 | |
579 GtkWidget * create_EquConfig( void ) | |
580 { | |
581 GtkWidget * vbox1; | |
582 GtkWidget * table1; | |
583 GtkWidget * hbuttonbox1; | |
584 GtkAccelGroup * accel_group; | |
585 | |
586 accel_group=gtk_accel_group_new(); | |
587 | |
588 EquConfig=gtk_window_new( GTK_WINDOW_TOPLEVEL ); | |
589 gtk_widget_set_name( EquConfig,"EquConfig" ); | |
590 gtk_object_set_data( GTK_OBJECT( EquConfig ),"EquConfig",EquConfig ); | |
591 gtk_widget_set_usize( EquConfig,350,260 ); | |
592 GTK_WIDGET_SET_FLAGS( EquConfig,GTK_CAN_DEFAULT ); | |
593 gtk_window_set_title( GTK_WINDOW( EquConfig ),MSGTR_ConfigureEqualizer ); | |
594 gtk_window_set_position( GTK_WINDOW( EquConfig ),GTK_WIN_POS_CENTER ); | |
595 // gtk_window_set_modal( GTK_WINDOW( EquConfig ),TRUE ); | |
596 gtk_window_set_policy( GTK_WINDOW( EquConfig ),FALSE,FALSE,FALSE ); | |
597 gtk_window_set_wmclass( GTK_WINDOW( EquConfig ),"EquConfig","MPlayer" ); | |
598 | |
599 gtk_widget_realize( EquConfig ); | |
600 gtkAddIcon( EquConfig ); | |
601 | |
602 vbox1=AddVBox( AddDialogFrame( EquConfig ),0 ); | |
603 | |
604 table1=gtk_table_new( 6,2,FALSE ); | |
605 gtk_widget_set_name( table1,"table1" ); | |
606 gtk_widget_show( table1 ); | |
607 gtk_box_pack_start( GTK_BOX( vbox1 ),table1,TRUE,TRUE,0 ); | |
608 gtk_table_set_row_spacings( GTK_TABLE( table1 ),4 ); | |
609 gtk_table_set_col_spacings( GTK_TABLE( table1 ),4 ); | |
610 | |
611 gtk_table_attach( GTK_TABLE( table1 ), | |
612 AddLabel( MSGTR_EQU_Channel1,NULL ), | |
613 0,1,0,1,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 ); | |
614 | |
615 gtk_table_attach( GTK_TABLE( table1 ), | |
616 AddLabel( MSGTR_EQU_Channel2,NULL ), | |
617 0,1,1,2,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 ); | |
618 | |
619 gtk_table_attach( GTK_TABLE( table1 ), | |
620 AddLabel( MSGTR_EQU_Channel3,NULL ), | |
621 0,1,2,3,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 ); | |
622 | |
623 gtk_table_attach( GTK_TABLE( table1 ), | |
624 AddLabel( MSGTR_EQU_Channel4,NULL ), | |
625 0,1,3,4,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 ); | |
626 | |
627 gtk_table_attach( GTK_TABLE( table1 ), | |
628 AddLabel( MSGTR_EQU_Channel5,NULL ), | |
629 0,1,4,5,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 ); | |
630 | |
631 gtk_table_attach( GTK_TABLE( table1 ), | |
632 AddLabel( MSGTR_EQU_Channel6,NULL ), | |
633 0,1,5,6,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 ); | |
634 | |
635 CBChannel1=AddComboBox( NULL ); | |
636 gtk_table_attach( GTK_TABLE( table1 ),CBChannel1,1,2,0,1,(GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 ); | |
637 | |
638 CEChannel1=GTK_COMBO( CBChannel1 )->entry; | |
639 gtk_widget_set_name( CEChannel1,"CEChannel1" ); | |
640 gtk_widget_show( CEChannel1 ); | |
641 | |
642 CBChannel2=AddComboBox( NULL ); | |
643 gtk_table_attach( GTK_TABLE( table1 ),CBChannel2,1,2,1,2,(GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 ); | |
644 | |
645 CEChannel2=GTK_COMBO( CBChannel2 )->entry; | |
646 gtk_widget_set_name( CEChannel2,"CEChannel2" ); | |
647 gtk_widget_show( CEChannel2 ); | |
648 | |
649 CBChannel3=AddComboBox( NULL ); | |
650 gtk_table_attach( GTK_TABLE( table1 ),CBChannel3,1,2,2,3,(GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 ); | |
651 | |
652 CEChannel3=GTK_COMBO( CBChannel3 )->entry; | |
653 gtk_widget_set_name( CEChannel3,"CEChannel3" ); | |
654 gtk_widget_show( CEChannel3 ); | |
655 | |
656 CBChannel4=AddComboBox( NULL ); | |
657 gtk_table_attach( GTK_TABLE( table1 ),CBChannel4,1,2,3,4,(GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 ); | |
658 | |
659 CEChannel4=GTK_COMBO( CBChannel4 )->entry; | |
660 gtk_widget_set_name( CEChannel4,"CEChannel4" ); | |
661 gtk_widget_show( CEChannel4 ); | |
662 | |
663 CBChannel5=AddComboBox( NULL ); | |
664 gtk_table_attach( GTK_TABLE( table1 ),CBChannel5,1,2,4,5,(GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 ); | |
665 | |
666 CEChannel5=GTK_COMBO( CBChannel5 )->entry; | |
667 gtk_widget_set_name( CEChannel5,"CEChannel5" ); | |
668 gtk_widget_show( CEChannel5 ); | |
669 | |
670 CBChannel6=AddComboBox( NULL ); | |
671 gtk_table_attach( GTK_TABLE( table1 ),CBChannel6,1,2,5,6,(GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 ); | |
672 | |
673 CEChannel6=GTK_COMBO( CBChannel6 )->entry; | |
674 gtk_widget_set_name( CEChannel6,"CEChannel6" ); | |
675 gtk_widget_show( CEChannel6 ); | |
676 | |
677 AddHSeparator( vbox1 ); | |
678 | |
679 hbuttonbox1=AddHButtonBox( vbox1 ); | |
680 gtk_button_box_set_layout( GTK_BUTTON_BOX( hbuttonbox1 ),GTK_BUTTONBOX_END ); | |
681 gtk_button_box_set_spacing( GTK_BUTTON_BOX( hbuttonbox1 ),10 ); | |
682 | |
683 ecOk=AddButton( MSGTR_Ok,hbuttonbox1 ); | |
684 ecCancel=AddButton( MSGTR_Cancel,hbuttonbox1 ); | |
685 | |
686 gtk_widget_add_accelerator( ecOk,"clicked",accel_group,GDK_Return,0,GTK_ACCEL_VISIBLE ); | |
687 gtk_widget_add_accelerator( ecCancel,"clicked",accel_group,GDK_Escape,0,GTK_ACCEL_VISIBLE ); | |
688 | |
689 gtk_signal_connect( GTK_OBJECT( EquConfig ),"destroy",GTK_SIGNAL_FUNC( WidgetDestroy ),&EquConfig ); | |
690 | |
691 gtk_signal_connect( GTK_OBJECT( ecOk ),"clicked",GTK_SIGNAL_FUNC( ecButtonReleased ),(void *)1 ); | |
692 gtk_signal_connect( GTK_OBJECT( ecCancel ),"clicked",GTK_SIGNAL_FUNC( ecButtonReleased ),(void *)0 ); | |
693 | |
694 gtk_window_add_accel_group( GTK_WINDOW( EquConfig ),accel_group ); | |
695 | |
696 return EquConfig; | |
697 } |