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