[MPlayer-cvslog] r36089 - in trunk/gui/dialog: skinbrowser.c skinbrowser.h

ib subversion at mplayerhq.hu
Fri Mar 29 02:41:06 CET 2013


Author: ib
Date: Fri Mar 29 02:41:06 2013
New Revision: 36089

Log:
Make create_SkinBrowser() static.

It only has file scope.

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

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

Modified: trunk/gui/dialog/skinbrowser.c
==============================================================================
--- trunk/gui/dialog/skinbrowser.c	Fri Mar 29 02:36:39 2013	(r36088)
+++ trunk/gui/dialog/skinbrowser.c	Fri Mar 29 02:41:06 2013	(r36089)
@@ -44,12 +44,6 @@ static char * prev=NULL;
 
 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 @@ static void HideSkinBrowser( void )
  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 @@ static void on_SkinList_select_row( GtkC
   }
 }
 
-GtkWidget * create_SkinBrowser( void )
+static GtkWidget * create_SkinBrowser( void )
 {
  GtkWidget     * vbox5;
  GtkWidget     * scrolledwindow1;
@@ -205,3 +166,42 @@ GtkWidget * create_SkinBrowser( void )
 
  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;
+}

Modified: trunk/gui/dialog/skinbrowser.h
==============================================================================
--- trunk/gui/dialog/skinbrowser.h	Fri Mar 29 02:36:39 2013	(r36088)
+++ trunk/gui/dialog/skinbrowser.h	Fri Mar 29 02:41:06 2013	(r36089)
@@ -25,6 +25,5 @@ extern char      * sbSelectedSkin;
 extern GtkWidget * SkinBrowser;
 
 void ShowSkinBrowser( void );
-GtkWidget * create_SkinBrowser( void );
 
 #endif /* MPLAYER_GUI_SKINBROWSER_H */


More information about the MPlayer-cvslog mailing list