[MPlayer-cvslog] r36087 - in trunk/gui/dialog: preferences.c preferences.h

ib subversion at mplayerhq.hu
Fri Mar 29 02:30:14 CET 2013


Author: ib
Date: Fri Mar 29 02:30:14 2013
New Revision: 36087

Log:
Make create_AudioConfig() static.

It only has file scope.

In order to do so, relocate some other static functions.

Modified:
   trunk/gui/dialog/preferences.c
   trunk/gui/dialog/preferences.h

Modified: trunk/gui/dialog/preferences.c
==============================================================================
--- trunk/gui/dialog/preferences.c	Fri Mar 29 02:27:37 2013	(r36086)
+++ trunk/gui/dialog/preferences.c	Fri Mar 29 02:30:14 2013	(r36087)
@@ -1507,39 +1507,6 @@ static GtkWidget *CBAudioMixerChannel;
 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 @@ static void audioButton(GtkButton *butto
   }
 }
 
-GtkWidget *create_AudioConfig( void ) {
+static GtkWidget *create_AudioConfig( void ) {
   GList *items = NULL;
   GtkWidget *vbox;
   GtkWidget *table;
@@ -1708,6 +1675,39 @@ GtkWidget *create_AudioConfig( void ) {
   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;

Modified: trunk/gui/dialog/preferences.h
==============================================================================
--- trunk/gui/dialog/preferences.h	Fri Mar 29 02:27:37 2013	(r36086)
+++ trunk/gui/dialog/preferences.h	Fri Mar 29 02:30:14 2013	(r36087)
@@ -25,7 +25,6 @@ extern GtkWidget * Preferences;
 extern GtkWidget * prEFontName;
 
 GtkWidget * create_Preferences( void );
-GtkWidget * create_AudioConfig( void );
 
 void ShowPreferences( void );
 


More information about the MPlayer-cvslog mailing list