Mercurial > mplayer.hg
comparison gui/dialog/equalizer.c @ 35990:249207676edf
Make create_Equalizer() static.
It only has file scope.
In order to do so, relocate some other static functions.
author | ib |
---|---|
date | Fri, 29 Mar 2013 01:17:42 +0000 |
parents | 8ad4d2fb46e8 |
children | 6c891a0e3fea |
comparison
equal
deleted
inserted
replaced
35989:188b782b013f | 35990:249207676edf |
---|---|
122 { | 122 { |
123 str[0]=gtkEquChannel5; gtk_clist_append( GTK_CLIST( ChannelsList ) ,str); | 123 str[0]=gtkEquChannel5; gtk_clist_append( GTK_CLIST( ChannelsList ) ,str); |
124 str[0]=gtkEquChannel6; gtk_clist_append( GTK_CLIST( ChannelsList ) ,str); | 124 str[0]=gtkEquChannel6; gtk_clist_append( GTK_CLIST( ChannelsList ) ,str); |
125 } | 125 } |
126 gtk_clist_select_row( GTK_CLIST( ChannelsList ),0,0 ); | 126 gtk_clist_select_row( GTK_CLIST( ChannelsList ),0,0 ); |
127 } | |
128 | |
129 void ShowEqualizer( void ) | |
130 { | |
131 if ( Equalizer ) gtkActive( Equalizer ); | |
132 else Equalizer=create_Equalizer(); | |
133 | |
134 if ( !gtkEquChannel1 ) gtkEquChannel1=strdup( MSGTR_EQU_Front_Right ); | |
135 if ( !gtkEquChannel2 ) gtkEquChannel2=strdup( MSGTR_EQU_Front_Left ); | |
136 if ( !gtkEquChannel3 ) gtkEquChannel3=strdup( MSGTR_EQU_Back_Right ); | |
137 if ( !gtkEquChannel4 ) gtkEquChannel4=strdup( MSGTR_EQU_Back_Left ); | |
138 if ( !gtkEquChannel5 ) gtkEquChannel5=strdup( MSGTR_EQU_Center ); | |
139 if ( !gtkEquChannel6 ) gtkEquChannel6=strdup( MSGTR_EQU_Bass ); | |
140 | |
141 eqSetChannelNames(); | |
142 | |
143 if ( !guiInfo.Playing || !guiInfo.sh_video ) | |
144 { | |
145 gtk_widget_set_sensitive( VContrast,FALSE ); | |
146 gtk_widget_set_sensitive( VBrightness,FALSE ); | |
147 gtk_widget_set_sensitive( VHue,FALSE ); | |
148 gtk_widget_set_sensitive( VSaturation,FALSE ); | |
149 } | |
150 Channel=-1; | |
151 eqSetBands( 0 ); | |
152 if ( !guiInfo.Playing || !gtkEnableAudioEqualizer ) | |
153 { | |
154 gtk_widget_set_sensitive( ChannelsList,FALSE ); | |
155 gtk_widget_set_sensitive( A3125,FALSE ); | |
156 gtk_widget_set_sensitive( A125,FALSE ); | |
157 gtk_widget_set_sensitive( A6250,FALSE ); | |
158 gtk_widget_set_sensitive( A250,FALSE ); | |
159 gtk_widget_set_sensitive( A500,FALSE ); | |
160 gtk_widget_set_sensitive( A1000,FALSE ); | |
161 gtk_widget_set_sensitive( A2000,FALSE ); | |
162 gtk_widget_set_sensitive( A4000,FALSE ); | |
163 gtk_widget_set_sensitive( A8000,FALSE ); | |
164 gtk_widget_set_sensitive( A16000,FALSE ); | |
165 } | |
166 | |
167 if ( gtk_notebook_get_current_page( GTK_NOTEBOOK( Notebook ) ) == 0 ) gtk_widget_show( Config ); | |
168 gtk_widget_show( Equalizer ); | |
169 } | 127 } |
170 | 128 |
171 static void HideEqualizer( void ) | 129 static void HideEqualizer( void ) |
172 { | 130 { |
173 if ( !Equalizer ) return; | 131 if ( !Equalizer ) return; |
272 { | 230 { |
273 if ( page_num ) gtk_widget_hide( Config ); | 231 if ( page_num ) gtk_widget_hide( Config ); |
274 else gtk_widget_show( Config ); | 232 else gtk_widget_show( Config ); |
275 } | 233 } |
276 | 234 |
277 GtkWidget * create_Equalizer( void ) | 235 static GtkWidget * create_Equalizer( void ) |
278 { | 236 { |
279 GtkWidget * vbox1; | 237 GtkWidget * vbox1; |
280 GtkWidget * hbox1; | 238 GtkWidget * hbox1; |
281 GtkWidget * scrolledwindow1; | 239 GtkWidget * scrolledwindow1; |
282 GtkWidget * table1; | 240 GtkWidget * table1; |
496 gtk_signal_connect( GTK_OBJECT( Notebook ),"switch_page",GTK_SIGNAL_FUNC( eqNotebook ),NULL ); | 454 gtk_signal_connect( GTK_OBJECT( Notebook ),"switch_page",GTK_SIGNAL_FUNC( eqNotebook ),NULL ); |
497 | 455 |
498 gtk_window_add_accel_group( GTK_WINDOW( Equalizer ),accel_group ); | 456 gtk_window_add_accel_group( GTK_WINDOW( Equalizer ),accel_group ); |
499 | 457 |
500 return Equalizer; | 458 return Equalizer; |
459 } | |
460 | |
461 void ShowEqualizer( void ) | |
462 { | |
463 if ( Equalizer ) gtkActive( Equalizer ); | |
464 else Equalizer=create_Equalizer(); | |
465 | |
466 if ( !gtkEquChannel1 ) gtkEquChannel1=strdup( MSGTR_EQU_Front_Right ); | |
467 if ( !gtkEquChannel2 ) gtkEquChannel2=strdup( MSGTR_EQU_Front_Left ); | |
468 if ( !gtkEquChannel3 ) gtkEquChannel3=strdup( MSGTR_EQU_Back_Right ); | |
469 if ( !gtkEquChannel4 ) gtkEquChannel4=strdup( MSGTR_EQU_Back_Left ); | |
470 if ( !gtkEquChannel5 ) gtkEquChannel5=strdup( MSGTR_EQU_Center ); | |
471 if ( !gtkEquChannel6 ) gtkEquChannel6=strdup( MSGTR_EQU_Bass ); | |
472 | |
473 eqSetChannelNames(); | |
474 | |
475 if ( !guiInfo.Playing || !guiInfo.sh_video ) | |
476 { | |
477 gtk_widget_set_sensitive( VContrast,FALSE ); | |
478 gtk_widget_set_sensitive( VBrightness,FALSE ); | |
479 gtk_widget_set_sensitive( VHue,FALSE ); | |
480 gtk_widget_set_sensitive( VSaturation,FALSE ); | |
481 } | |
482 Channel=-1; | |
483 eqSetBands( 0 ); | |
484 if ( !guiInfo.Playing || !gtkEnableAudioEqualizer ) | |
485 { | |
486 gtk_widget_set_sensitive( ChannelsList,FALSE ); | |
487 gtk_widget_set_sensitive( A3125,FALSE ); | |
488 gtk_widget_set_sensitive( A125,FALSE ); | |
489 gtk_widget_set_sensitive( A6250,FALSE ); | |
490 gtk_widget_set_sensitive( A250,FALSE ); | |
491 gtk_widget_set_sensitive( A500,FALSE ); | |
492 gtk_widget_set_sensitive( A1000,FALSE ); | |
493 gtk_widget_set_sensitive( A2000,FALSE ); | |
494 gtk_widget_set_sensitive( A4000,FALSE ); | |
495 gtk_widget_set_sensitive( A8000,FALSE ); | |
496 gtk_widget_set_sensitive( A16000,FALSE ); | |
497 } | |
498 | |
499 if ( gtk_notebook_get_current_page( GTK_NOTEBOOK( Notebook ) ) == 0 ) gtk_widget_show( Config ); | |
500 gtk_widget_show( Equalizer ); | |
501 } | 501 } |
502 | 502 |
503 /* equalizer config dialog box */ | 503 /* equalizer config dialog box */ |
504 | 504 |
505 static GtkWidget * CBChannel1; | 505 static GtkWidget * CBChannel1; |