changeset 35995:454b0a86d1e8

Make create_SkinBrowser() static. It only has file scope. In order to do so, relocate some other static functions.
author ib
date Fri, 29 Mar 2013 01:41:06 +0000
parents 029706e763d1
children 6c891a0e3fea
files gui/dialog/skinbrowser.c gui/dialog/skinbrowser.h
diffstat 2 files changed, 40 insertions(+), 41 deletions(-) [+]
line wrap: on
line diff
--- a/gui/dialog/skinbrowser.c	Fri Mar 29 01:36:39 2013 +0000
+++ b/gui/dialog/skinbrowser.c	Fri Mar 29 01:41:06 2013 +0000
@@ -44,12 +44,6 @@
 
 GtkWidget * SkinBrowser = NULL;
 
-void ShowSkinBrowser( void )
-{
- if ( SkinBrowser ) gtkActive( SkinBrowser );
-   else SkinBrowser=create_SkinBrowser();
-}
-
 static void HideSkinBrowser( void )
 {
  if ( !SkinBrowser ) return;
@@ -58,39 +52,6 @@
  SkinBrowser=NULL;
 }
 
-int gtkFillSkinList( gchar * mdir )
-{
- gchar         * str[2];
- gchar         * tmp;
- int             i;
- glob_t          gg;
- struct stat     fs;
-
- gtkOldSkin=strdup( skinName );
- prev=gtkOldSkin;
-
- str[0]="default";
- str[1]="";
- if ( gtkFindCList( SkinList,str[0] ) == -1 ) gtk_clist_append( GTK_CLIST( SkinList ),str );
-
- glob( mdir,GLOB_NOSORT,NULL,&gg );
- for( i=0;i<(int)gg.gl_pathc;i++ )
-  {
-   if ( !strcmp( gg.gl_pathv[i],"." ) || !strcmp( gg.gl_pathv[i],".." ) ) continue;
-   if ( ( stat( gg.gl_pathv[i],&fs ) == 0 ) && S_ISDIR( fs.st_mode ) )
-    {
-     tmp=strrchr( gg.gl_pathv[i],'/' );
-     if (tmp) tmp++;
-     else tmp = gg.gl_pathv[i];
-     if ( !strcmp( tmp,"default" ) ) continue;
-     str[0]=tmp;
-     if ( gtkFindCList( SkinList,str[0] ) == -1 ) gtk_clist_append( GTK_CLIST( SkinList ),str );
-    }
-  }
- globfree( &gg );
- return True;
-}
-
 static void prButton( GtkButton * button,gpointer user_data )
 {
  if ( sbSelectedSkin )
@@ -128,7 +89,7 @@
   }
 }
 
-GtkWidget * create_SkinBrowser( void )
+static GtkWidget * create_SkinBrowser( void )
 {
  GtkWidget     * vbox5;
  GtkWidget     * scrolledwindow1;
@@ -205,3 +166,42 @@
 
  return SkinBrowser;
 }
+
+void ShowSkinBrowser( void )
+{
+ if ( SkinBrowser ) gtkActive( SkinBrowser );
+   else SkinBrowser=create_SkinBrowser();
+}
+
+int gtkFillSkinList( gchar * mdir )
+{
+ gchar         * str[2];
+ gchar         * tmp;
+ int             i;
+ glob_t          gg;
+ struct stat     fs;
+
+ gtkOldSkin=strdup( skinName );
+ prev=gtkOldSkin;
+
+ str[0]="default";
+ str[1]="";
+ if ( gtkFindCList( SkinList,str[0] ) == -1 ) gtk_clist_append( GTK_CLIST( SkinList ),str );
+
+ glob( mdir,GLOB_NOSORT,NULL,&gg );
+ for( i=0;i<(int)gg.gl_pathc;i++ )
+  {
+   if ( !strcmp( gg.gl_pathv[i],"." ) || !strcmp( gg.gl_pathv[i],".." ) ) continue;
+   if ( ( stat( gg.gl_pathv[i],&fs ) == 0 ) && S_ISDIR( fs.st_mode ) )
+    {
+     tmp=strrchr( gg.gl_pathv[i],'/' );
+     if (tmp) tmp++;
+     else tmp = gg.gl_pathv[i];
+     if ( !strcmp( tmp,"default" ) ) continue;
+     str[0]=tmp;
+     if ( gtkFindCList( SkinList,str[0] ) == -1 ) gtk_clist_append( GTK_CLIST( SkinList ),str );
+    }
+  }
+ globfree( &gg );
+ return True;
+}
--- a/gui/dialog/skinbrowser.h	Fri Mar 29 01:36:39 2013 +0000
+++ b/gui/dialog/skinbrowser.h	Fri Mar 29 01:41:06 2013 +0000
@@ -25,6 +25,5 @@
 extern GtkWidget * SkinBrowser;
 
 void ShowSkinBrowser( void );
-GtkWidget * create_SkinBrowser( void );
 
 #endif /* MPLAYER_GUI_SKINBROWSER_H */