[MPlayer-cvslog] r34454 - trunk/gui/ui/gtk/fileselect.c
ib
subversion at mplayerhq.hu
Fri Dec 23 14:41:25 CET 2011
Author: ib
Date: Fri Dec 23 14:41:25 2011
New Revision: 34454
Log:
Add /mnt only to the file selector path list if it exists.
Additionally, check for /media and add it if it exists.
Modified:
trunk/gui/ui/gtk/fileselect.c
Modified: trunk/gui/ui/gtk/fileselect.c
==============================================================================
--- trunk/gui/ui/gtk/fileselect.c Thu Dec 22 18:39:38 2011 (r34453)
+++ trunk/gui/ui/gtk/fileselect.c Fri Dec 23 14:41:25 2011 (r34454)
@@ -252,6 +252,7 @@ void ShowFileSelect( int type,int modal
{
int i, k, fsMedium;
char * tmp = NULL, * dir = NULL;
+ struct stat f;
if ( fsFileSelect ) gtkActive( fsFileSelect );
else fsFileSelect=create_FileSelect();
@@ -321,7 +322,6 @@ void ShowFileSelect( int type,int modal
if ( tmp && tmp[0] )
{
- struct stat f;
dir = strdup( tmp );
do
@@ -355,7 +355,8 @@ void ShowFileSelect( int type,int modal
free( dir );
if ( getenv( "HOME" ) ) fsTopList_items=g_list_append( fsTopList_items,getenv( "HOME" ) );
fsTopList_items=g_list_append( fsTopList_items,"/home" );
- fsTopList_items=g_list_append( fsTopList_items,"/mnt" );
+ if (stat( "/mnt",&f ) == 0) fsTopList_items=g_list_append( fsTopList_items,"/mnt" );
+ if (stat( "/media",&f ) == 0) fsTopList_items=g_list_append( fsTopList_items,"/media" );
fsTopList_items=g_list_append( fsTopList_items,"/" );
gtk_combo_set_popdown_strings( GTK_COMBO( fsCombo4 ),fsTopList_items );
More information about the MPlayer-cvslog
mailing list