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