# HG changeset patch # User ib # Date 1364520614 0 # Node ID d60c62d05a403b268c2f9680856b99eb517cc9ef # Parent bbfc087697e1c4cb75ccdd427663226829416f5b Make create_AudioConfig() static. It only has file scope. In order to do so, relocate some other static functions. diff -r bbfc087697e1 -r d60c62d05a40 gui/dialog/preferences.c --- 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; diff -r bbfc087697e1 -r d60c62d05a40 gui/dialog/preferences.h --- a/gui/dialog/preferences.h Fri Mar 29 01:27:37 2013 +0000 +++ b/gui/dialog/preferences.h Fri Mar 29 01:30:14 2013 +0000 @@ -25,7 +25,6 @@ extern GtkWidget * prEFontName; GtkWidget * create_Preferences( void ); -GtkWidget * create_AudioConfig( void ); void ShowPreferences( void );