Mercurial > mplayer.hg
diff gui/dialog/preferences.c @ 35993:d60c62d05a40
Make create_AudioConfig() static.
It only has file scope.
In order to do so, relocate some other static functions.
author | ib |
---|---|
date | Fri, 29 Mar 2013 01:30:14 +0000 |
parents | bbfc087697e1 |
children | 029706e763d1 |
line wrap: on
line diff
--- a/gui/dialog/preferences.c Fri Mar 29 01:27:37 2013 +0000 +++ b/gui/dialog/preferences.c Fri Mar 29 01:30:14 2013 +0000 @@ -1507,39 +1507,6 @@ static GtkWidget *BAudioOk; static GtkWidget *BAudioCancel; -void ShowAudioConfig( void ) { - if (AudioConfig) gtkActive(AudioConfig); - else AudioConfig = create_AudioConfig(); - -#ifdef CONFIG_OSS_AUDIO - if (strncmp(ao_driver[0], "oss", 3) == 0) { - setGtkEntryText(CEAudioDevice, gtkAOOSSDevice); - setGtkEntryText(CEAudioMixer, gtkAOOSSMixer); - setGtkEntryText(CEAudioMixerChannel, gtkAOOSSMixerChannel); - } -#endif -#ifdef CONFIG_ALSA - if (strncmp(ao_driver[0], "alsa", 4) == 0) { - setGtkEntryText(CEAudioDevice, gtkAOALSADevice); - setGtkEntryText(CEAudioMixer, gtkAOALSAMixer); - setGtkEntryText(CEAudioMixerChannel, gtkAOALSAMixerChannel); - } -#endif -#ifdef CONFIG_SDL - if (strncmp(ao_driver[0], "sdl", 3) == 0) { - setGtkEntryText(CEAudioDevice, gtkAOSDLDriver); - } -#endif -#ifdef CONFIG_ESD - if (strncmp(ao_driver[0], "esd", 3) == 0) { - setGtkEntryText(CEAudioDevice, gtkAOESDDevice); - } -#endif - - gtk_widget_show(AudioConfig); - gtkSetLayer(AudioConfig); -} - void HideAudioConfig( void ) { if (!AudioConfig) return; gtk_widget_hide(AudioConfig); @@ -1588,7 +1555,7 @@ } } -GtkWidget *create_AudioConfig( void ) { +static GtkWidget *create_AudioConfig( void ) { GList *items = NULL; GtkWidget *vbox; GtkWidget *table; @@ -1708,6 +1675,39 @@ return AudioConfig; } +void ShowAudioConfig( void ) { + if (AudioConfig) gtkActive(AudioConfig); + else AudioConfig = create_AudioConfig(); + +#ifdef CONFIG_OSS_AUDIO + if (strncmp(ao_driver[0], "oss", 3) == 0) { + setGtkEntryText(CEAudioDevice, gtkAOOSSDevice); + setGtkEntryText(CEAudioMixer, gtkAOOSSMixer); + setGtkEntryText(CEAudioMixerChannel, gtkAOOSSMixerChannel); + } +#endif +#ifdef CONFIG_ALSA + if (strncmp(ao_driver[0], "alsa", 4) == 0) { + setGtkEntryText(CEAudioDevice, gtkAOALSADevice); + setGtkEntryText(CEAudioMixer, gtkAOALSAMixer); + setGtkEntryText(CEAudioMixerChannel, gtkAOALSAMixerChannel); + } +#endif +#ifdef CONFIG_SDL + if (strncmp(ao_driver[0], "sdl", 3) == 0) { + setGtkEntryText(CEAudioDevice, gtkAOSDLDriver); + } +#endif +#ifdef CONFIG_ESD + if (strncmp(ao_driver[0], "esd", 3) == 0) { + setGtkEntryText(CEAudioDevice, gtkAOESDDevice); + } +#endif + + gtk_widget_show(AudioConfig); + gtkSetLayer(AudioConfig); +} + /* dxr3 config box */ static GtkWidget * DXR3Config;