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