changeset 6794:77980ab4e296

- add preferences support (first try) - fix some playlist bug - fix some equ bug - fix some redraw bug - fix dvd playing - fix file open dialog box - etc.
author pontscho
date Thu, 25 Jul 2002 20:26:38 +0000
parents 48d432a8d531
children 776b686069af
files Gui/Makefile Gui/cfg.c Gui/interface.c Gui/interface.h Gui/mplayer/gtk/about.c Gui/mplayer/gtk/eq.c Gui/mplayer/gtk/eq.h Gui/mplayer/gtk/fs.c Gui/mplayer/gtk/fs.h Gui/mplayer/gtk/mb.c Gui/mplayer/gtk/mb.h Gui/mplayer/gtk/menu.c Gui/mplayer/gtk/opts.c Gui/mplayer/gtk/opts.h Gui/mplayer/gtk/sb.c Gui/mplayer/mplayer.c Gui/mplayer/mw.h Gui/mplayer/play.c Gui/mplayer/play.h Gui/mplayer/sw.h Gui/mplayer/widgets.c Gui/wm/ws.c Gui/wm/ws.h
diffstat 23 files changed, 2038 insertions(+), 922 deletions(-) [+]
line wrap: on
line diff
--- a/Gui/Makefile	Thu Jul 25 20:23:18 2002 +0000
+++ b/Gui/Makefile	Thu Jul 25 20:26:38 2002 +0000
@@ -14,7 +14,7 @@
 
 CFLAGS = $(OPTIMIZE) $(INCDIR) $(DEBUG) 
 
-SRCS = wm/ws.c wm/wsconv.c app.c events.c interface.c \
+SRCS = wm/ws.c wm/wsconv.c app.c events.c interface.c cfg.c \
 	bitmap/bitmap.c bitmap/tga/tga.c bitmap/bmp/bmp.c bitmap/png/png.c \
 	skin/skin.c skin/font.c skin/cut.c \
 	mplayer/mplayer.c mplayer/widgets.c mplayer/play.c \
--- a/Gui/cfg.c	Thu Jul 25 20:23:18 2002 +0000
+++ b/Gui/cfg.c	Thu Jul 25 20:26:38 2002 +0000
@@ -46,7 +46,7 @@
 int    gtkSubDumpMPSub = 0;
 int    gtkSubDumpSrt = 0;
 float  gtkSubDelay = 0.0f;
-float  gtkSubFPS = -1.0f;
+float  gtkSubFPS = 0.0f;
 int    gtkSubPos = 100; //
 float  gtkSubFFactor = 0.75;
 
@@ -72,7 +72,7 @@
  { "v_flip",&gtkVFlip,CONF_TYPE_FLAG,0,0,1,NULL },
  { "v_ni",&gtkVNIAVI,CONF_TYPE_FLAG,0,0,1,NULL },
  { "v_idx",&gtkVIndex,CONF_TYPE_FLAG,0,0,1,NULL },
- { "v_vfm",&gtkVVFM,CONF_TYPE_INT,CONF_RANGE,0,10,NULL },
+ { "v_vfm",&gtkVVFM,CONF_TYPE_INT,CONF_RANGE,-1,10,NULL },
  { "vf_pp",&gtkVPP,CONF_TYPE_FLAG,0,0,1,NULL },
  { "vf_autoq",&gtkVAutoq,CONF_TYPE_INT,CONF_RANGE,0,100,NULL },
 
@@ -169,7 +169,12 @@
        case CONF_TYPE_INT:
        case CONF_TYPE_FLAG:   fprintf( f,"%s = %d\n",gui_opts[i].name,*( (int *)gui_opts[i].p ) );   				      break;
        case CONF_TYPE_FLOAT:  fprintf( f,"%s = %f\n",gui_opts[i].name,*( (float *)gui_opts[i].p ) ); 				      break;
-       case CONF_TYPE_STRING: if ( *( (char **)gui_opts[i].p ) ) fprintf( f,"%s = \"%s\"\n",gui_opts[i].name,*( (char **)gui_opts[i].p ) ); break;
+       case CONF_TYPE_STRING: 
+            {
+	     char * tmp = *( (char **)gui_opts[i].p );
+	     if ( tmp && tmp[0] ) fprintf( f,"%s = \"%s\"\n",gui_opts[i].name,tmp );
+	     break;
+	    }
       }
     }
    fclose( f );
--- a/Gui/interface.c	Thu Jul 25 20:23:18 2002 +0000
+++ b/Gui/interface.c	Thu Jul 25 20:26:38 2002 +0000
@@ -14,8 +14,12 @@
 #include "mplayer/widgets.h"
 #include "mplayer/mplayer.h"
 #include "app.h"
+#include "cfg.h"
+#include "../help_mp.h"
+#include "../subreader.h"
 #include "../libvo/x11_common.h"
 #include "../libvo/video_out.h"
+#include "../libvo/font_load.h"
 #include "../input/input.h"
 #include "../libao2/audio_out.h"
 #include "../mixer.h"
@@ -47,17 +51,46 @@
  return tmp;
 }
 
+int gstrcmp( char * a,char * b )
+{
+ if ( !a && !b ) return 0;
+ if ( !a || !b ) return -1;
+ return strcmp( a,b );
+}
+
+char * gstrdup( char * str )
+{
+ if ( !str ) return NULL;
+ return strdup( str );
+}
+
+void gfree( void ** p )
+{
+ if ( *p == NULL ) return;
+ free( *p ); *p=NULL;
+}
+
+void gset( char ** str,char * what )
+{
+ if ( *str ) { if ( !strstr( *str,what ) )  gstrcat( str,"," ); gstrcat( str,what ); }
+   else gstrcat( str,what );
+}
+
 void guiInit( void )
 {
  memset( &guiIntfStruct,0,sizeof( guiIntfStruct ) );
  memset( &gtkEquChannels,0,sizeof( gtkEquChannels ) );
+ gtkAOOSSMixer=strdup( PATH_DEV_MIXER );
+ gtkAOOSSDevice=strdup( PATH_DEV_DSP );
+ cfg_read();
  appInit( (void*)mDisplay );
+ if ( plCurrent ) mplSetFileName( plCurrent->path,plCurrent->name );
 }
 
 void guiDone( void )
 {
  mp_msg( MSGT_GPLAYER,MSGL_V,"[mplayer] exit.\n" );
- mplStop();
+ cfg_write();
  gtkDone();
  wsXDone();
 }
@@ -91,6 +124,54 @@
 
 extern ao_functions_t * audio_out;
 extern vo_functions_t * video_out;
+extern int    		flip;
+extern int    		frame_dropping;
+extern int    		sub_pos;
+extern int    		sub_unicode;
+extern int              stream_dump_type;
+extern char **          vo_plugin_args;
+extern int              auto_quality;
+
+#if defined( USE_OSD ) || defined( USE_SUB )
+void guiLoadFont( void )
+{
+ font_factor=gtkSubFFactor;
+ if ( vo_font )
+  {
+   int i;
+   if ( vo_font->name ) free( vo_font->name );
+   if ( vo_font->fpath ) free( vo_font->fpath );
+   for ( i=0;i<16;i++ )
+    if ( vo_font->pic_a[i] )
+     {
+      if ( vo_font->pic_a[i]->bmp ) free( vo_font->pic_a[i]->bmp );
+      if ( vo_font->pic_a[i]->pal ) free( vo_font->pic_a[i]->pal );
+     }
+   for ( i=0;i<16;i++ )
+    if ( vo_font->pic_b[i] )
+     {
+      if ( vo_font->pic_b[i]->bmp ) free( vo_font->pic_b[i]->bmp );
+      if ( vo_font->pic_b[i]->pal ) free( vo_font->pic_b[i]->pal );
+     }
+   free( vo_font ); vo_font=NULL;
+  }
+ if ( guiIntfStruct.Fontname )
+  {
+   vo_font=read_font_desc( guiIntfStruct.Fontname,font_factor,0 );
+   if ( !vo_font ) mp_msg( MSGT_CPLAYER,MSGL_ERR,MSGTR_CantLoadFont,font_name );
+  } 
+  else
+   {
+    guiIntfStruct.Fontname=gstrdup( get_path( "font/font.desc" ) );
+    vo_font=read_font_desc( guiIntfStruct.Fontname,font_factor,0 );
+    if ( !vo_font )
+     {
+      gfree( (void **)&guiIntfStruct.Fontname ); guiIntfStruct.Fontname=gstrdup( DATADIR"/font/font.desc" );
+      vo_font=read_font_desc( guiIntfStruct.Fontname,font_factor,0 );
+     }
+   }
+}
+#endif
 
 void guiGetEvent( int type,char * arg )
 {
@@ -126,7 +207,6 @@
 	break;
    case guiReDrawSubWindow:
 	wsPostRedisplay( &appMPlayer.subWindow );
-	if ( guiIntfStruct.Playing == 1 ) wsSetBackgroundRGB( &appMPlayer.subWindow,0,0,0 );
 	break;
    case guiSetShVideo:
 	 {
@@ -192,18 +272,11 @@
 	 }
 	break;
 #endif
-   case guiClearStruct:
-#ifdef USE_DVDREAD
-	if ( (unsigned int)arg & guiDVD ) memset( &guiIntfStruct.DVD,0,sizeof( guiDVDStruct ) );
-#endif
-#ifdef HAVE_VCD
-	if ( (unsigned int)arg & guiVCD ) guiIntfStruct.VCDTracks=0;
-#endif
-	break;
    case guiReDraw:
 	mplEventHandling( evRedraw,0 );
 	break;
    case guiSetVolume:
+// -- audio
         if ( audio_out )
 	{
 	 float l,r;
@@ -215,6 +288,9 @@
 	 btnModify( evSetBalance,guiIntfStruct.Balance );
 	}
 
+	if ( gtkAONoSound ) { if ( !muted ) mixer_mute(); }
+	 else if ( muted ) mixer_mute();
+
 	if ( gtkEnableAudioEqualizer )
 	 {
 	  equalizer_t eq;
@@ -226,40 +302,118 @@
 	      gtkSet( gtkSetEqualizer,0,&eq );
 	     }
 	 }
+// -- subtitle
+        gtkSubUnicode=sub_unicode;
+        gtkSubDelay=sub_delay;
+        gtkSubFPS=sub_fps;
+        gtkSubPos=sub_pos;
+#ifdef USE_OSD
+	gtkSubFFactor=font_factor;
+#endif
 	break;
    case guiSetDefaults:
-#if defined( HAVE_VCD ) || defined( USE_DVDREAD )
-        if ( guiIntfStruct.DiskChanged )
-          {
-/*
-#ifdef USE_DVDREAD
-           switch ( guiIntfStruct.StreamType )
-            {
-             case STREAMTYPE_DVD: filename=DEFAULT_DVD_DEVICE; break;
-            }
+	if ( filename && gstrcmp( filename,guiIntfStruct.Filename ) )
+	 {
+	  gtkSet( gtkDelPl,0,NULL ); guiIntfStruct.StreamType=STREAMTYPE_FILE;
+	  guiSetFilename( guiIntfStruct.Filename,filename );
+	 }
+
+       guiIntfStruct.DiskChanged=0;
+       guiIntfStruct.FilenameChanged=0;
+
+// --- video opts	 
+       if ( !gtkVODriver )
+	{
+         int i = 0, c = 0;
+         while ( video_out_drivers[i++] )
+	  if ( video_out_drivers[i - 1]->control( VOCTRL_GUISUPPORT,NULL ) == VO_TRUE ) 
+	   {
+	    const vo_info_t *info = video_out_drivers[i - 1]->get_info();
+	     { gtkVODriver=gstrdup( (char *)info->short_name ); break; }
+	   }
+	 }
+	
+	if ( gtkVODriver ) { if ( video_driver ) free( video_driver ); video_driver=strdup( gtkVODriver ); }
+	  else { gtkMessageBox( GTK_MB_FATAL,MSGTR_IDFGCVD ); exit_player( "gui init" ); }
+	
+	if ( gtkVPP )
+	 {
+	  if ( vo_plugin_args )
+	   {
+	    int i = 0;
+	    while ( vo_plugin_args[i] ) if ( !gstrcmp( vo_plugin_args[i++],"pp" ) ) { i=-1; break; }
+	    if ( i != -1 )
+	     { vo_plugin_args=realloc( vo_plugin_args,( i + 2 ) * sizeof( char * ) ); vo_plugin_args[i]=strdup( "pp" ); vo_plugin_args[i+1]=NULL; }
+	   } else { vo_plugin_args=malloc( 2 * sizeof( char * ) ); vo_plugin_args[0]=strdup( "pp" ); vo_plugin_args[1]=NULL; }
+	  auto_quality=gtkVAutoq;
+	 } 
+	 else
+	  if ( vo_plugin_args )
+	   {
+	    int n = 0;
+	    while ( vo_plugin_args[n++] ); n--;
+	    if ( n > -1 )
+	     {
+	      int i = 0;
+	      while ( vo_plugin_args[i] ) if ( !gstrcmp( vo_plugin_args[i++],"pp" ) ) break; i--;
+	      if ( n == i )
+	       {
+	        if ( n == 1 ) { free( vo_plugin_args[0] ); free( vo_plugin_args ); vo_plugin_args=NULL; }
+	         else memcpy( &vo_plugin_args[i],&vo_plugin_args[i+1],( n - i ) * sizeof( char * ) );
+	       }
+	     }
+	    auto_quality=0;
+	   }
+        vo_doublebuffering=gtkVODoubleBuffer;
+        vo_directrendering=gtkVODirectRendering;
+	frame_dropping=gtkVFrameDrop;
+	if ( gtkVHardFrameDrop ) frame_dropping=gtkVHardFrameDrop;
+	flip=gtkVFlip;
+	force_ni=gtkVNIAVI;
+	video_family=gtkVVFM;
+		 
+// --- audio opts
+	audio_delay=gtkAODelay;
+	if ( ao_plugin_cfg.plugin_list ) { free( ao_plugin_cfg.plugin_list ); ao_plugin_cfg.plugin_list=NULL; }
+	if ( gtkEnableAudioEqualizer ) gset( &ao_plugin_cfg.plugin_list,"eq" );
+	if ( gtkAONorm ) 	       gset( &ao_plugin_cfg.plugin_list,"volnorm" );
+	if ( gtkAOExtraStereo )
+	 {
+	  gset( &ao_plugin_cfg.plugin_list,"extrastereo" );
+	  ao_plugin_cfg.pl_extrastereo_mul=gtkAOExtraStereoMul;
+	 }
+	mixer_device=gtkAOOSSMixer;
+	if ( audio_driver ) free( audio_driver ); 
+	if ( !gstrcmp( gtkAODriver,"oss" ) && gtkAOOSSDevice )
+	 {
+	  char * tmp = calloc( 1,strlen( gtkAODriver ) + strlen( gtkAOOSSDevice ) + 2 );
+	  sprintf( tmp,"%s:%s",gtkAODriver,gtkAOOSSDevice ); 
+	  audio_driver=tmp;
+	 } else audio_driver=gstrdup( gtkAODriver );
+
+// -- subtitle
+#ifdef USE_SUB
+	sub_auto=0;
+	if ( gtkSubAuto && guiIntfStruct.StreamType == STREAMTYPE_FILE && !guiIntfStruct.Subtitlename )
+	 guiSetFilename( guiIntfStruct.Subtitlename,( guiIntfStruct.Filename ? sub_filename( get_path("sub/"),guiIntfStruct.Filename ): "default.sub" ) );
+	sub_name=guiIntfStruct.Subtitlename;
+        sub_unicode=gtkSubUnicode;
+        sub_delay=gtkSubDelay;
+        sub_fps=gtkSubFPS;
+        sub_pos=gtkSubPos;
+	stream_dump_type=0;
+	if ( gtkSubDumpMPSub ) stream_dump_type=4;
+	if ( gtkSubDumpSrt ) stream_dump_type=6;
+	gtkSubDumpMPSub=gtkSubDumpSrt=0;
 #endif
-*/
-           guiIntfStruct.DiskChanged=0;
-	   guiGetEvent( guiCEvent,(char *)guiSetPlay );
-	  }
+#if defined( USE_OSD ) || defined( USE_SUB )
+        guiLoadFont();
 #endif
 
-#ifdef USE_SUB
-       if ( guiIntfStruct.SubtitleChanged || !guiIntfStruct.FilenameChanged )
-         {
-	  if ( ( guiIntfStruct.Subtitlename )&&( guiIntfStruct.Subtitlename[0] != 0 ) ) sub_name=guiIntfStruct.Subtitlename;
-	  guiIntfStruct.SubtitleChanged=0;
-	 }
-#endif
-				    
+// --- misc		    
         if ( guiIntfStruct.AudioFile ) audio_stream=guiIntfStruct.AudioFile;
 	  else if ( guiIntfStruct.FilenameChanged ) audio_stream=NULL;
-
-	if ( gtkEnableAudioEqualizer )
-	 {
-	  if ( ao_plugin_cfg.plugin_list ) { if ( !strstr( ao_plugin_cfg.plugin_list,"eq" ) )  gstrcat( &ao_plugin_cfg.plugin_list,",eq" ); }
-	    else gstrcat( &ao_plugin_cfg.plugin_list,"eq" );
-	 }
+	index_mode=gtkVIndex;
 	
 	break;
   }
@@ -301,7 +455,7 @@
 
 void * gtkSet( int cmd,float fparam, void * vparam )
 {
- mp_cmd_t    * mp_cmd = (mp_cmd_t *)calloc( 1,sizeof( *mp_cmd ) );
+ mp_cmd_t    * mp_cmd;
  equalizer_t * eq = (equalizer_t *)vparam;
  plItem      * item = (plItem *)vparam;
  
@@ -338,7 +492,7 @@
 	  if ( !plCurrent && plList ) plCurrent=plList;
 	  return plCurrent;
 	 }
-	break;
+	return NULL;
    case gtkGetCurrPlItem: // get current item
         return plCurrent;
    case gtkDelPl: // delete list
@@ -366,17 +520,75 @@
 	  plList=NULL; plCurrent=NULL;
 	}
         return NULL;
+// --- subtitle
+   case gtkSetSubAuto:
+        gtkSubAuto=(int)fparam;
+	return NULL;
+   case gtkSetSubDelay:
+//        mp_cmd=(mp_cmd_t *)calloc( 1,sizeof( *mp_cmd ) );
+//        mp_cmd->id=MP_CMD_SUB_DELAY;    mp_cmd->name=strdup( "sub_delay" );
+//	mp_cmd->args[0].v.f=fparam;   mp_cmd->args[1].v.i=1;
+//	mp_input_queue_cmd( mp_cmd );
+        gtkSubDelay=sub_delay=fparam;
+        return NULL;   
+   case gtkSetSubFPS:
+        gtkSubFPS=sub_fps=(int)fparam;
+        return NULL;   
+   case gtkSetSubPos:
+        gtkSubPos=sub_pos=(int)fparam;
+        return NULL;   
+#if defined( USE_OSD ) || defined( USE_SUB )
+   case gtkSetFontFactor:
+        gtkSubFFactor=fparam;
+	guiLoadFont();
+	return NULL;
+#endif
+// --- misc
+   case gtkClearStruct:
+        if ( (unsigned int)fparam & guiFilenames )
+	 {
+	  gfree( (void **)&guiIntfStruct.Filename );
+	  gfree( (void **)&guiIntfStruct.Subtitlename );
+	  gfree( (void **)&guiIntfStruct.AudioFile );
+	 }
+#ifdef USE_DVDREAD
+	if ( (unsigned int)fparam & guiDVD ) memset( &guiIntfStruct.DVD,0,sizeof( guiDVDStruct ) );
+#endif
+#ifdef HAVE_VCD
+	if ( (unsigned int)fparam & guiVCD ) guiIntfStruct.VCDTracks=0;
+#endif
+	return NULL;
+   case gtkSetExtraStereo:
+        gtkAOExtraStereoMul=fparam;
+	audio_plugin_extrastereo.control( AOCONTROL_PLUGIN_ES_SET,(int)&gtkAOExtraStereoMul );
+        return NULL;
+   case gtkSetAudioDelay:
+        audio_delay=gtkAODelay=fparam;
+	return NULL;
+   case gtkSetPanscan:
+        mp_cmd=(mp_cmd_t *)calloc( 1,sizeof( *mp_cmd ) );
+        mp_cmd->id=MP_CMD_PANSCAN;    mp_cmd->name=strdup( "panscan" );
+	mp_cmd->args[0].v.f=fparam;   mp_cmd->args[1].v.i=1;
+	mp_input_queue_cmd( mp_cmd );
+        return NULL;
+   case gtkSetAutoq:
+	auto_quality=gtkVAutoq=(int)fparam;
+	return NULL;
 // --- set equalizers
    case gtkSetContrast:
+        mp_cmd=(mp_cmd_t *)calloc( 1,sizeof( *mp_cmd ) );
 	mp_cmd->id=MP_CMD_CONTRAST;   mp_cmd->name=strdup( "contrast" );
 	break;
    case gtkSetBrightness:
+        mp_cmd=(mp_cmd_t *)calloc( 1,sizeof( *mp_cmd ) );
 	mp_cmd->id=MP_CMD_BRIGHTNESS; mp_cmd->name=strdup( "brightness" );
 	break;
    case gtkSetHue:
+        mp_cmd=(mp_cmd_t *)calloc( 1,sizeof( *mp_cmd ) );
 	mp_cmd->id=MP_CMD_HUE;        mp_cmd->name=strdup( "hue" );
 	break;
    case gtkSetSaturation:
+        mp_cmd=(mp_cmd_t *)calloc( 1,sizeof( *mp_cmd ) );
 	mp_cmd->id=MP_CMD_SATURATION; mp_cmd->name=strdup( "saturation" );
 	break;
    case gtkSetEqualizer:
@@ -394,7 +606,7 @@
 	     { tmp.channel=i; tmp.band=j; audio_plugin_eq.control( AOCONTROL_PLUGIN_EQ_SET_GAIN,(int)&tmp ); }
 	  }
 	return NULL;
-   default: free( mp_cmd ); return NULL;
+   default: return NULL;
   }
  mp_cmd->args[0].v.i=(int)fparam;
  mp_cmd->args[1].v.i=1;
--- a/Gui/interface.h	Thu Jul 25 20:23:18 2002 +0000
+++ b/Gui/interface.h	Thu Jul 25 20:26:38 2002 +0000
@@ -88,6 +88,8 @@
 
    char * Subtitlename;
    int    SubtitleChanged;
+   
+   char * Fontname;
 
    char * Othername;
    int    OtherChanged;
@@ -110,10 +112,9 @@
 #define guiReDrawSubWindow  7
 #define guiSetShVideo       8
 #define guiSetStream        9
-#define guiClearStruct      10
-#define guiReDraw	    11
-#define guiSetVolume        12
-#define guiSetDefaults	    13
+#define guiReDraw	    10
+#define guiSetVolume        11
+#define guiSetDefaults	    12
 
 #define guiSetStop  0
 #define guiSetPlay  1
@@ -121,6 +122,7 @@
 
 #define guiDVD      	1
 #define guiVCD		2
+#define guiFilenames	4
 #define guiALL		0xffffffff
 
 extern char *get_path(char *filename); 
@@ -129,6 +131,7 @@
 extern void guiDone( void );
 extern void guiGetEvent( int type,char * arg );
 extern void guiEventHandling( void );
+extern void guiLoadFont( void );
 
 typedef struct _plItem 
 {
@@ -142,28 +145,40 @@
 extern plItem * plCurrent;
 extern plItem * plLastPlayed;
 
-#define gtkSetContrast   0
-#define gtkSetBrightness 1
-#define gtkSetHue	 2
-#define gtkSetSaturation 3
-#define gtkSetEqualizer  4
-#define gtkAddPlItem     5
-#define gtkGetNextPlItem 6
-#define gtkGetPrevPlItem 7
-#define gtkGetCurrPlItem 8
-#define gtkDelPl         9
+#define gtkSetContrast     0
+#define gtkSetBrightness   1
+#define gtkSetHue	   2
+#define gtkSetSaturation   3
+#define gtkSetEqualizer    4
+#define gtkAddPlItem       5
+#define gtkGetNextPlItem   6
+#define gtkGetPrevPlItem   7
+#define gtkGetCurrPlItem   8
+#define gtkDelPl           9
+#define gtkSetExtraStereo 10
+#define gtkSetAudioDelay  11
+#define gtkSetPanscan     12
+#define gtkSetSubDelay    13
+#define gtkSetSubFPS      14
+#define gtkSetSubPos      15
+#define gtkSetSubAuto     16
+#define gtkSetFontFactor  17
+#define gtkSetAutoq       18
+#define gtkClearStruct    19
 
 extern float gtkEquChannels[6][10];
 
 extern void * gtkSet( int cmd,float param, void * vparam );
 
-#define gstrdup( s,ss ) { s=malloc( strlen( ss ) + 3 ); strcpy( s,ss ); }
+extern char * gstrdup( char * str );
+extern int    gstrcmp( char * a,char * b );
+extern void   gfree( void ** p );
 
-#define guiSetFilename( s,n ) { if ( s ) free( s ); s=strdup( n ); }
+#define guiSetFilename( s,n ) { gfree( (void **)&s ); s=gstrdup( n ); }
 
 #define guiSetDF( s,d,n )                       \
  {                                              \
-  if ( s ) free( s ); s=NULL;                   \
+  gfree( (void **)&s );                          \
   s=malloc( strlen( d ) + strlen( n ) + 5 );    \
   sprintf( s,"%s/%s",d,n );                     \
  }
--- a/Gui/mplayer/gtk/about.c	Thu Jul 25 20:23:18 2002 +0000
+++ b/Gui/mplayer/gtk/about.c	Thu Jul 25 20:26:38 2002 +0000
@@ -231,7 +231,7 @@
   gtk_container_add( GTK_CONTAINER( hbuttonbox1 ),Ok );
 
   gtk_signal_connect( GTK_OBJECT( About ),"destroy",GTK_SIGNAL_FUNC( ab_Ok_released ),0 );
-  gtk_signal_connect( GTK_OBJECT( About ),"show",GTK_SIGNAL_FUNC( ab_AboutBox_show ),1 );
+  gtk_signal_connect( GTK_OBJECT( About ),"show",GTK_SIGNAL_FUNC( ab_AboutBox_show ),(void *)1 );
   gtk_signal_connect( GTK_OBJECT( About ),"hide",GTK_SIGNAL_FUNC( ab_AboutBox_show ),0 );
   gtk_signal_connect( GTK_OBJECT( Ok ),"released",GTK_SIGNAL_FUNC( ab_Ok_released ),0 );
 
--- a/Gui/mplayer/gtk/eq.c	Thu Jul 25 20:23:18 2002 +0000
+++ b/Gui/mplayer/gtk/eq.c	Thu Jul 25 20:26:38 2002 +0000
@@ -10,6 +10,7 @@
 #include <gtk/gtk.h>
 
 #include "../../events.h"
+#include "../../cfg.h"
 #include "../../help_mp.h"
 #include "../../../config.h"
 #include "../../../help_mp.h"
@@ -21,6 +22,8 @@
 
 #include "eq.h"
 
+#define eqRange 5
+
 GtkWidget * Equalizer;
 
 static GtkWidget * Notebook;
@@ -37,9 +40,6 @@
 
 // ---
 
-int gtkEnableAudioEqualizer = 1;
-int gtkEnableVideoEqualizer = 1;
-
 char * gtkEquChannel1 = NULL;
 char * gtkEquChannel2 = NULL;
 char * gtkEquChannel3 = NULL;
@@ -116,16 +116,16 @@
  VHueadj->value=(float)vo_gamma_hue;
  VSaturationadj->value=(float)vo_gamma_saturation;
 
- if ( !guiIntfStruct.Playing && gtkEnableVideoEqualizer )
+ if ( !guiIntfStruct.Playing || !gtkEnableVideoEqualizer )
   {
    gtk_widget_set_sensitive( VContrast,FALSE );
    gtk_widget_set_sensitive( VBrightness,FALSE );
    gtk_widget_set_sensitive( VHue,FALSE );
    gtk_widget_set_sensitive( VSaturation,FALSE );
   }
- Channel=0;
+ Channel=-1;
  eqSetBands( 0 );
- if ( !guiIntfStruct.Playing && gtkEnableAudioEqualizer )
+ if ( !guiIntfStruct.Playing || !gtkEnableAudioEqualizer )
   {
    gtk_widget_set_sensitive( ChannelsList,FALSE );
    gtk_widget_set_sensitive( A3125,FALSE );
@@ -205,7 +205,7 @@
    case 1: 
 	if ( gtk_notebook_get_current_page( GTK_NOTEBOOK( Notebook ) ) == 0 )
 	 { 
-	  if ( !guiIntfStruct.Playing && !gtkEnableAudioEqualizer ) break;
+	  if ( !guiIntfStruct.Playing || !gtkEnableAudioEqualizer ) break;
 	  gtkSet( gtkSetEqualizer,0,NULL ); 
 	  eqSetBands( Channel ); 
 	 }
@@ -381,7 +381,7 @@
   gtk_table_set_row_spacings( GTK_TABLE( table1 ),4 );
   gtk_table_set_col_spacings( GTK_TABLE( table1 ),9 );
 
-  A3125adj=GTK_ADJUSTMENT( gtk_adjustment_new( 0,-3,3,0.5,0,0 ) );
+  A3125adj=GTK_ADJUSTMENT( gtk_adjustment_new( 0,-eqRange,eqRange,0.5,0,0 ) );
   A3125=gtk_vscale_new( A3125adj );
   gtk_widget_set_name( A3125,"A3125" );
   gtk_widget_ref( A3125 );
@@ -390,7 +390,7 @@
   gtk_table_attach( GTK_TABLE( table1 ),A3125,0,1,0,1,( GtkAttachOptions )( GTK_FILL ),( GtkAttachOptions )( GTK_EXPAND | GTK_FILL ),0,0 );
   gtk_scale_set_draw_value( GTK_SCALE( A3125 ),FALSE );
 
-  A6250adj=GTK_ADJUSTMENT( gtk_adjustment_new( 0,-3,3,0.5,0,0 ) );
+  A6250adj=GTK_ADJUSTMENT( gtk_adjustment_new( 0,-eqRange,eqRange,0.5,0,0 ) );
   A6250=gtk_vscale_new( A6250adj );
   gtk_widget_set_name( A6250,"A6250" );
   gtk_widget_ref( A6250 );
@@ -399,7 +399,7 @@
   gtk_table_attach( GTK_TABLE( table1 ),A6250,1,2,0,1,( GtkAttachOptions )( GTK_FILL ),( GtkAttachOptions )( GTK_EXPAND | GTK_FILL ),0,0 );
   gtk_scale_set_draw_value( GTK_SCALE( A6250 ),FALSE );
 
-  A125adj=GTK_ADJUSTMENT( gtk_adjustment_new( 0,-3,3,0.5,0,0 ) );
+  A125adj=GTK_ADJUSTMENT( gtk_adjustment_new( 0,-eqRange,eqRange,0.5,0,0 ) );
   A125=gtk_vscale_new( A125adj );
   gtk_widget_set_name( A125,"A125" );
   gtk_widget_ref( A125 );
@@ -408,7 +408,7 @@
   gtk_table_attach( GTK_TABLE( table1 ),A125,2,3,0,1,( GtkAttachOptions )( GTK_FILL ),( GtkAttachOptions )( GTK_EXPAND | GTK_FILL ),0,0 );
   gtk_scale_set_draw_value( GTK_SCALE( A125 ),FALSE );
 
-  A250adj=GTK_ADJUSTMENT( gtk_adjustment_new( 0,-3,3,0.5,0,0 ) );
+  A250adj=GTK_ADJUSTMENT( gtk_adjustment_new( 0,-eqRange,eqRange,0.5,0,0 ) );
   A250=gtk_vscale_new( A250adj );
   gtk_widget_set_name( A250,"A250" );
   gtk_widget_ref( A250 );
@@ -417,7 +417,7 @@
   gtk_table_attach( GTK_TABLE( table1 ),A250,3,4,0,1,( GtkAttachOptions )( GTK_FILL ),( GtkAttachOptions )( GTK_EXPAND | GTK_FILL ),0,0 );
   gtk_scale_set_draw_value( GTK_SCALE( A250 ),FALSE );
 
-  A500adj=GTK_ADJUSTMENT( gtk_adjustment_new( 0,-3,3,0.5,0,0 ) );
+  A500adj=GTK_ADJUSTMENT( gtk_adjustment_new( 0,-eqRange,eqRange,0.5,0,0 ) );
   A500=gtk_vscale_new( A500adj );
   gtk_widget_set_name( A500,"A500" );
   gtk_widget_ref( A500 );
@@ -426,7 +426,7 @@
   gtk_table_attach( GTK_TABLE( table1 ),A500,4,5,0,1,( GtkAttachOptions )( GTK_FILL ),( GtkAttachOptions )( GTK_EXPAND | GTK_FILL ),0,0 );
   gtk_scale_set_draw_value( GTK_SCALE( A500 ),FALSE );
 
-  A1000adj=GTK_ADJUSTMENT( gtk_adjustment_new( 0,-3,3,0.5,0,0 ) );
+  A1000adj=GTK_ADJUSTMENT( gtk_adjustment_new( 0,-eqRange,eqRange,0.5,0,0 ) );
   A1000=gtk_vscale_new( A1000adj );
   gtk_widget_set_name( A1000,"A1000" );
   gtk_widget_ref( A1000 );
@@ -435,7 +435,7 @@
   gtk_table_attach( GTK_TABLE( table1 ),A1000,5,6,0,1,( GtkAttachOptions )( GTK_FILL ),( GtkAttachOptions )( GTK_EXPAND | GTK_FILL ),0,0 );
   gtk_scale_set_draw_value( GTK_SCALE( A1000 ),FALSE );
 
-  A2000adj=GTK_ADJUSTMENT( gtk_adjustment_new( 0,-3,3,0.5,0,0 ) );
+  A2000adj=GTK_ADJUSTMENT( gtk_adjustment_new( 0,-eqRange,eqRange,0.5,0,0 ) );
   A2000=gtk_vscale_new( A2000adj );
   gtk_widget_set_name( A2000,"A2000" );
   gtk_widget_ref( A2000 );
@@ -444,7 +444,7 @@
   gtk_table_attach( GTK_TABLE( table1 ),A2000,6,7,0,1,( GtkAttachOptions )( GTK_FILL ),( GtkAttachOptions )( GTK_EXPAND | GTK_FILL ),0,0 );
   gtk_scale_set_draw_value( GTK_SCALE( A2000 ),FALSE );
 
-  A4000adj=GTK_ADJUSTMENT( gtk_adjustment_new( 0,-3,3,0.5,0,0 ) );
+  A4000adj=GTK_ADJUSTMENT( gtk_adjustment_new( 0,-eqRange,eqRange,0.5,0,0 ) );
   A4000=gtk_vscale_new( A4000adj );
   gtk_widget_set_name( A4000,"A4000" );
   gtk_widget_ref( A4000 );
@@ -453,7 +453,7 @@
   gtk_table_attach( GTK_TABLE( table1 ),A4000,7,8,0,1,( GtkAttachOptions )( GTK_FILL ),( GtkAttachOptions )( GTK_EXPAND | GTK_FILL ),0,0 );
   gtk_scale_set_draw_value( GTK_SCALE( A4000 ),FALSE );
 
-  A8000adj=GTK_ADJUSTMENT( gtk_adjustment_new( 0,-3,3,0.5,0,0 ) );
+  A8000adj=GTK_ADJUSTMENT( gtk_adjustment_new( 0,-eqRange,eqRange,0.5,0,0 ) );
   A8000=gtk_vscale_new( A8000adj );
   gtk_widget_set_name( A8000,"A8000" );
   gtk_widget_ref( A8000 );
@@ -462,7 +462,7 @@
   gtk_table_attach( GTK_TABLE( table1 ),A8000,8,9,0,1,( GtkAttachOptions )( GTK_FILL ),( GtkAttachOptions )( GTK_EXPAND | GTK_FILL ),0,0 );
   gtk_scale_set_draw_value( GTK_SCALE( A8000 ),FALSE );
 
-  A16000adj=GTK_ADJUSTMENT( gtk_adjustment_new( 0,-3,3,0.5,0,0 ) );
+  A16000adj=GTK_ADJUSTMENT( gtk_adjustment_new( 0,-eqRange,eqRange,0.5,0,0 ) );
   A16000=gtk_vscale_new( A16000adj );
   gtk_widget_set_name( A16000,"A16000" );
   gtk_widget_ref( A16000 );
--- a/Gui/mplayer/gtk/eq.h	Thu Jul 25 20:23:18 2002 +0000
+++ b/Gui/mplayer/gtk/eq.h	Thu Jul 25 20:26:38 2002 +0000
@@ -6,9 +6,6 @@
 
 extern GtkWidget * Equalizer;
 
-extern int gtkEnableAudioEqualizer;
-extern int gtkEnableVideoEqualizer;
-
 extern GtkWidget * create_Equalizer( void );
 extern void ShowEqualizer( void );
 
--- a/Gui/mplayer/gtk/fs.c	Thu Jul 25 20:23:18 2002 +0000
+++ b/Gui/mplayer/gtk/fs.c	Thu Jul 25 20:26:38 2002 +0000
@@ -20,6 +20,7 @@
 
 #include "../widgets.h"
 #include "fs.h"
+#include "opts.h"
 
 #ifndef __linux__
 #define get_current_dir_name()  getcwd(NULL, PATH_MAX)
@@ -76,6 +77,11 @@
 	   { "Audio files (*.wav,*.mp2,*.mp3)",				   "*.wav,*.mp2,*.mp3" },
 	   { "All files ( * )",						   "*" } };
 
+#define fsNumberOfFontFilterNames 1
+char * fsFontFileNames[fsNumberOfFontFilterNames+1][2] =
+	 { { "font files (*.desc)",					   "*.desc" },
+	   { "All files ( * )",						   "*" } };
+
 GtkWidget   * fsFileNamesList;
 GtkWidget   * fsFNameList;
 GtkWidget   * fsFileSelect;
@@ -120,7 +126,7 @@
 
  glob( "*",0,NULL,&gg );
 // glob( ".*",GLOB_NOSORT | GLOB_APPEND,NULL,&gg );
- for(  i=0;i<gg.gl_pathc;i++ )
+ for(  i=0;(unsigned)i<gg.gl_pathc;i++ )
   {
    stat( gg.gl_pathv[i],&fs );
    if( !S_ISDIR( fs.st_mode ) ) continue;
@@ -171,7 +177,7 @@
 
 // glob( ".*",GLOB_NOSORT | GLOB_APPEND,NULL,&gg );
  pixmap=fpixmap; mask=fmask;
- for(  i=0;i<gg.gl_pathc;i++ )
+ for(  i=0;(unsigned)i<gg.gl_pathc;i++ )
   {
    stat( gg.gl_pathv[i],&fs );
    if(  S_ISDIR( fs.st_mode ) ) continue;
@@ -189,26 +195,14 @@
  gtk_widget_show( list );
 }
 
-static int FirstInit = 1;
-
 void ShowFileSelect( int type,int modal )
 {
  int i;
+ char * tmp = NULL;
 
  if ( gtkVFileSelect ) gtkActive( fsFileSelect );
   else fsFileSelect=create_FileSelect();
  
- if ( FirstInit )
-  {
-   fsTopList_items=g_list_append( fsTopList_items,(gchar *)get_current_dir_name() );
-   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" );
-   fsTopList_items=g_list_append( fsTopList_items,"/" );
-   FirstInit=0;
-  }
- gtk_combo_set_popdown_strings( GTK_COMBO( fsCombo4 ),fsTopList_items );
-  
  fsType=type;
  switch ( type )
   {
@@ -220,6 +214,7 @@
         gtk_combo_set_popdown_strings( GTK_COMBO( List ),fsList_items );
         g_list_free( fsList_items );
         gtk_entry_set_text( GTK_ENTRY( fsFilterCombo ),fsVideoFilterNames[fsNumberOfVideoFilterNames - 1][0] );
+	tmp=guiIntfStruct.Filename;
         break;
    case fsSubtitleSelector:
         gtk_window_set_title( GTK_WINDOW( fsFileSelect ),MSGTR_SubtitleSelect );
@@ -229,6 +224,7 @@
         gtk_combo_set_popdown_strings( GTK_COMBO( List ),fsList_items );
         g_list_free( fsList_items );
         gtk_entry_set_text( GTK_ENTRY( fsFilterCombo ),fsSubtitleFilterNames[fsNumberOfSubtitleFilterNames - 1][0] );
+	tmp=guiIntfStruct.Subtitlename;
         break;
    case fsOtherSelector:
         gtk_window_set_title( GTK_WINDOW( fsFileSelect ),MSGTR_OtherSelect );
@@ -238,6 +234,7 @@
         gtk_combo_set_popdown_strings( GTK_COMBO( List ),fsList_items );
         g_list_free( fsList_items );
         gtk_entry_set_text( GTK_ENTRY( fsFilterCombo ),fsOtherFilterNames[fsNumberOfOtherFilterNames][0] );
+	tmp=guiIntfStruct.Othername;
         break;
    case fsAudioSelector:
 	gtk_window_set_title( GTK_WINDOW( fsFileSelect ),MSGTR_AudioFileSelect );
@@ -247,9 +244,46 @@
 	gtk_combo_set_popdown_strings( GTK_COMBO( List ),fsList_items );
 	g_list_free( fsList_items );
 	gtk_entry_set_text( GTK_ENTRY( fsFilterCombo ),fsAudioFileNames[fsNumberOfAudioFilterNames - 1][0] );
+	tmp=guiIntfStruct.AudioFile;
+	break;
+   case fsFontSelector:
+        gtk_window_set_title( GTK_WINDOW( fsFileSelect ),MSGTR_FontSelect );
+	fsList_items=NULL;
+	for( i=0;i<fsNumberOfFontFilterNames + 1;i++ )
+	  fsList_items=g_list_append( fsList_items,fsFontFileNames[i][0] );
+	gtk_combo_set_popdown_strings( GTK_COMBO( List ),fsList_items );
+	g_list_free( fsList_items );
+	gtk_entry_set_text( GTK_ENTRY( fsFilterCombo ),fsFontFileNames[fsNumberOfFontFilterNames - 1][0] );
+	tmp=guiIntfStruct.Fontname;
 	break;
   }
+
+ if ( tmp && tmp[0] )
+  {
+   struct stat f;
+   char * dir = strdup( tmp );
+
+   do 
+    {
+     char * c = strrchr( dir,'/' );
+     stat( dir,&f );
+     if ( S_ISDIR( f.st_mode ) ) break;
+     if ( c ) *c=0;
+    } while ( strrchr( dir,'/' ) );
+
+   if ( dir[0] ) chdir( dir );
+   
+   free( dir );
+  }
  
+ if ( fsTopList_items ) g_list_free( fsTopList_items ); fsTopList_items=NULL;
+ fsTopList_items=g_list_append( fsTopList_items,(gchar *)get_current_dir_name() );
+ 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" );
+ fsTopList_items=g_list_append( fsTopList_items,"/" );
+ gtk_combo_set_popdown_strings( GTK_COMBO( fsCombo4 ),fsTopList_items );
+  
  gtk_window_set_modal( GTK_WINDOW( fsFileSelect ),modal );
 
  gtk_widget_show( fsFileSelect ); gtkVisible++;
@@ -301,6 +335,11 @@
            if( !strcmp( str,fsAudioFileNames[i][0] ) )
             { strcpy( fsFilter,fsAudioFileNames[i][1] ); break; }
 	  break;
+   case fsFontSelector:
+          for( i=0;i<fsNumberOfFontFilterNames+1;i++ )
+	    if( !strcmp( str,fsFontFileNames[i][0] ) )
+	     { strcpy( fsFilter,fsFontFileNames[i][1] ); break; }
+	  break;
    default: return;
   }
  CheckDir( fsFNameList,get_current_dir_name() );
@@ -385,8 +424,8 @@
           guiSetDF( guiIntfStruct.Filename,fsSelectedDirectory,fsSelectedFile );
           guiIntfStruct.StreamType=STREAMTYPE_FILE;
           guiIntfStruct.FilenameChanged=1;
-	  if ( guiIntfStruct.AudioFile ) free( guiIntfStruct.AudioFile );
-	  guiIntfStruct.AudioFile=NULL;
+	  gfree( &guiIntfStruct.AudioFile );
+	  gfree( &guiIntfStruct.Subtitlename );
           break;
    case fsSubtitleSelector:
           guiSetDF( guiIntfStruct.Subtitlename,fsSelectedDirectory,fsSelectedFile );
@@ -398,6 +437,13 @@
    case fsAudioSelector:
           guiSetDF( guiIntfStruct.AudioFile,fsSelectedDirectory,fsSelectedFile );
           break;
+   case fsFontSelector:
+          guiSetDF( guiIntfStruct.Fontname,fsSelectedDirectory,fsSelectedFile );
+#if defined( USE_OSD ) || defined( USE_SUB )
+	  guiLoadFont();
+#endif
+	  if ( gtkVPreferences ) gtk_entry_set_text( GTK_ENTRY( prEFontName ),guiIntfStruct.Fontname );
+	  break;
   }
 
  HideFileSelect();
@@ -674,7 +720,7 @@
  gtk_signal_connect( GTK_OBJECT( fsFileSelect ),"destroy",GTK_SIGNAL_FUNC( fs_fsFileSelect_destroy ),NULL );
  gtk_signal_connect( GTK_OBJECT( fsFileSelect ),"key_release_event",GTK_SIGNAL_FUNC( on_FileSelect_key_release_event ),NULL );
 
- gtk_signal_connect( GTK_OBJECT( fsFileSelect ),"show",GTK_SIGNAL_FUNC( fs_FileSelect_show ),1 );
+ gtk_signal_connect( GTK_OBJECT( fsFileSelect ),"show",GTK_SIGNAL_FUNC( fs_FileSelect_show ),(void *)1 );
  gtk_signal_connect( GTK_OBJECT( fsFileSelect ),"hide",GTK_SIGNAL_FUNC( fs_FileSelect_show ),0 );
 
  gtk_signal_connect( GTK_OBJECT( fsFilterCombo ),"changed",GTK_SIGNAL_FUNC( fs_fsFilterCombo_changed ),fsFilterCombo );
--- a/Gui/mplayer/gtk/fs.h	Thu Jul 25 20:23:18 2002 +0000
+++ b/Gui/mplayer/gtk/fs.h	Thu Jul 25 20:26:38 2002 +0000
@@ -6,7 +6,8 @@
 #define fsVideoSelector    0
 #define fsSubtitleSelector 1
 #define fsOtherSelector    2
-#define fsAudioSelector	   3
+#define fsAudioSelector    3
+#define fsFontSelector     4
 
 extern GtkWidget   * fsFileSelect;
 
--- a/Gui/mplayer/gtk/mb.c	Thu Jul 25 20:23:18 2002 +0000
+++ b/Gui/mplayer/gtk/mb.c	Thu Jul 25 20:26:38 2002 +0000
@@ -18,6 +18,7 @@
 {
  if ( gtkVMessageBox ) gtkActive( MessageBox );
    else MessageBox=create_MessageBox( 0 );
+ gtkSetLayer( MessageBox );
  if ( strlen( msg ) < 20 ) gtk_widget_set_usize( MessageBox,196,-1 );
  gtkVisible++;
 }
@@ -164,7 +165,7 @@
  gtk_widget_add_accelerator( Ok,"released",accel_group,GDK_Escape,0,GTK_ACCEL_VISIBLE );
 
  gtk_signal_connect( GTK_OBJECT( MessageBox ),"destroy_event",GTK_SIGNAL_FUNC( on_Ok_released ),NULL );
- gtk_signal_connect( GTK_OBJECT( MessageBox ),"show",GTK_SIGNAL_FUNC( on_MessageBox_show ),1 );
+ gtk_signal_connect( GTK_OBJECT( MessageBox ),"show",GTK_SIGNAL_FUNC( on_MessageBox_show ),(void *)1 );
  gtk_signal_connect( GTK_OBJECT( MessageBox ),"hide",GTK_SIGNAL_FUNC( on_MessageBox_show ),0 );
  gtk_signal_connect( GTK_OBJECT( Ok ),"released",GTK_SIGNAL_FUNC( on_Ok_released ),NULL );
 
--- a/Gui/mplayer/gtk/mb.h	Thu Jul 25 20:23:18 2002 +0000
+++ b/Gui/mplayer/gtk/mb.h	Thu Jul 25 20:26:38 2002 +0000
@@ -6,6 +6,7 @@
 
 extern GtkWidget * gtkMessageBoxText;
 extern GtkWidget * MessageBox;
+extern int         gtkVMessageBox;
 
 extern GtkWidget * create_MessageBox( int type );
 extern void ShowMessageBox( char * msg );
--- a/Gui/mplayer/gtk/menu.c	Thu Jul 25 20:23:18 2002 +0000
+++ b/Gui/mplayer/gtk/menu.c	Thu Jul 25 20:26:38 2002 +0000
@@ -321,7 +321,7 @@
 #ifdef USE_DVDREAD
    DVDSubMenu=AddSubMenu( Menu,MSGTR_MENU_DVD );
     AddMenuItem( DVDSubMenu,MSGTR_MENU_PlayDisc"    ", evPlayDVD );
-    AddMenuItem( DVDSubMenu,MSGTR_MENU_ShowDVDMenu, evNone );
+//    AddMenuItem( DVDSubMenu,MSGTR_MENU_ShowDVDMenu, evNone );
     AddSeparator( DVDSubMenu );
     DVDTitleMenu=AddSubMenu( DVDSubMenu,MSGTR_MENU_Titles );
      if ( guiIntfStruct.DVD.titles )
--- a/Gui/mplayer/gtk/opts.c	Thu Jul 25 20:23:18 2002 +0000
+++ b/Gui/mplayer/gtk/opts.c	Thu Jul 25 20:26:38 2002 +0000
@@ -1,792 +1,1630 @@
-
-#include <stdlib.h>
-#include <stdio.h>
 
-#include "../mplayer.h"
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <unistd.h>
+#include <string.h>
 
-#include "../../events.h"
+#include <gdk/gdkkeysyms.h>
+#include <gtk/gtk.h>
+
 #include "../../../config.h"
 #include "../../../help_mp.h"
-
+#include "../../../mixer.h"
+#include "../../../libao2/audio_out.h"
+#include "../../../libvo/video_out.h"
+#include "../../cfg.h"
+#include "../../interface.h"
 #include "../widgets.h"
 #include "opts.h"
+#include "fs.h"
 
-GtkWidget * opAudioFrameLabel;
-GtkWidget * opAudioLabel;
-GtkWidget * opAudioDriverMenu;
-GtkWidget * opDelayLabel;
-GtkWidget * opAudioDelaySkinButton;
-GtkWidget * opAudioConfigureButton;
-GtkWidget * OpVideoFrameLabel;
-GtkWidget * opVideoLabel;
-GtkWidget * opVideoMenu;
-GtkWidget * opOsdCheckButton;
-GtkWidget * opVideoConfButton;
-GtkWidget * opOSDLabel;
-GtkWidget * opOSDLevelSpinButton;
-GtkWidget * opAutoFullscreenCheckBox;
-GtkWidget * opOk;
-GtkWidget * opCancel;
+       GtkWidget * Preferences;
+static GtkWidget * AConfig;
+static GtkWidget * VConfig;
+//static GtkWidget * BLoadSubtitle;
+static GtkWidget * BLoadFont;
+static GtkWidget * BOk;
+static GtkWidget * BCancel;
+
+static GtkWidget * CLADrivers;
+static GtkWidget * CLVDrivers;
+
+//static GtkWidget * ESubtitleName;
+       GtkWidget * prEFontName;
+static GtkWidget * EVFM;
+
+static GtkWidget * CBVFM;
+static GtkWidget * CBAudioEqualizer;
+static GtkWidget * CBVideoEqualizer;
+//static GtkWidget * CBSurround;
+static GtkWidget * CBExtraStereo;
+static GtkWidget * CBNoSound;
+static GtkWidget * CBNormalize;
+static GtkWidget * CBDoubleBuffer;
+static GtkWidget * CBDR;
+static GtkWidget * CBFramedrop;
+static GtkWidget * CBHFramedrop;
+//static GtkWidget * CBFullScreen;
+static GtkWidget * CBNonInterlaved;
+static GtkWidget * CBIndex;
+static GtkWidget * CBFlip;
+static GtkWidget * CBNoAutoSub;
+static GtkWidget * CBSubUnicode;
+static GtkWidget * CBDumpMPSub;
+static GtkWidget * CBDumpSrt;
+static GtkWidget * CBPostprocess;
+
+static GtkWidget * RBOSDNone;
+static GtkWidget * RBOSDTandP;
+static GtkWidget * RBOSDIndicator;
+
+static GtkWidget * HSAudioDelay;
+static GtkWidget * HSExtraStereoMul;
+static GtkWidget * HSPanscan;
+static GtkWidget * HSSubDelay;
+static GtkWidget * HSSubPosition;
+static GtkWidget * HSSubFPS;
+static GtkWidget * HSFontFactor;
+static GtkWidget * HSPPQuality;
+
+static GtkAdjustment * HSExtraStereoMuladj, * HSAudioDelayadj, * HSPanscanadj, * HSSubDelayadj;
+static GtkAdjustment * HSSubPositionadj, * HSSubFPSadj, * HSFontFactoradj, * HSPPQualityadj;
+
+static struct
+{
+ int    vfm;
+ char * name;
+} lVFM[] =
+{ { -1,MSGTR_PREFERENCES_None   },
+  {  2,MSGTR_PREFERENCES_Codec1 },
+  {  3,MSGTR_PREFERENCES_Codec2 },
+  {  4,MSGTR_PREFERENCES_Codec3 },
+  {  5,MSGTR_PREFERENCES_Codec4 },
+  {  7,MSGTR_PREFERENCES_Codec5 },
+  { 10,MSGTR_PREFERENCES_Codec6 } };
+	    
+       int    gtkVPreferences = 0;
+static int    gtkVOSSConfig = 0;
+static int    old_audio_driver = 0;
+static char * ao_driver[2];
+static char * vo_driver[2];
+static int    old_video_driver = 0;
+
+void ShowOSSConfig( void );
+void HideOSSConfig( void );
+static gboolean prHScaler( GtkWidget * widget,GdkEventMotion  * event,gpointer user_data );
+static void prToggled( GtkToggleButton * togglebutton,gpointer user_data );
+static void prCListRow( GtkCList * clist,gint row,gint column,GdkEvent * event,gpointer user_data );
+
+extern int    muted;
+
+void ShowPreferences( void )
+{
+ if ( gtkVPreferences ) gtkActive( Preferences );
+   else Preferences=create_Preferences();
 
-int opShift = 0;
+// -- 1. page 
+ gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBAudioEqualizer ),gtkEnableAudioEqualizer );
+ gtkAONoSound=muted;
+ gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBNoSound ),gtkAONoSound );
+#if 0
+ gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBSurround ),gtkAOSurround );
+#endif
+ gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBExtraStereo ),gtkAOExtraStereo );
+ gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBNormalize ),gtkAONorm );
+ gtk_adjustment_set_value( HSExtraStereoMuladj,gtkAOExtraStereoMul );
+ {
+  int    i = 0;
+  char * tmp[2]; tmp[1]="";
+  old_audio_driver=0;
+  while ( audio_out_drivers[i] )
+   {
+    const ao_info_t *info = audio_out_drivers[i++]->info;
+    if ( !strcmp( info->short_name,"plugin" ) ) continue;
+    if ( gtkAODriver )
+      if ( !strcmp( gtkAODriver,info->short_name ) ) old_audio_driver=i - 1;
+    tmp[0]=(char *)info->name; gtk_clist_append( GTK_CLIST( CLADrivers ),tmp );
+   }
+  gtk_clist_select_row( GTK_CLIST( CLADrivers ),old_audio_driver,0 );
+  gtk_clist_get_text( GTK_CLIST( CLADrivers ),old_audio_driver,0,(char **)&ao_driver );
+  gtk_widget_set_sensitive( AConfig,FALSE );
+  if ( !strcmp( ao_driver[0],"OSS/ioctl audio output" ) ) gtk_widget_set_sensitive( AConfig,TRUE );
+ }
 
-void HideOptions( void )
-{ gtk_widget_destroy( Options ); }
+// -- 2. page
+ gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBVideoEqualizer ),gtkEnableVideoEqualizer );
+ gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBDoubleBuffer ),gtkVODoubleBuffer );
+ gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBDR ),gtkVODirectRendering );
+ gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBFramedrop ),gtkVFrameDrop );
+ gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBHFramedrop ),gtkVHardFrameDrop );
+ gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBFlip ),gtkVFlip );
+ gtk_adjustment_set_value( HSPanscanadj,vo_panscan );
+ {
+  int i = 0, c = 0;
+  char * tmp[2]; tmp[1]="";
+  old_video_driver=0; 
+  while ( video_out_drivers[i] )
+   if ( video_out_drivers[i++]->control( VOCTRL_GUISUPPORT,NULL ) == VO_TRUE )
+    { 
+     const vo_info_t *info = video_out_drivers[i - 1]->get_info();
+     if ( gtkVODriver )
+      if ( !strcmp( gtkVODriver,info->short_name ) ) old_video_driver=c; c++;
+     tmp[0]=(char *)info->short_name; gtk_clist_append( GTK_CLIST( CLVDrivers ),tmp );
+    }
+  gtk_clist_select_row( GTK_CLIST( CLVDrivers ),old_video_driver,0 );
+  gtk_clist_get_text( GTK_CLIST( CLVDrivers ),old_video_driver,0,(char **)&vo_driver );
+  gtk_widget_set_sensitive( VConfig,FALSE );
+ }
 
-gboolean on_window2_key_press_event( GtkWidget * widget,GdkEventKey * event,gpointer user_data )
-{
- switch ( event->keyval )
+// -- 3. page
+ gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBNoAutoSub ),!gtkSubAuto );
+ gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBDumpMPSub ),gtkSubDumpMPSub );
+ gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBDumpSrt ),gtkSubDumpSrt );
+ gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBSubUnicode ),gtkSubUnicode );
+ gtk_adjustment_set_value( HSSubDelayadj,gtkSubDelay );
+ gtk_adjustment_set_value( HSSubFPSadj,gtkSubFPS );
+ gtk_adjustment_set_value( HSSubPositionadj,gtkSubPos );
+ gtk_adjustment_set_value( HSFontFactoradj,gtkSubFFactor );
+ switch ( osd_level )
   {
-   case GDK_Shift_L:
-   case GDK_Shift_R:
-        opShift=1;
-        break;
+   case 0: gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( RBOSDNone ),TRUE ); break;
+   case 1: gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( RBOSDIndicator ),TRUE ); break;
+   case 2: gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( RBOSDTandP ),TRUE ); break;
   }
- return 0;
+#if 0
+ if ( guiIntfStruct.Subtitlename ) gtk_entry_set_text( GTK_ENTRY( ESubtitleName ),guiIntfStruct.Subtitlename );
+#endif
+ if ( guiIntfStruct.Fontname ) gtk_entry_set_text( GTK_ENTRY( prEFontName ),guiIntfStruct.Fontname );
+
+// -- 4. page
+ gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBNonInterlaved ),gtkVNIAVI );
+ gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBIndex ),gtkVIndex );
+ gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBPostprocess ),gtkVPP );
+ gtk_adjustment_set_value( HSPPQualityadj,gtkVAutoq );
+ {
+  int i = 0;
+  for ( i=0;i<7;i++ )
+    if ( lVFM[i].vfm == gtkVVFM ) break;
+  gtk_entry_set_text( GTK_ENTRY( EVFM ),lVFM[i].name );
+ }
+
+// -- disables
+#ifndef USE_SUB
+ gtk_widget_set_sensitive( AConfig,FALSE );
+ gtk_widget_set_sensitive( CBNoAutoSub,FALSE );
+ gtk_widget_set_sensitive( CBSubUnicode,FALSE );
+ gtk_widget_set_sensitive( CBDumpMPSub,FALSE );
+ gtk_widget_set_sensitive( CBDumpSrt,FALSE );
+ gtk_widget_set_sensitive( HSSubDelay,FALSE );
+ gtk_widget_set_sensitive( HSSubPosition,FALSE );
+ gtk_widget_set_sensitive( HSSubFPS,FALSE );
+#endif
+
+#ifndef USE_OSD
+ gtk_widget_set_sensitive( RBOSDNone,FALSE );
+ gtk_widget_set_sensitive( RBOSDTandP,FALSE );
+ gtk_widget_set_sensitive( RBOSDIndicator,FALSE );
+#endif
+
+#if !defined( USE_OSD ) && !defined( USE_SUB )
+ gtk_widget_set_sensitive( HSFontFactor,FALSE );
+ gtk_widget_set_sensitive( prEFontName,FALSE );
+ gtk_widget_set_sensitive( BLoadFont,FALSE );
+#endif
+
+// -- signals
+ gtk_signal_connect( GTK_OBJECT( CBExtraStereo ),"toggled",GTK_SIGNAL_FUNC( prToggled ),(void*)0 );
+ gtk_signal_connect( GTK_OBJECT( CBNormalize ),"toggled",GTK_SIGNAL_FUNC( prToggled ),(void*)1 );
+ gtk_signal_connect( GTK_OBJECT( CBAudioEqualizer ),"toggled",GTK_SIGNAL_FUNC( prToggled ),(void*)2 );
+ gtk_signal_connect( GTK_OBJECT( CBNoSound ),"toggled",GTK_SIGNAL_FUNC( prToggled ),(void*)3 );
+
+ gtk_signal_connect( GTK_OBJECT( HSExtraStereoMul ),"motion_notify_event",GTK_SIGNAL_FUNC( prHScaler ),(void*)0 );
+ gtk_signal_connect( GTK_OBJECT( HSAudioDelay ),"motion_notify_event",GTK_SIGNAL_FUNC( prHScaler ),(void*)1 );
+ gtk_signal_connect( GTK_OBJECT( HSPanscan ),"motion_notify_event",GTK_SIGNAL_FUNC( prHScaler ),(void*)2 );
+ gtk_signal_connect( GTK_OBJECT( HSSubDelay ),"motion_notify_event",GTK_SIGNAL_FUNC( prHScaler ),(void*)3 );
+ gtk_signal_connect( GTK_OBJECT( HSSubPosition ),"motion_notify_event",GTK_SIGNAL_FUNC( prHScaler ),(void*)4 );
+ gtk_signal_connect( GTK_OBJECT( HSFontFactor ),"motion_notify_event",GTK_SIGNAL_FUNC( prHScaler ),(void*)5 );
+ 
+ gtk_signal_connect( GTK_OBJECT( CLADrivers ),"select_row",GTK_SIGNAL_FUNC( prCListRow ),(void*)0 );
+ gtk_signal_connect( GTK_OBJECT( CLVDrivers ),"select_row",GTK_SIGNAL_FUNC( prCListRow ),(void*)1 );
+
+ gtkVPreferences=1; gtkVisible++;
+ gtk_widget_show( Preferences );
+ gtkSetLayer( Preferences );
+ gtkMessageBox( GTK_MB_WARNING,MSGTR_PREFERENCES_Message );
 }
 
-gboolean on_window2_key_release_event( GtkWidget * widget,GdkEventKey * event,gpointer user_data )
+void HidePreferences( void )
 {
- switch ( event->keyval )
+ if ( !gtkVPreferences ) return;
+ gtkVPreferences=0; gtkVisible--;
+ gtk_widget_hide( Preferences ); gtk_widget_destroy( Preferences );
+ HideOSSConfig();
+}
+
+static void prDestroy( GtkObject * object,gpointer user_data )
+{ HidePreferences(); }
+
+static void prShow( GtkWidget * widget,gpointer user_data )
+{ gtkVPreferences=(int)user_data; }
+
+#define bAConfig   0
+#define bVconfig   1
+#define bOk	   2
+#define bCancel    3
+#define bLSubtitle 4
+#define bLFont     5
+
+void prButton( GtkButton * button,gpointer user_data )
+{
+ switch ( (int)user_data )
   {
-   case GDK_Escape:
-   case GDK_Return:
-        if ( !opShift ) HideOptions();
-        break;
-   case GDK_Tab:
-//        if ( sbShift )
-//         { if ( (--sbItemsListCounter) < 0 ) sbItemsListCounter=2; }
-//         else
-//          { if ( (++sbItemsListCounter) > 2 ) sbItemsListCounter=0; }
-//        gtk_widget_grab_focus( sbItemsList[sbItemsListCounter] );
-        break;
-   case GDK_Shift_L:
-   case GDK_Shift_R:
-        opShift=0;
-        break;
+   case bOk:
+	// -- 1. page
+        gtkEnableAudioEqualizer=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBAudioEqualizer ) );
+	gtkAOExtraStereo=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBExtraStereo ) );
+	gtkAONorm=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBNormalize ) );
+	gtkAONoSound=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBNoSound ) );
+	gtkSet( gtkSetExtraStereo,HSExtraStereoMuladj->value,NULL );
+	gtkSet( gtkSetAudioDelay,HSAudioDelayadj->value,NULL );
+	{
+	 int    i = 0;
+	 while ( audio_out_drivers[i] )
+	  {
+	   const ao_info_t *info = audio_out_drivers[i++]->info;
+	   if ( !strcmp( info->short_name,"plugin" ) ) continue;
+	   if ( !strcmp( info->name,ao_driver[0] ) ) gtkAODriver=(char *)info->short_name;
+	  }
+	}
+	if ( gtkVODriver ) free( gtkVODriver );
+	gtkVODriver=strdup( vo_driver[0] );
+
+	// -- 2. page
+	gtkEnableVideoEqualizer=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBVideoEqualizer ) );
+	gtkVODoubleBuffer=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBDoubleBuffer ) );
+	gtkVODirectRendering=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBDR ) );
+	gtkVFrameDrop=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBFramedrop ) );
+	gtkVHardFrameDrop=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBHFramedrop ) );
+	gtkVFlip=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBFlip ) );
+	
+	// -- 3. page
+	gtkSet( gtkSetSubAuto,!gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBNoAutoSub ) ),NULL );
+	gtkSubDumpMPSub=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBDumpMPSub ) );
+	gtkSubDumpSrt=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBDumpSrt ) );
+	gtkSubUnicode=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBSubUnicode ) );
+	gtkSet( gtkSetSubDelay,HSSubDelayadj->value,NULL );
+	gtkSet( gtkSetSubFPS,HSSubFPSadj->value,NULL );
+	gtkSet( gtkSetSubPos,HSSubPositionadj->value,NULL );
+	gtkSet( gtkSetFontFactor,HSFontFactoradj->value,NULL );
+	if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( RBOSDNone ) ) ) osd_level=0;
+	if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( RBOSDIndicator ) ) ) osd_level=1;
+	if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( RBOSDTandP ) ) ) osd_level=2;
+	guiSetFilename( guiIntfStruct.Fontname,gtk_entry_get_text( GTK_ENTRY( prEFontName ) ) );
+
+	// -- 4. page
+	gtkVNIAVI=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBNonInterlaved ) );
+	gtkVIndex=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBIndex ) );
+	gtkVPP=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBPostprocess ) ); 
+	gtkSet( gtkSetAutoq,HSPPQualityadj->value,NULL );
+	{
+	 int i;
+	 char * tmp = gtk_entry_get_text( GTK_ENTRY( EVFM ) );
+	 gtkVVFM=-1;
+	 for ( i=0;i<7;i++ )
+	  if ( !strcmp( tmp,lVFM[i].name ) ) { gtkVVFM=lVFM[i].vfm; break; }
+	}
+
+   case bCancel:
+	HidePreferences();
+	break;
+   case bAConfig:
+        gtk_widget_set_sensitive( AConfig,FALSE );
+        if ( !strcmp( ao_driver[0],"OSS/ioctl audio output" ) ) { ShowOSSConfig(); gtk_widget_set_sensitive( AConfig,TRUE ); }
+	break;
+//   case bVconfig:
+//	break;
+#if 0
+   case bLSubtitle:
+	break;
+#endif
+   case bLFont:
+        ShowFileSelect( fsFontSelector,FALSE );
+	gtkSetLayer( fsFileSelect );
+	break;
+  }
+}
+
+static gboolean prHScaler( GtkWidget * widget,GdkEventMotion  * event,gpointer user_data )
+{
+ switch ( (int)user_data )
+  {
+   case 0: // extra stereo coefficient
+	if ( !guiIntfStruct.Playing ) break;
+	gtkSet( gtkSetExtraStereo,HSExtraStereoMuladj->value,NULL );
+	break;
+   case 1: // audio delay
+	gtkSet( gtkSetAudioDelay,HSAudioDelayadj->value,NULL );
+	break;
+   case 2: // panscan
+        gtkSet( gtkSetPanscan,HSPanscanadj->value,NULL );
+	break;
+   case 3: // sub delay
+        gtkSet( gtkSetSubDelay,HSSubDelayadj->value,NULL );
+	break;
+   case 4: // sub position
+        gtkSet( gtkSetSubPos,HSSubPositionadj->value,NULL );
+	break;
+   case 5: // font factor
+        gtkSet( gtkSetFontFactor,HSFontFactoradj->value,NULL );
+	break;
   }
  return FALSE;
 }
 
-gboolean on_window2_destroy_event( GtkWidget * widget,GdkEvent * event,gpointer user_data)
-{
-  HideOptions();
-  return FALSE;
-}
-
-void on_opAudioDriverMenu_released( GtkButton * button,gpointer user_data )
-{
-}
-
-void on_opAudioDelaySkinButton_changed( GtkEditable * editable,gpointer user_data )
-{
-}
-
-void on_opAudioDelaySkinButton_move_to_column( GtkEditable * editable,gint column,gpointer user_data )
-{
-}
-
-void on_opAudioDelaySkinButton_move_to_row( GtkEditable * editable,gint row,gpointer user_data )
-{
-}
-
-void on_opAudioConfigureButton_released( GtkButton * button,gpointer user_data )
+static void prToggled( GtkToggleButton * togglebutton,gpointer user_data )
 {
-}
-
-void on_opVideoMenu_released( GtkButton * button,gpointer user_data )
-{
- fprintf( stderr,"[opts] data: %s\n",(char *)user_data );
-}
-
-void on_opVideoMenu_pressed( GtkButton * button,gpointer user_data )
-{
- fprintf( stderr,"[opts] data: %s\n",(char *)user_data );
-}
-
-void on_opVideoMenu_clicked( GtkButton * button,gpointer user_data)
-{
- fprintf( stderr,"[opts] data(2): %s\n",(char *)user_data );
-}
-
-gboolean on_opVideoMenu_button_release_event( GtkWidget * widget,GdkEventButton * event,gpointer user_data )
-{
- fprintf( stderr,"[opts] video menu.\n" );
- return FALSE;
-}
-
-void on_opOsdCheckButton_toggled( GtkToggleButton * togglebutton,gpointer user_data )
-{
-}
-
-void on_opVideoConfButton_released( GtkButton * button,gpointer user_data )
-{
+ switch ( (int)user_data )
+  {
+   case 0: // extra stereo coefficient
+	if ( guiIntfStruct.Playing ) 
+	gtk_widget_set_sensitive( HSExtraStereoMul,gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBExtraStereo ) ) );
+	break;
+//   case 1: // normalize
+//   case 2: // equalizer
+//	if ( guiIntfStruct.Playing ) gtkMessageBox( GTK_MB_WARNING,"Please remember, this function need restart the playing." );
+//	break;
+   case 3: // no sound
+        mixer_mute();
+	break;
+  }
 }
 
-void on_opOSDLevelSpinButton_changed( GtkEditable * editable,gpointer user_data )
-{
-}
-
-void on_opOSDLevelSpinButton_move_to_column( GtkEditable * editable,gint column,gpointer user_data )
-{
-}
-
-void on_opOSDLevelSpinButton_move_to_row( GtkEditable * editable,gint row,gpointer user_data )
-{
-}
-
-void on_opOk_released( GtkButton * button,gpointer user_data )
-{ HideOptions(); }
-
-void on_opCancel_released( GtkButton * button,gpointer user_data )
-{ HideOptions(); }
-
-gboolean on_confOSS_destroy_event    ( GtkWidget * widget,GdkEvent * event,gpointer user_data)
-{
-  return FALSE;
-}
-
-gboolean on_confOSS_key_press_event  ( GtkWidget * widget,GdkEventKey * event,gpointer user_data )
-{
-  return FALSE;
-}
-
-gboolean on_confOSS_key_release_event( GtkWidget * widget,GdkEventKey * event,gpointer user_data )
+static void prCListRow( GtkCList * clist,gint row,gint column,GdkEvent * event,gpointer user_data )
 {
-  return FALSE;
-}
-
-void on_opOSSDSPCombo_set_focus_child( GtkContainer * container,GtkWidget * widget,gpointer user_data )
-{
-}
-
-void on_opOSSDSPComboEntry_changed( GtkEditable * editable,gpointer user_data )
-{
-}
-
-void on_opOSSMixerCombo_set_focus_child( GtkContainer * container,GtkWidget * widget,gpointer user_data )
-{
-}
-
-void on_opOSSMixerComboEntry_changed( GtkEditable * editable,gpointer user_data )
-{
-}
-
-void on_opOSSOk_released( GtkButton * button,gpointer user_data )
-{
-}
-
-void on_opOSSCancel_released( GtkButton * button,gpointer user_data )
-{
-}
-
-void on_opAutoFullscreenCheckBox_toggled( GtkToggleButton *togglebutton,gpointer user_data )
-{
+ switch ( (int)user_data )
+  {
+   case 0: // audio driver 
+	gtk_clist_get_text( GTK_CLIST( CLADrivers ),row,0,(char **)&ao_driver ); 
+	gtk_widget_set_sensitive( AConfig,FALSE );
+	if ( !strcmp( ao_driver[0],"OSS/ioctl audio output" ) ) gtk_widget_set_sensitive( AConfig,TRUE );
+	break;
+   case 1: // video driver 
+	gtk_clist_get_text( GTK_CLIST( CLVDrivers ),row,0,(char **)&vo_driver ); 
+	break;
+  } 
 }
 
-GtkWidget * create_Options( void )
+GtkWidget * create_Preferences( void )
 {
- GtkWidget *frame1;
- GtkWidget *frame2;
- GtkWidget *frame3;
- GtkWidget *frame4;
- GtkWidget *vbox1;
- GtkWidget *notebook1;
- GtkWidget *frame5;
- GtkWidget *frame6;
- GtkWidget *hbox1;
- GtkWidget *table1;
- GtkWidget *opAudioDriverMenu_menu;
- GtkWidget *glade_menuitem;
- GtkObject *opAudioDelaySkinButton_adj;
- GtkWidget *hbuttonbox2;
- GtkWidget *frame16;
- GtkWidget *table2;
- GtkWidget *opVideoMenu_menu;
- GtkWidget *hbuttonbox3;
- GtkWidget *label5;
- GtkObject *opOSDLevelSpinButton_adj;
- GtkWidget *frame17;
- GtkWidget *opAudio;
- GtkWidget *frame11;
- GtkWidget *frame12;
- GtkWidget *hbox2;
- GtkWidget *frame13;
- GtkWidget *table4;
- GtkWidget *vseparator1;
- GtkWidget *frame14;
- GtkWidget *opMisc;
- GtkWidget *hseparator1;
- GtkWidget *hbuttonbox1;
- GtkTooltips *tooltips;
+  GtkWidget * frame1;
+  GtkWidget * frame2;
+  GtkWidget * frame3;
+  GtkWidget * frame4;
+  GtkWidget * vbox1;
+  GtkWidget * notebook1;
+  GtkWidget * hbox1;
+  GtkWidget * frame9;
+  GtkWidget * vbox2;
+  GtkWidget * scrolledwindow3;
+  GtkWidget * label8;
+  GtkWidget * hbuttonbox2;
+  GtkWidget * frame10;
+  GtkWidget * vbox3;
+  GtkWidget * hseparator2;
+  GtkWidget * hbox8;
+  GtkWidget * label17;
+  GtkWidget * label1;
+  GtkWidget * hbox2;
+  GtkWidget * frame7;
+  GtkWidget * vbox4;
+  GtkWidget * scrolledwindow2;
+  GtkWidget * label7;
+  GtkWidget * hbuttonbox3;
+  GtkWidget * frame8;
+  GtkWidget * vbox5;
+  GtkWidget * hbox3;
+  GtkWidget * label9;
+  GtkWidget * label2;
+  GtkWidget * vbox6;
+  GtkWidget * frame5;
+  GtkWidget * vbox600;
+  GSList    * OSD_group = NULL;
+  GList	    * CBVFM_items = NULL;
+  GtkWidget * frame6;
+  GtkWidget * vbox7;
+//  GtkWidget * hbox4;
+//  GtkWidget * label10;
+//  GtkWidget * hbuttonbox4;
+  GtkWidget * vbox8;
+  GtkWidget * table1;
+  GtkWidget * label11;
+  GtkWidget * label12;
+  GtkWidget * label13;
+  GtkWidget * vbox9;
+  GtkWidget * frame12;
+  GtkWidget * vbox603;
+  GtkWidget * hbox6;
+  GtkWidget * label15;
+  GtkWidget * hbuttonbox5;
+  GtkWidget * hbox7;
+  GtkWidget * label16;
+  GtkWidget * label3;
+  GtkWidget * vbox601;
+  GtkWidget * frame11;
+  GtkWidget * vbox602;
+  GtkWidget * hbox5;
+  GtkWidget * label14;
+  GtkWidget * label4;
+  GtkWidget * hseparator1;
+  GtkWidget * hbuttonbox1;
+  GtkAccelGroup * accel_group;
+
+  accel_group=gtk_accel_group_new();
 
- tooltips = gtk_tooltips_new ();
+  Preferences=gtk_window_new( GTK_WINDOW_DIALOG );
+  gtk_widget_set_name( Preferences,"Preferences" );
+  gtk_object_set_data( GTK_OBJECT( Preferences ),"Preferences",Preferences );
+#if 0
+  gtk_widget_set_usize( Preferences,512,440 );
+#else
+  gtk_widget_set_usize( Preferences,512,395 );
+#endif
+  gtk_window_set_title( GTK_WINDOW( Preferences ),MSGTR_Preferences );
+  gtk_window_set_position( GTK_WINDOW( Preferences ),GTK_WIN_POS_CENTER );
+  gtk_window_set_policy( GTK_WINDOW( Preferences ),FALSE,FALSE,FALSE );
+  gtk_window_set_wmclass( GTK_WINDOW( Preferences ),"Preferences","MPlayer" );
+  
+  gtk_widget_realize( Preferences );
+  gtkAddIcon( Preferences );
 
- Options = gtk_window_new (GTK_WINDOW_TOPLEVEL);
- gtk_widget_set_name (Options, "Options");
- gtk_object_set_data (GTK_OBJECT (Options), "Options", Options);
- gtk_widget_set_usize (Options, 448, 260);
- gtk_widget_set_events (Options, GDK_EXPOSURE_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK | GDK_STRUCTURE_MASK | GDK_VISIBILITY_NOTIFY_MASK);
- gtk_window_set_title (GTK_WINDOW (Options),"Options");
- gtk_window_set_policy (GTK_WINDOW (Options), FALSE, FALSE, FALSE);
- gtk_window_set_wmclass (GTK_WINDOW (Options), "Options", "Options");
+  frame1=gtk_frame_new( NULL );
+  gtk_widget_set_name( frame1,"frame1" );
+  gtk_widget_ref( frame1 );
+  gtk_object_set_data_full( GTK_OBJECT( Preferences ),"frame1",frame1,     (GtkDestroyNotify)gtk_widget_unref );
+  gtk_widget_show( frame1 );
+  gtk_container_add( GTK_CONTAINER( Preferences ),frame1 );
+  gtk_container_set_border_width( GTK_CONTAINER( frame1 ),1 );
+  gtk_frame_set_shadow_type( GTK_FRAME( frame1 ),GTK_SHADOW_IN );
+
+  frame2=gtk_frame_new( NULL );
+  gtk_widget_set_name( frame2,"frame2" );
+  gtk_widget_ref( frame2 );
+  gtk_object_set_data_full( GTK_OBJECT( Preferences ),"frame2",frame2,(GtkDestroyNotify)gtk_widget_unref );
+  gtk_widget_show( frame2 );
+  gtk_container_add( GTK_CONTAINER( frame1 ),frame2 );
+  gtk_frame_set_shadow_type( GTK_FRAME( frame2 ),GTK_SHADOW_NONE );
+
+  frame3=gtk_frame_new( NULL );
+  gtk_widget_set_name( frame3,"frame3" );
+  gtk_widget_ref( frame3 );
+  gtk_object_set_data_full( GTK_OBJECT( Preferences ),"frame3",frame3,(GtkDestroyNotify)gtk_widget_unref );
+  gtk_widget_show( frame3 );
+  gtk_container_add( GTK_CONTAINER( frame2 ),frame3 );
+  gtk_frame_set_shadow_type( GTK_FRAME( frame3 ),GTK_SHADOW_ETCHED_OUT );
 
- frame1 = gtk_frame_new (NULL);
- gtk_widget_set_name (frame1, "frame1");
- gtk_widget_ref (frame1);
- gtk_object_set_data_full (GTK_OBJECT (Options), "frame1", frame1,
-                           (GtkDestroyNotify) gtk_widget_unref);
- gtk_widget_show (frame1);
- gtk_container_add (GTK_CONTAINER (Options), frame1);
- gtk_container_set_border_width (GTK_CONTAINER (frame1), 1);
- gtk_frame_set_shadow_type (GTK_FRAME (frame1), GTK_SHADOW_IN);
+  frame4=gtk_frame_new( NULL );
+  gtk_widget_set_name( frame4,"frame4" );
+  gtk_widget_ref( frame4 );
+  gtk_object_set_data_full( GTK_OBJECT( Preferences ),"frame4",frame4,(GtkDestroyNotify)gtk_widget_unref );
+  gtk_widget_show( frame4 );
+  gtk_container_add( GTK_CONTAINER( frame3 ),frame4 );
+  gtk_frame_set_shadow_type( GTK_FRAME( frame4 ),GTK_SHADOW_NONE );
+
+  vbox1=gtk_vbox_new( FALSE,0 );
+  gtk_widget_set_name( vbox1,"vbox1" );
+  gtk_widget_ref( vbox1 );
+  gtk_object_set_data_full( GTK_OBJECT( Preferences ),"vbox1",vbox1,(GtkDestroyNotify)gtk_widget_unref );
+  gtk_widget_show( vbox1 );
+  gtk_container_add( GTK_CONTAINER( frame4 ),vbox1 );
+
+  notebook1=gtk_notebook_new();
+  gtk_widget_set_name( notebook1,"notebook1" );
+  gtk_widget_ref( notebook1 );
+  gtk_object_set_data_full( GTK_OBJECT( Preferences ),"notebook1",notebook1,(GtkDestroyNotify)gtk_widget_unref );
+  gtk_widget_show( notebook1 );
+  gtk_box_pack_start( GTK_BOX( vbox1 ),notebook1,TRUE,TRUE,0 );
 
- frame2 = gtk_frame_new (NULL);
- gtk_widget_set_name (frame2, "frame2");
- gtk_widget_ref (frame2);
- gtk_object_set_data_full (GTK_OBJECT (Options), "frame2", frame2,
-                           (GtkDestroyNotify) gtk_widget_unref);
- gtk_widget_show (frame2);
- gtk_container_add (GTK_CONTAINER (frame1), frame2);
- gtk_frame_set_shadow_type (GTK_FRAME (frame2), GTK_SHADOW_NONE);
+  hbox1=gtk_hbox_new( FALSE,0 );
+  gtk_widget_set_name( hbox1,"hbox1" );
+  gtk_widget_ref( hbox1 );
+  gtk_object_set_data_full( GTK_OBJECT( Preferences ),"hbox1",hbox1,(GtkDestroyNotify)gtk_widget_unref );
+  gtk_widget_show( hbox1 );
+  gtk_container_add( GTK_CONTAINER( notebook1 ),hbox1 );
+
+  frame9=gtk_frame_new( NULL );
+  gtk_widget_set_name( frame9,"frame9" );
+  gtk_widget_ref( frame9 );
+  gtk_object_set_data_full( GTK_OBJECT( Preferences ),"frame9",frame9,(GtkDestroyNotify)gtk_widget_unref );
+  gtk_widget_show( frame9 );
+  gtk_box_pack_start( GTK_BOX( hbox1 ),frame9,TRUE,TRUE,0 );
+  gtk_frame_set_shadow_type( GTK_FRAME( frame9 ),GTK_SHADOW_ETCHED_OUT );
+
+  vbox2=gtk_vbox_new( FALSE,0 );
+  gtk_widget_set_name( vbox2,"vbox2" );
+  gtk_widget_ref( vbox2 );
+  gtk_object_set_data_full( GTK_OBJECT( Preferences ),"vbox2",vbox2,(GtkDestroyNotify)gtk_widget_unref );
+  gtk_widget_show( vbox2 );
+  gtk_container_add( GTK_CONTAINER( frame9 ),vbox2 );
 
- frame3 = gtk_frame_new (NULL);
- gtk_widget_set_name (frame3, "frame3");
- gtk_widget_ref (frame3);
- gtk_object_set_data_full (GTK_OBJECT (Options), "frame3", frame3,
-                           (GtkDestroyNotify) gtk_widget_unref);
- gtk_widget_show (frame3);
- gtk_container_add (GTK_CONTAINER (frame2), frame3);
- gtk_frame_set_shadow_type (GTK_FRAME (frame3), GTK_SHADOW_ETCHED_OUT);
+  scrolledwindow3=gtk_scrolled_window_new( NULL,NULL );
+  gtk_widget_set_name( scrolledwindow3,"scrolledwindow3" );
+  gtk_widget_ref( scrolledwindow3 );
+  gtk_object_set_data_full( GTK_OBJECT( Preferences ),"scrolledwindow3",scrolledwindow3,(GtkDestroyNotify)gtk_widget_unref );
+  gtk_widget_show( scrolledwindow3 );
+  gtk_box_pack_start( GTK_BOX( vbox2 ),scrolledwindow3,TRUE,TRUE,0 );
+  gtk_scrolled_window_set_policy( GTK_SCROLLED_WINDOW( scrolledwindow3 ),GTK_POLICY_AUTOMATIC,GTK_POLICY_AUTOMATIC );
+
+  CLADrivers=gtk_clist_new( 1 );
+  gtk_widget_set_name( CLADrivers,"CLADrivers" );
+  gtk_widget_ref( CLADrivers );
+  gtk_object_set_data_full( GTK_OBJECT( Preferences ),"CLADrivers",CLADrivers,(GtkDestroyNotify)gtk_widget_unref );
+  gtk_widget_show( CLADrivers );
+  gtk_container_add( GTK_CONTAINER( scrolledwindow3 ),CLADrivers );
+  gtk_clist_set_column_width( GTK_CLIST( CLADrivers ),0,80 );
+  gtk_clist_column_titles_show( GTK_CLIST( CLADrivers ) );
+  gtk_clist_set_shadow_type( GTK_CLIST( CLADrivers ),GTK_SHADOW_NONE );
+
+  label8=gtk_label_new( MSGTR_PREFERENCES_AvailableDrivers );
+  gtk_widget_set_name( label8,"label8" );
+  gtk_widget_ref( label8 );
+  gtk_object_set_data_full( GTK_OBJECT( Preferences ),"label8",label8,(GtkDestroyNotify)gtk_widget_unref );
+  gtk_widget_show( label8 );
+  gtk_clist_set_column_widget( GTK_CLIST( CLADrivers ),0,label8 );
+  gtk_misc_set_alignment( GTK_MISC( label8 ),0,0.5 );
+  gtk_misc_set_padding( GTK_MISC( label8 ),4,0 );
+
+  hbuttonbox2=gtk_hbutton_box_new();
+  gtk_widget_set_name( hbuttonbox2,"hbuttonbox2" );
+  gtk_widget_ref( hbuttonbox2 );
+  gtk_object_set_data_full( GTK_OBJECT( Preferences ),"hbuttonbox2",hbuttonbox2,(GtkDestroyNotify)gtk_widget_unref );
+  gtk_widget_show( hbuttonbox2 );
+  gtk_box_pack_start( GTK_BOX( vbox2 ),hbuttonbox2,FALSE,FALSE,0 );
+  gtk_button_box_set_child_size( GTK_BUTTON_BOX( hbuttonbox2 ),85,20 );
 
- frame4 = gtk_frame_new (NULL);
- gtk_widget_set_name (frame4, "frame4");
- gtk_widget_ref (frame4);
- gtk_object_set_data_full (GTK_OBJECT (Options), "frame4", frame4,
-                           (GtkDestroyNotify) gtk_widget_unref);
- gtk_widget_show (frame4);
- gtk_container_add (GTK_CONTAINER (frame3), frame4);
- gtk_frame_set_shadow_type (GTK_FRAME (frame4), GTK_SHADOW_NONE);
+  AConfig=gtk_button_new_with_label( MSGTR_ConfigDriver );
+  gtk_widget_set_name( AConfig,"AConfig" );
+  gtk_widget_ref( AConfig );
+  gtk_object_set_data_full( GTK_OBJECT( Preferences ),"AConfig",AConfig,(GtkDestroyNotify)gtk_widget_unref );
+  gtk_widget_show( AConfig );
+  gtk_container_add( GTK_CONTAINER( hbuttonbox2 ),AConfig );
+  GTK_WIDGET_UNSET_FLAGS( AConfig,GTK_CAN_FOCUS );
+
+  frame10=gtk_frame_new( NULL );
+  gtk_widget_set_name( frame10,"frame10" );
+  gtk_widget_ref( frame10 );
+  gtk_object_set_data_full( GTK_OBJECT( Preferences ),"frame10",frame10,(GtkDestroyNotify)gtk_widget_unref );
+  gtk_widget_show( frame10 );
+  gtk_box_pack_start( GTK_BOX( hbox1 ),frame10,TRUE,TRUE,0 );
+  gtk_frame_set_shadow_type( GTK_FRAME( frame10 ),GTK_SHADOW_ETCHED_OUT );
 
- vbox1 = gtk_vbox_new (FALSE, 0);
- gtk_widget_set_name (vbox1, "vbox1");
- gtk_widget_ref (vbox1);
- gtk_object_set_data_full (GTK_OBJECT (Options), "vbox1", vbox1,
-                           (GtkDestroyNotify) gtk_widget_unref);
- gtk_widget_show (vbox1);
- gtk_container_add (GTK_CONTAINER (frame4), vbox1);
+  vbox3=gtk_vbox_new( FALSE,0 );
+  gtk_widget_set_name( vbox3,"vbox3" );
+  gtk_widget_ref( vbox3 );
+  gtk_object_set_data_full( GTK_OBJECT( Preferences ),"vbox3",vbox3,(GtkDestroyNotify)gtk_widget_unref );
+  gtk_widget_show( vbox3 );
+  gtk_container_add( GTK_CONTAINER( frame10 ),vbox3 );
+  gtk_widget_set_usize( vbox3,250,-2 );
 
- notebook1 = gtk_notebook_new ();
- gtk_widget_set_name (notebook1, "notebook1");
- gtk_widget_ref (notebook1);
- gtk_object_set_data_full (GTK_OBJECT (Options), "notebook1", notebook1,
-                           (GtkDestroyNotify) gtk_widget_unref);
- gtk_widget_show (notebook1);
- gtk_box_pack_start (GTK_BOX (vbox1), notebook1, TRUE, TRUE, 0);
+  CBNoSound=gtk_check_button_new_with_label( MSGTR_PREFERENCES_DoNotPlaySound );
+  gtk_widget_set_name( CBNoSound,"CBNoSound" );
+  gtk_widget_ref( CBNoSound );
+  gtk_object_set_data_full( GTK_OBJECT( Preferences ),"CBNoSound",CBNoSound,(GtkDestroyNotify)gtk_widget_unref );
+  gtk_widget_show( CBNoSound );
+  gtk_box_pack_start( GTK_BOX( vbox3 ),CBNoSound,FALSE,FALSE,0 );
+
+  hseparator2=gtk_hseparator_new();
+  gtk_widget_set_name( hseparator2,"hseparator2" );
+  gtk_widget_ref( hseparator2 );
+  gtk_object_set_data_full( GTK_OBJECT( Preferences ),"hseparator2",hseparator2,(GtkDestroyNotify)gtk_widget_unref );
+  gtk_widget_show( hseparator2 );
+  gtk_box_pack_start( GTK_BOX( vbox3 ),hseparator2,FALSE,FALSE,0 );
+  gtk_widget_set_usize( hseparator2,-2,4 );
 
- frame5 = gtk_frame_new (NULL);
- gtk_widget_set_name (frame5, "frame5");
- gtk_widget_ref (frame5);
- gtk_object_set_data_full (GTK_OBJECT (Options), "frame5", frame5,
-                           (GtkDestroyNotify) gtk_widget_unref);
- gtk_widget_show (frame5);
- gtk_container_add (GTK_CONTAINER (notebook1), frame5);
+  CBNormalize=gtk_check_button_new_with_label( MSGTR_PREFERENCES_NormalizeSound );
+  gtk_widget_set_name( CBNormalize,"CBNormalize" );
+  gtk_widget_ref( CBNormalize );
+  gtk_object_set_data_full( GTK_OBJECT( Preferences ),"CBNormalize",CBNormalize,(GtkDestroyNotify)gtk_widget_unref );
+  gtk_widget_show( CBNormalize );
+  gtk_box_pack_start( GTK_BOX( vbox3 ),CBNormalize,FALSE,FALSE,0 );
+
+  CBAudioEqualizer=gtk_check_button_new_with_label( MSGTR_PREFERENCES_EnEqualizer );
+  gtk_widget_set_name( CBAudioEqualizer,"CBAudioEqualizer" );
+  gtk_widget_ref( CBAudioEqualizer );
+  gtk_object_set_data_full( GTK_OBJECT( Preferences ),"CBAudioEqualizer",CBAudioEqualizer,(GtkDestroyNotify)gtk_widget_unref );
+  gtk_widget_show( CBAudioEqualizer );
+  gtk_box_pack_start( GTK_BOX( vbox3 ),CBAudioEqualizer,FALSE,FALSE,0 );
 
- frame6 = gtk_frame_new (NULL);
- gtk_widget_set_name (frame6, "frame6");
- gtk_widget_ref (frame6);
- gtk_object_set_data_full (GTK_OBJECT (Options), "frame6", frame6,
-                           (GtkDestroyNotify) gtk_widget_unref);
- gtk_widget_show (frame6);
- gtk_container_add (GTK_CONTAINER (frame5), frame6);
- gtk_frame_set_shadow_type (GTK_FRAME (frame6), GTK_SHADOW_NONE);
+#if 0
+  CBSurround=gtk_check_button_new_with_label( "Enable surround" );
+  gtk_widget_set_name( CBSurround,"CBSurround" );
+  gtk_widget_ref( CBSurround );
+  gtk_object_set_data_full( GTK_OBJECT( Preferences ),"CBSurround",CBSurround,(GtkDestroyNotify)gtk_widget_unref );
+  gtk_widget_show( CBSurround );
+  gtk_box_pack_start( GTK_BOX( vbox3 ),CBSurround,FALSE,FALSE,0 );
+#endif
+
+  CBExtraStereo=gtk_check_button_new_with_label( MSGTR_PREFERENCES_ExtraStereo );
+  gtk_widget_set_name( CBExtraStereo,"CBExtraStereo" );
+  gtk_widget_ref( CBExtraStereo );
+  gtk_object_set_data_full( GTK_OBJECT( Preferences ),"CBExtraStereo",CBExtraStereo,(GtkDestroyNotify)gtk_widget_unref );
+  gtk_widget_show( CBExtraStereo );
+  gtk_box_pack_start( GTK_BOX( vbox3 ),CBExtraStereo,FALSE,FALSE,0 );
+
+  hbox8=gtk_hbox_new( FALSE,0 );
+  gtk_widget_set_name( hbox8,"hbox8" );
+  gtk_widget_ref( hbox8 );
+  gtk_object_set_data_full( GTK_OBJECT( Preferences ),"hbox8",hbox8,(GtkDestroyNotify)gtk_widget_unref );
+  gtk_widget_show( hbox8 );
+  gtk_box_pack_start( GTK_BOX( vbox3 ),hbox8,FALSE,FALSE,0 );
 
- hbox1 = gtk_hbox_new (TRUE, 0);
- gtk_widget_set_name (hbox1, "hbox1");
- gtk_widget_ref (hbox1);
- gtk_object_set_data_full (GTK_OBJECT (Options), "hbox1", hbox1,
-                           (GtkDestroyNotify) gtk_widget_unref);
- gtk_widget_show (hbox1);
- gtk_container_add (GTK_CONTAINER (frame6), hbox1);
+  label17=gtk_label_new( MSGTR_PREFERENCES_Coefficient );
+  gtk_widget_set_name( label17,"label17" );
+  gtk_widget_ref( label17 );
+  gtk_object_set_data_full( GTK_OBJECT( Preferences ),"label17",label17,(GtkDestroyNotify)gtk_widget_unref );
+  gtk_widget_show( label17 );
+  gtk_box_pack_start( GTK_BOX( hbox8 ),label17,FALSE,FALSE,0 );
+  gtk_misc_set_alignment( GTK_MISC( label17 ),7.45058e-09,0.5 );
+  gtk_misc_set_padding( GTK_MISC( label17 ),20,0 );
+
+  HSExtraStereoMuladj=GTK_ADJUSTMENT( gtk_adjustment_new( 0,-10,10,0.1,0,0 ) );
+  HSExtraStereoMul=gtk_hscale_new( HSExtraStereoMuladj );
+  gtk_widget_set_name( HSExtraStereoMul,"HSExtraStereoMul" );
+  gtk_widget_ref( HSExtraStereoMul );
+  gtk_object_set_data_full( GTK_OBJECT( Preferences ),"HSExtraStereoMul",HSExtraStereoMul,(GtkDestroyNotify)gtk_widget_unref );
+  gtk_widget_show( HSExtraStereoMul );
+  gtk_box_pack_start( GTK_BOX( hbox8 ),HSExtraStereoMul,TRUE,TRUE,0 );
+  gtk_scale_set_value_pos( GTK_SCALE( HSExtraStereoMul ),GTK_POS_RIGHT );
+  gtk_scale_set_digits( GTK_SCALE( HSExtraStereoMul ),1 );
 
- opAudioFrameLabel = gtk_frame_new ("Audio");
- gtk_widget_set_name (opAudioFrameLabel, "opAudioFrameLabel");
- gtk_widget_ref (opAudioFrameLabel);
- gtk_object_set_data_full (GTK_OBJECT (Options), "opAudioFrameLabel", opAudioFrameLabel,
-                           (GtkDestroyNotify) gtk_widget_unref);
- gtk_widget_show (opAudioFrameLabel);
- gtk_box_pack_start (GTK_BOX (hbox1), opAudioFrameLabel, FALSE, FALSE, 0);
- gtk_widget_set_usize (opAudioFrameLabel, 212, -2);
- gtk_container_set_border_width (GTK_CONTAINER (opAudioFrameLabel), 3);
- gtk_frame_set_shadow_type (GTK_FRAME (opAudioFrameLabel), GTK_SHADOW_ETCHED_OUT);
+  hbox8=gtk_hbox_new( FALSE,0 );
+  gtk_widget_set_name( hbox8,"hbox8" );
+  gtk_widget_ref( hbox8 );
+  gtk_object_set_data_full( GTK_OBJECT( Preferences ),"hbox8",hbox8,(GtkDestroyNotify)gtk_widget_unref );
+  gtk_widget_show( hbox8 );
+  gtk_box_pack_start( GTK_BOX( vbox3 ),hbox8,FALSE,FALSE,0 );
+
+  label17=gtk_label_new( MSGTR_PREFERENCES_AudioDelay );
+  gtk_widget_set_name( label17,"label17" );
+  gtk_widget_ref( label17 );
+  gtk_object_set_data_full( GTK_OBJECT( Preferences ),"label17",label17,(GtkDestroyNotify)gtk_widget_unref );
+  gtk_widget_show( label17 );
+  gtk_box_pack_start( GTK_BOX( hbox8 ),label17,FALSE,FALSE,0 );
+  gtk_misc_set_alignment( GTK_MISC( label17 ),7.45058e-09,0.5 );
+  gtk_misc_set_padding( GTK_MISC( label17 ),4,0 );
+
+  HSAudioDelayadj=GTK_ADJUSTMENT( gtk_adjustment_new( 0,-100,100,0.01,0,0 ) );
+  HSAudioDelay=gtk_hscale_new( HSAudioDelayadj );
+  gtk_widget_set_name( HSAudioDelay,"HSAudioDelay" );
+  gtk_widget_ref( HSAudioDelay );
+  gtk_object_set_data_full( GTK_OBJECT( Preferences ),"HSAudioDelay",HSAudioDelay,(GtkDestroyNotify)gtk_widget_unref );
+  gtk_widget_show( HSAudioDelay );
+  gtk_box_pack_start( GTK_BOX( hbox8 ),HSAudioDelay,TRUE,TRUE,0 );
+  gtk_scale_set_value_pos( GTK_SCALE( HSAudioDelay ),GTK_POS_RIGHT );
+  gtk_scale_set_digits( GTK_SCALE( HSAudioDelay ),2 );
 
- table1 = gtk_table_new (4, 2, FALSE);
- gtk_widget_set_name (table1, "table1");
- gtk_widget_ref (table1);
- gtk_object_set_data_full (GTK_OBJECT (Options), "table1", table1,
-                           (GtkDestroyNotify) gtk_widget_unref);
- gtk_widget_show (table1);
- gtk_container_add (GTK_CONTAINER (opAudioFrameLabel), table1);
+  label1=gtk_label_new( MSGTR_PREFERENCES_Audio );
+  gtk_widget_set_name( label1,"label1" );
+  gtk_widget_ref( label1 );
+  gtk_object_set_data_full( GTK_OBJECT( Preferences ),"label1",label1,(GtkDestroyNotify)gtk_widget_unref );
+  gtk_widget_show( label1 );
+  gtk_notebook_set_tab_label( GTK_NOTEBOOK( notebook1 ),gtk_notebook_get_nth_page( GTK_NOTEBOOK( notebook1 ),0 ),label1 );
+
+  hbox2=gtk_hbox_new( FALSE,0 );
+  gtk_widget_set_name( hbox2,"hbox2" );
+  gtk_widget_ref( hbox2 );
+  gtk_object_set_data_full( GTK_OBJECT( Preferences ),"hbox2",hbox2,(GtkDestroyNotify)gtk_widget_unref );
+  gtk_widget_show( hbox2 );
+  gtk_container_add( GTK_CONTAINER( notebook1 ),hbox2 );
+
+  frame7=gtk_frame_new( NULL );
+  gtk_widget_set_name( frame7,"frame7" );
+  gtk_widget_ref( frame7 );
+  gtk_object_set_data_full( GTK_OBJECT( Preferences ),"frame7",frame7,(GtkDestroyNotify)gtk_widget_unref );
+  gtk_widget_show( frame7 );
+  gtk_box_pack_start( GTK_BOX( hbox2 ),frame7,TRUE,TRUE,0 );
+  gtk_frame_set_shadow_type( GTK_FRAME( frame7 ),GTK_SHADOW_ETCHED_OUT );
+
+  vbox4=gtk_vbox_new( FALSE,0 );
+  gtk_widget_set_name( vbox4,"vbox4" );
+  gtk_widget_ref( vbox4 );
+  gtk_object_set_data_full( GTK_OBJECT( Preferences ),"vbox4",vbox4,(GtkDestroyNotify)gtk_widget_unref );
+  gtk_widget_show( vbox4 );
+  gtk_container_add( GTK_CONTAINER( frame7 ),vbox4 );
 
- opAudioLabel = gtk_label_new ("Driver: ");
- gtk_widget_set_name (opAudioLabel, "opAudioLabel");
- gtk_widget_ref (opAudioLabel);
- gtk_object_set_data_full (GTK_OBJECT (Options), "opAudioLabel", opAudioLabel,
-                           (GtkDestroyNotify) gtk_widget_unref);
- gtk_widget_show (opAudioLabel);
- gtk_table_attach (GTK_TABLE (table1), opAudioLabel, 0, 1, 0, 1,
-                   (GtkAttachOptions) (GTK_FILL),
-                   (GtkAttachOptions) (0), 0, 0);
- gtk_widget_set_usize (opAudioLabel, 40, -2);
- gtk_misc_set_alignment (GTK_MISC (opAudioLabel), 0, 0.5);
+  scrolledwindow2=gtk_scrolled_window_new( NULL,NULL );
+  gtk_widget_set_name( scrolledwindow2,"scrolledwindow2" );
+  gtk_widget_ref( scrolledwindow2 );
+  gtk_object_set_data_full( GTK_OBJECT( Preferences ),"scrolledwindow2",scrolledwindow2,(GtkDestroyNotify)gtk_widget_unref );
+  gtk_widget_show( scrolledwindow2 );
+  gtk_box_pack_start( GTK_BOX( vbox4 ),scrolledwindow2,TRUE,TRUE,0 );
+  gtk_scrolled_window_set_policy( GTK_SCROLLED_WINDOW( scrolledwindow2 ),GTK_POLICY_AUTOMATIC,GTK_POLICY_AUTOMATIC );
+
+  CLVDrivers=gtk_clist_new( 1 );
+  gtk_widget_set_name( CLVDrivers,"CLVDrivers" );
+  gtk_widget_ref( CLVDrivers );
+  gtk_object_set_data_full( GTK_OBJECT( Preferences ),"CLVDrivers",CLVDrivers,(GtkDestroyNotify)gtk_widget_unref );
+  gtk_widget_show( CLVDrivers );
+  gtk_container_add( GTK_CONTAINER( scrolledwindow2 ),CLVDrivers );
+  gtk_clist_set_column_width( GTK_CLIST( CLVDrivers ),0,80 );
+  gtk_clist_column_titles_show( GTK_CLIST( CLVDrivers ) );
+  gtk_clist_set_shadow_type( GTK_CLIST( CLVDrivers ),GTK_SHADOW_NONE );
+
+  label7=gtk_label_new( MSGTR_PREFERENCES_AvailableDrivers );
+  gtk_widget_set_name( label7,"label7" );
+  gtk_widget_ref( label7 );
+  gtk_object_set_data_full( GTK_OBJECT( Preferences ),"label7",label7,(GtkDestroyNotify)gtk_widget_unref );
+  gtk_widget_show( label7 );
+  gtk_clist_set_column_widget( GTK_CLIST( CLVDrivers ),0,label7 );
+  gtk_misc_set_alignment( GTK_MISC( label7 ),0,0.5 );
+  gtk_misc_set_padding( GTK_MISC( label7 ),4,0 );
+
+  hbuttonbox3=gtk_hbutton_box_new();
+  gtk_widget_set_name( hbuttonbox3,"hbuttonbox3" );
+  gtk_widget_ref( hbuttonbox3 );
+  gtk_object_set_data_full( GTK_OBJECT( Preferences ),"hbuttonbox3",hbuttonbox3,(GtkDestroyNotify)gtk_widget_unref );
+  gtk_widget_show( hbuttonbox3 );
+  gtk_box_pack_start( GTK_BOX( vbox4 ),hbuttonbox3,FALSE,FALSE,0 );
+  gtk_button_box_set_child_size( GTK_BUTTON_BOX( hbuttonbox3 ),85,20 );
+
+  VConfig=gtk_button_new_with_label( MSGTR_ConfigDriver );
+  gtk_widget_set_name( VConfig,"VConfig" );
+  gtk_widget_ref( VConfig );
+  gtk_object_set_data_full( GTK_OBJECT( Preferences ),"VConfig",VConfig,(GtkDestroyNotify)gtk_widget_unref );
+  gtk_widget_show( VConfig );
+  gtk_container_add( GTK_CONTAINER( hbuttonbox3 ),VConfig );
+  GTK_WIDGET_UNSET_FLAGS( VConfig,GTK_CAN_FOCUS );
 
- opAudioDriverMenu = gtk_option_menu_new ();
- gtk_widget_set_name (opAudioDriverMenu, "opAudioDriverMenu");
- gtk_widget_ref (opAudioDriverMenu);
- gtk_object_set_data_full (GTK_OBJECT (Options), "opAudioDriverMenu", opAudioDriverMenu,
-                           (GtkDestroyNotify) gtk_widget_unref);
- gtk_widget_show (opAudioDriverMenu);
- gtk_table_attach (GTK_TABLE (table1), opAudioDriverMenu, 1, 2, 0, 1,
-                   (GtkAttachOptions) (GTK_FILL),
-                   (GtkAttachOptions) (0), 0, 0);
- gtk_widget_set_usize (opAudioDriverMenu, 159, 25);
- gtk_tooltips_set_tip (tooltips, opAudioDriverMenu, "Select audio output driver.", NULL);
- opAudioDriverMenu_menu = gtk_menu_new ();
- glade_menuitem = gtk_menu_item_new_with_label ("null");
- gtk_widget_show (glade_menuitem);
- gtk_menu_append (GTK_MENU (opAudioDriverMenu_menu), glade_menuitem);
+  frame8=gtk_frame_new( NULL );
+  gtk_widget_set_name( frame8,"frame8" );
+  gtk_widget_ref( frame8 );
+  gtk_object_set_data_full( GTK_OBJECT( Preferences ),"frame8",frame8,(GtkDestroyNotify)gtk_widget_unref );
+  gtk_widget_show( frame8 );
+  gtk_box_pack_start( GTK_BOX( hbox2 ),frame8,TRUE,TRUE,0 );
+  gtk_frame_set_shadow_type( GTK_FRAME( frame8 ),GTK_SHADOW_ETCHED_OUT );
+
+  vbox5=gtk_vbox_new( FALSE,0 );
+  gtk_widget_set_name( vbox5,"vbox5" );
+  gtk_widget_ref( vbox5 );
+  gtk_object_set_data_full( GTK_OBJECT( Preferences ),"vbox5",vbox5,(GtkDestroyNotify)gtk_widget_unref );
+  gtk_widget_show( vbox5 );
+  gtk_container_add( GTK_CONTAINER( frame8 ),vbox5 );
+  gtk_widget_set_usize( vbox5,250,-2 );
+
+  CBVideoEqualizer=gtk_check_button_new_with_label( MSGTR_PREFERENCES_VideoEqu );
+  gtk_widget_set_name( CBVideoEqualizer,"CBVideoEqualizer" );
+  gtk_widget_ref( CBVideoEqualizer );
+  gtk_object_set_data_full( GTK_OBJECT( Preferences ),"CBVideoEqualizer",CBVideoEqualizer,(GtkDestroyNotify)gtk_widget_unref );
+  gtk_widget_show( CBVideoEqualizer );
+  gtk_box_pack_start( GTK_BOX( vbox5 ),CBVideoEqualizer,FALSE,FALSE,0 );
+
+  CBDoubleBuffer=gtk_check_button_new_with_label( MSGTR_PREFERENCES_DoubleBuffer );
+  gtk_widget_set_name( CBDoubleBuffer,"CBDoubleBuffer" );
+  gtk_widget_ref( CBDoubleBuffer );
+  gtk_object_set_data_full( GTK_OBJECT( Preferences ),"CBDoubleBuffer",CBDoubleBuffer,(GtkDestroyNotify)gtk_widget_unref );
+  gtk_widget_show( CBDoubleBuffer );
+  gtk_box_pack_start( GTK_BOX( vbox5 ),CBDoubleBuffer,FALSE,FALSE,0 );
+  gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBDoubleBuffer ),TRUE );
+
+  CBDR=gtk_check_button_new_with_label( MSGTR_PREFERENCES_DirectRender );
+  gtk_widget_set_name( CBDR,"CBDR" );
+  gtk_widget_ref( CBDR );
+  gtk_object_set_data_full( GTK_OBJECT( Preferences ),"CBDR",CBDR,(GtkDestroyNotify)gtk_widget_unref );
+  gtk_widget_show( CBDR );
+  gtk_box_pack_start( GTK_BOX( vbox5 ),CBDR,FALSE,FALSE,0 );
 
- #ifdef USE_OSS_AUDIO
-  glade_menuitem = gtk_menu_item_new_with_label ("OSS");
-  gtk_widget_show (glade_menuitem);
-  gtk_menu_append (GTK_MENU (opAudioDriverMenu_menu), glade_menuitem);
- #endif
- #ifdef HAVE_ALSA5
-  glade_menuitem = gtk_menu_item_new_with_label ("ALSA 0.5.x");
-  gtk_widget_show (glade_menuitem);
-  gtk_menu_append (GTK_MENU (opAudioDriverMenu_menu), glade_menuitem);
- #endif
- #ifdef HAVE_ALSA9
-  glade_menuitem = gtk_menu_item_new_with_label ("ALSA 0.9.x");
-  gtk_widget_show (glade_menuitem);
-  gtk_menu_append (GTK_MENU (opAudioDriverMenu_menu), glade_menuitem);
- #endif
- #ifdef HAVE_ESD
-  glade_menuitem = gtk_menu_item_new_with_label ("ESD");
-  gtk_widget_show (glade_menuitem);
-  gtk_menu_append (GTK_MENU (opAudioDriverMenu_menu), glade_menuitem);
- #endif
+  CBFramedrop=gtk_check_button_new_with_label( MSGTR_PREFERENCES_FrameDrop );
+  gtk_widget_set_name( CBFramedrop,"CBFramedrop" );
+  gtk_widget_ref( CBFramedrop );
+  gtk_object_set_data_full( GTK_OBJECT( Preferences ),"CBFramedrop",CBFramedrop,(GtkDestroyNotify)gtk_widget_unref );
+  gtk_widget_show( CBFramedrop );
+  gtk_box_pack_start( GTK_BOX( vbox5 ),CBFramedrop,FALSE,FALSE,0 );
+  gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBFramedrop ),TRUE );
+
+  CBHFramedrop=gtk_check_button_new_with_label( MSGTR_PREFERENCES_HFrameDrop );
+  gtk_widget_set_name( CBHFramedrop,"CBHFramedrop" );
+  gtk_widget_ref( CBHFramedrop );
+  gtk_object_set_data_full( GTK_OBJECT( Preferences ),"CBHFramedrop",CBHFramedrop,(GtkDestroyNotify)gtk_widget_unref );
+  gtk_widget_show( CBHFramedrop );
+  gtk_box_pack_start( GTK_BOX( vbox5 ),CBHFramedrop,FALSE,FALSE,0 );
 
- gtk_option_menu_set_menu (GTK_OPTION_MENU (opAudioDriverMenu), opAudioDriverMenu_menu);
+  CBFlip=gtk_check_button_new_with_label( MSGTR_PREFERENCES_Flip );
+  gtk_widget_set_name( CBFlip,"CBFlip" );
+  gtk_widget_ref( CBFlip );
+  gtk_object_set_data_full( GTK_OBJECT( Preferences ),"CBFlip",CBFlip,(GtkDestroyNotify)gtk_widget_unref );
+  gtk_widget_show( CBFlip );
+  gtk_box_pack_start( GTK_BOX( vbox5 ),CBFlip,FALSE,FALSE,0 );
 
- opDelayLabel = gtk_label_new ("Delay:");
- gtk_widget_set_name (opDelayLabel, "opDelayLabel");
- gtk_widget_ref (opDelayLabel);
- gtk_object_set_data_full (GTK_OBJECT (Options), "opDelayLabel", opDelayLabel,
-                           (GtkDestroyNotify) gtk_widget_unref);
- gtk_widget_show (opDelayLabel);
- gtk_table_attach (GTK_TABLE (table1), opDelayLabel, 0, 1, 1, 2,
-                   (GtkAttachOptions) (GTK_FILL),
-                   (GtkAttachOptions) (0), 0, 0);
- gtk_widget_set_usize (opDelayLabel, 35, -2);
- gtk_misc_set_alignment (GTK_MISC (opDelayLabel), 0, 0.5);
+  hbox3=gtk_hbox_new( FALSE,0 );
+  gtk_widget_set_name( hbox3,"hbox3" );
+  gtk_widget_ref( hbox3 );
+  gtk_object_set_data_full( GTK_OBJECT( Preferences ),"hbox3",hbox3,(GtkDestroyNotify)gtk_widget_unref );
+  gtk_widget_show( hbox3 );
+  gtk_box_pack_start( GTK_BOX( vbox5 ),hbox3,FALSE,FALSE,0 );
+
+  label9=gtk_label_new( MSGTR_PREFERENCES_Panscan );
+  gtk_widget_set_name( label9,"label9" );
+  gtk_widget_ref( label9 );
+  gtk_object_set_data_full( GTK_OBJECT( Preferences ),"label9",label9,(GtkDestroyNotify)gtk_widget_unref );
+  gtk_widget_show( label9 );
+  gtk_box_pack_start( GTK_BOX( hbox3 ),label9,FALSE,FALSE,0 );
+  gtk_misc_set_alignment( GTK_MISC( label9 ),7.45058e-09,0.5 );
+  gtk_misc_set_padding( GTK_MISC( label9 ),4,0 );
 
- opAudioDelaySkinButton_adj = gtk_adjustment_new (0, -500, 500, 0.01, 10, 10);
- opAudioDelaySkinButton = gtk_spin_button_new (GTK_ADJUSTMENT (opAudioDelaySkinButton_adj), 1, 2);
- gtk_widget_set_name (opAudioDelaySkinButton, "opAudioDelaySkinButton");
- gtk_widget_ref (opAudioDelaySkinButton);
- gtk_object_set_data_full (GTK_OBJECT (Options), "opAudioDelaySkinButton", opAudioDelaySkinButton,
-                           (GtkDestroyNotify) gtk_widget_unref);
- gtk_widget_show (opAudioDelaySkinButton);
- gtk_table_attach (GTK_TABLE (table1), opAudioDelaySkinButton, 1, 2, 1, 2,
-                   (GtkAttachOptions) (GTK_FILL), //GTK_EXPAND |
-                   (GtkAttachOptions) (0), 0, 0);
- gtk_widget_set_usize (opAudioDelaySkinButton, 160, 25);
- gtk_tooltips_set_tip (tooltips, opAudioDelaySkinButton, "Set audio delay.", NULL);
- gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (opAudioDelaySkinButton), TRUE);
+  HSPanscanadj=GTK_ADJUSTMENT( gtk_adjustment_new( 0,0,1,0.001,0,0 ) );
+  HSPanscan=gtk_hscale_new( HSPanscanadj );
+  gtk_widget_set_name( HSPanscan,"HSPanscan" );
+  gtk_widget_ref( HSPanscan );
+  gtk_object_set_data_full( GTK_OBJECT( Preferences ),"HSPanscan",HSPanscan,(GtkDestroyNotify)gtk_widget_unref );
+  gtk_widget_show( HSPanscan );
+  gtk_box_pack_start( GTK_BOX( hbox3 ),HSPanscan,TRUE,TRUE,0 );
+  gtk_scale_set_value_pos( GTK_SCALE( HSPanscan ),GTK_POS_RIGHT );
+
+  label2=gtk_label_new( MSGTR_PREFERENCES_Video );
+  gtk_widget_set_name( label2,"label2" );
+  gtk_widget_ref( label2 );
+  gtk_object_set_data_full( GTK_OBJECT( Preferences ),"label2",label2,(GtkDestroyNotify)gtk_widget_unref );
+  gtk_widget_show( label2 );
+  gtk_notebook_set_tab_label( GTK_NOTEBOOK( notebook1 ),gtk_notebook_get_nth_page( GTK_NOTEBOOK( notebook1 ),1 ),label2 );
+
+  vbox6=gtk_vbox_new( FALSE,0 );
+  gtk_widget_set_name( vbox6,"vbox6" );
+  gtk_widget_ref( vbox6 );
+  gtk_object_set_data_full( GTK_OBJECT( Preferences ),"vbox6",vbox6,(GtkDestroyNotify)gtk_widget_unref );
+  gtk_widget_show( vbox6 );
+  gtk_container_add( GTK_CONTAINER( notebook1 ),vbox6 );
+
+  frame5=gtk_frame_new( MSGTR_PREFERENCES_FRAME_OSD_Level );
+  gtk_widget_set_name( frame5,"frame5" );
+  gtk_widget_ref( frame5 );
+  gtk_object_set_data_full( GTK_OBJECT( Preferences ),"frame5",frame5,(GtkDestroyNotify)gtk_widget_unref );
+  gtk_widget_show( frame5 );
+  gtk_box_pack_start( GTK_BOX( vbox6 ),frame5,FALSE,FALSE,0 );
+  gtk_frame_set_shadow_type( GTK_FRAME( frame5 ),GTK_SHADOW_ETCHED_OUT );
 
- hbuttonbox2 = gtk_hbutton_box_new ();
- gtk_widget_set_name (hbuttonbox2, "hbuttonbox2");
- gtk_widget_ref (hbuttonbox2);
- gtk_object_set_data_full (GTK_OBJECT (Options), "hbuttonbox2", hbuttonbox2,
-                           (GtkDestroyNotify) gtk_widget_unref);
- gtk_widget_show (hbuttonbox2);
- gtk_table_attach (GTK_TABLE (table1), hbuttonbox2, 1, 2, 3, 4,
-                   (GtkAttachOptions) (GTK_FILL),
-                   (GtkAttachOptions) (GTK_FILL), 0, 0);
- gtk_widget_set_usize (hbuttonbox2, -2, 31);
- gtk_button_box_set_layout (GTK_BUTTON_BOX (hbuttonbox2), GTK_BUTTONBOX_END);
+  vbox600=gtk_vbox_new( FALSE,0 );
+  gtk_widget_set_name( vbox600,"vbox600" );
+  gtk_widget_ref( vbox600 );
+  gtk_object_set_data_full( GTK_OBJECT( Preferences ),"vbox600",vbox600,(GtkDestroyNotify)gtk_widget_unref );
+  gtk_widget_show( vbox600 );
+  gtk_container_add( GTK_CONTAINER( frame5 ),vbox600 );
+
+  RBOSDNone=gtk_radio_button_new_with_label( OSD_group,MSGTR_PREFERENCES_None );
+  OSD_group=gtk_radio_button_group( GTK_RADIO_BUTTON( RBOSDNone ) );
+  gtk_widget_set_name( RBOSDNone,"RBOSDNone" );
+  gtk_widget_ref( RBOSDNone );
+  gtk_object_set_data_full( GTK_OBJECT( Preferences ),"RBOSDNone",RBOSDNone,(GtkDestroyNotify)gtk_widget_unref );
+  gtk_widget_show( RBOSDNone );
+  gtk_box_pack_start( GTK_BOX( vbox600 ),RBOSDNone,FALSE,FALSE,0 );
 
- opAudioConfigureButton = gtk_button_new_with_label ("Configure");
- gtk_widget_set_name (opAudioConfigureButton, "opAudioConfigureButton");
- gtk_widget_ref (opAudioConfigureButton);
- gtk_object_set_data_full (GTK_OBJECT (Options), "opAudioConfigureButton", opAudioConfigureButton,
-                           (GtkDestroyNotify) gtk_widget_unref);
- gtk_widget_show (opAudioConfigureButton);
- gtk_container_add (GTK_CONTAINER (hbuttonbox2), opAudioConfigureButton);
- gtk_widget_set_usize (opAudioConfigureButton, -2, 31);
- GTK_WIDGET_SET_FLAGS (opAudioConfigureButton, GTK_CAN_DEFAULT);
- gtk_tooltips_set_tip (tooltips, opAudioConfigureButton, "Configure selected audio driver.", NULL);
+  RBOSDTandP=gtk_radio_button_new_with_label( OSD_group,MSGTR_PREFERENCES_OSDTimer );
+  OSD_group=gtk_radio_button_group( GTK_RADIO_BUTTON( RBOSDTandP ) );
+  gtk_widget_set_name( RBOSDTandP,"RBOSDTandP" );
+  gtk_widget_ref( RBOSDTandP );
+  gtk_object_set_data_full( GTK_OBJECT( Preferences ),"RBOSDTandP",RBOSDTandP,(GtkDestroyNotify)gtk_widget_unref );
+  gtk_widget_show( RBOSDTandP );
+  gtk_box_pack_start( GTK_BOX( vbox600 ),RBOSDTandP,FALSE,FALSE,0 );
+
+  RBOSDIndicator=gtk_radio_button_new_with_label( OSD_group,MSGTR_PREFERENCES_OSDProgress );
+  OSD_group=gtk_radio_button_group( GTK_RADIO_BUTTON( RBOSDIndicator ) );
+  gtk_widget_set_name( RBOSDIndicator,"RBOSDIndicator" );
+  gtk_widget_ref( RBOSDIndicator );
+  gtk_object_set_data_full( GTK_OBJECT( Preferences ),"RBOSDIndicator",RBOSDIndicator,(GtkDestroyNotify)gtk_widget_unref );
+  gtk_widget_show( RBOSDIndicator );
+  gtk_box_pack_start( GTK_BOX( vbox600 ),RBOSDIndicator,FALSE,FALSE,0 );
+  gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( RBOSDIndicator ),TRUE );
+
+  frame6=gtk_frame_new( MSGTR_PREFERENCES_FRAME_Subtitle );
+  gtk_widget_set_name( frame6,"frame6" );
+  gtk_widget_ref( frame6 );
+  gtk_object_set_data_full( GTK_OBJECT( Preferences ),"frame6",frame6,(GtkDestroyNotify)gtk_widget_unref );
+  gtk_widget_show( frame6 );
+  gtk_box_pack_start( GTK_BOX( vbox6 ),frame6,FALSE,FALSE,0 );
+  gtk_frame_set_shadow_type( GTK_FRAME( frame6 ),GTK_SHADOW_ETCHED_OUT );
 
- frame16 = gtk_frame_new (NULL);
- gtk_widget_set_name (frame16, "frame16");
- gtk_widget_ref (frame16);
- gtk_object_set_data_full (GTK_OBJECT (Options), "frame16", frame16,
-                           (GtkDestroyNotify) gtk_widget_unref);
- gtk_widget_show (frame16);
- gtk_table_attach (GTK_TABLE (table1), frame16, 1, 2, 2, 3,
-                   (GtkAttachOptions) (GTK_FILL),
-                   (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);
- gtk_frame_set_shadow_type (GTK_FRAME (frame16), GTK_SHADOW_NONE);
+  vbox7=gtk_vbox_new( FALSE,0 );
+  gtk_widget_set_name( vbox7,"vbox7" );
+  gtk_widget_ref( vbox7 );
+  gtk_object_set_data_full( GTK_OBJECT( Preferences ),"vbox7",vbox7,(GtkDestroyNotify)gtk_widget_unref );
+  gtk_widget_show( vbox7 );
+  gtk_container_add( GTK_CONTAINER( frame6 ),vbox7 );
+#if 0
+  hbox4=gtk_hbox_new( FALSE,0 );
+  gtk_widget_set_name( hbox4,"hbox4" );
+  gtk_widget_ref( hbox4 );
+  gtk_object_set_data_full( GTK_OBJECT( Preferences ),"hbox4",hbox4,(GtkDestroyNotify)gtk_widget_unref );
+  gtk_widget_show( hbox4 );
+  gtk_box_pack_start( GTK_BOX( vbox7 ),hbox4,FALSE,FALSE,0 );
+
+  label10=gtk_label_new( MSGTR_PREFERENCES_Subtitle );
+  gtk_widget_set_name( label10,"label10" );
+  gtk_widget_ref( label10 );
+  gtk_object_set_data_full( GTK_OBJECT( Preferences ),"label10",label10,(GtkDestroyNotify)gtk_widget_unref );
+  gtk_widget_show( label10 );
+  gtk_box_pack_start( GTK_BOX( hbox4 ),label10,FALSE,FALSE,0 );
+  gtk_misc_set_alignment( GTK_MISC( label10 ),0,0.5 );
+  gtk_misc_set_padding( GTK_MISC( label10 ),4,0 );
+
+  ESubtitleName=gtk_entry_new();
+  gtk_widget_set_name( ESubtitleName,"ESubtitleName" );
+  gtk_widget_ref( ESubtitleName );
+  gtk_object_set_data_full( GTK_OBJECT( Preferences ),"ESubtitleName",ESubtitleName,(GtkDestroyNotify)gtk_widget_unref );
+  gtk_widget_show( ESubtitleName );
+  gtk_box_pack_start( GTK_BOX( hbox4 ),ESubtitleName,TRUE,TRUE,0 );
+
+  hbuttonbox4=gtk_hbutton_box_new();
+  gtk_widget_set_name( hbuttonbox4,"hbuttonbox4" );
+  gtk_widget_ref( hbuttonbox4 );
+  gtk_object_set_data_full( GTK_OBJECT( Preferences ),"hbuttonbox4",hbuttonbox4,(GtkDestroyNotify)gtk_widget_unref );
+  gtk_widget_show( hbuttonbox4 );
+  gtk_box_pack_start( GTK_BOX( hbox4 ),hbuttonbox4,FALSE,FALSE,0 );
+  gtk_container_set_border_width( GTK_CONTAINER( hbuttonbox4 ),3 );
+  gtk_button_box_set_spacing( GTK_BUTTON_BOX( hbuttonbox4 ),0 );
+  gtk_button_box_set_child_size( GTK_BUTTON_BOX( hbuttonbox4 ),85,20 );
 
- OpVideoFrameLabel = gtk_frame_new ("Video");
- gtk_widget_set_name (OpVideoFrameLabel, "OpVideoFrameLabel");
- gtk_widget_ref (OpVideoFrameLabel);
- gtk_object_set_data_full (GTK_OBJECT (Options), "OpVideoFrameLabel", OpVideoFrameLabel,
-                           (GtkDestroyNotify) gtk_widget_unref);
- gtk_widget_show (OpVideoFrameLabel);
- gtk_box_pack_start (GTK_BOX (hbox1), OpVideoFrameLabel, FALSE, FALSE, 0);
- gtk_widget_set_usize (OpVideoFrameLabel, 212, -2);
- gtk_container_set_border_width (GTK_CONTAINER (OpVideoFrameLabel), 3);
- gtk_frame_set_shadow_type (GTK_FRAME (OpVideoFrameLabel), GTK_SHADOW_ETCHED_OUT);
+  BLoadSubtitle=gtk_button_new_with_label( MSGTR_Browse );
+  gtk_widget_set_name( BLoadSubtitle,"BLoadSubtitle" );
+  gtk_widget_ref( BLoadSubtitle );
+  gtk_object_set_data_full( GTK_OBJECT( Preferences ),"BLoadSubtitle",BLoadSubtitle,(GtkDestroyNotify)gtk_widget_unref );
+  gtk_widget_show( BLoadSubtitle );
+  gtk_container_add( GTK_CONTAINER( hbuttonbox4 ),BLoadSubtitle );
+  GTK_WIDGET_UNSET_FLAGS( BLoadSubtitle,GTK_CAN_FOCUS );
+#endif
+  vbox8=gtk_vbox_new( FALSE,0 );
+  gtk_widget_set_name( vbox8,"vbox8" );
+  gtk_widget_ref( vbox8 );
+  gtk_object_set_data_full( GTK_OBJECT( Preferences ),"vbox8",vbox8,(GtkDestroyNotify)gtk_widget_unref );
+  gtk_widget_show( vbox8 );
+  gtk_box_pack_start( GTK_BOX( vbox7 ),vbox8,FALSE,FALSE,0 );
+
+  table1=gtk_table_new( 3,2,FALSE );
+  gtk_widget_set_name( table1,"table1" );
+  gtk_widget_ref( table1 );
+  gtk_object_set_data_full( GTK_OBJECT( Preferences ),"table1",table1,(GtkDestroyNotify)gtk_widget_unref );
+  gtk_widget_show( table1 );
+  gtk_box_pack_start( GTK_BOX( vbox8 ),table1,FALSE,FALSE,0 );
 
- table2 = gtk_table_new (5, 2, FALSE);
- gtk_widget_set_name (table2, "table2");
- gtk_widget_ref (table2);
- gtk_object_set_data_full (GTK_OBJECT (Options), "table2", table2,
-                           (GtkDestroyNotify) gtk_widget_unref);
- gtk_widget_show (table2);
- gtk_container_add (GTK_CONTAINER (OpVideoFrameLabel), table2);
+  label11=gtk_label_new( MSGTR_PREFERENCES_SUB_Delay );
+  gtk_widget_set_name( label11,"label11" );
+  gtk_widget_ref( label11 );
+  gtk_object_set_data_full( GTK_OBJECT( Preferences ),"label11",label11,(GtkDestroyNotify)gtk_widget_unref );
+  gtk_widget_show( label11 );
+  gtk_table_attach( GTK_TABLE( table1 ),label11,0,1,0,1,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 );
+  gtk_misc_set_alignment( GTK_MISC( label11 ),0,0.5 );
+  gtk_misc_set_padding( GTK_MISC( label11 ),4,0 );
 
- opVideoLabel = gtk_label_new ("Driver:");
- gtk_widget_set_name (opVideoLabel, "opVideoLabel");
- gtk_widget_ref (opVideoLabel);
- gtk_object_set_data_full (GTK_OBJECT (Options), "opVideoLabel", opVideoLabel,
-                           (GtkDestroyNotify) gtk_widget_unref);
- gtk_widget_show (opVideoLabel);
- gtk_table_attach (GTK_TABLE (table2), opVideoLabel, 0, 1, 0, 1,
-                   (GtkAttachOptions) (GTK_FILL),
-                   (GtkAttachOptions) (0), 0, 0);
- gtk_widget_set_usize (opVideoLabel, 35, -2);
- gtk_misc_set_alignment (GTK_MISC (opVideoLabel), 0, 0.5);
+  label12=gtk_label_new( MSGTR_PREFERENCES_SUB_FPS );
+  gtk_widget_set_name( label12,"label12" );
+  gtk_widget_ref( label12 );
+  gtk_object_set_data_full( GTK_OBJECT( Preferences ),"label12",label12,(GtkDestroyNotify)gtk_widget_unref );
+  gtk_widget_show( label12 );
+  gtk_table_attach( GTK_TABLE( table1 ),label12,0,1,1,2,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 );
+  gtk_misc_set_alignment( GTK_MISC( label12 ),0,0.5 );
+  gtk_misc_set_padding( GTK_MISC( label12 ),4,0 );
+
+  HSSubDelayadj=GTK_ADJUSTMENT( gtk_adjustment_new( 0,-10.0,10,0.01,0,0 ) );
+  HSSubDelay=gtk_hscale_new( HSSubDelayadj );
+  gtk_widget_set_name( HSSubDelay,"HSSubDelay" );
+  gtk_widget_ref( HSSubDelay );
+  gtk_object_set_data_full( GTK_OBJECT( Preferences ),"HSSubDelay",HSSubDelay,(GtkDestroyNotify)gtk_widget_unref );
+  gtk_widget_show( HSSubDelay );
+  gtk_table_attach( GTK_TABLE( table1 ),HSSubDelay,1,2,0,1,(GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 );
+  gtk_scale_set_value_pos( GTK_SCALE( HSSubDelay ),GTK_POS_RIGHT );
 
- opVideoMenu = gtk_option_menu_new ();
- gtk_widget_set_name (opVideoMenu, "opVideoMenu");
- gtk_widget_ref (opVideoMenu);
- gtk_object_set_data_full (GTK_OBJECT (Options), "opVideoMenu", opVideoMenu,
-                           (GtkDestroyNotify) gtk_widget_unref);
- gtk_widget_show (opVideoMenu);
- gtk_table_attach (GTK_TABLE (table2), opVideoMenu, 1, 2, 0, 1,
-                   (GtkAttachOptions) (GTK_FILL),
-                   (GtkAttachOptions) (0), 0, 0);
- gtk_widget_set_usize (opVideoMenu, 137, 25);
- gtk_tooltips_set_tip (tooltips, opVideoMenu, "Select video output driver.", NULL);
- opVideoMenu_menu = gtk_menu_new ();
- #if defined( HAVE_X11 ) && defined( HAVE_MGA )
-  glade_menuitem = gtk_menu_item_new_with_label ("xmga");
-  gtk_widget_show (glade_menuitem);
-  gtk_menu_append (GTK_MENU (opVideoMenu_menu), glade_menuitem);
- #endif
- #ifdef HAVE_XV
-  glade_menuitem = gtk_menu_item_new_with_label ("xv");
-  gtk_widget_show (glade_menuitem);
-  gtk_menu_append (GTK_MENU (opVideoMenu_menu), glade_menuitem);
- #endif
- #ifdef HAVE_X11
-  glade_menuitem = gtk_menu_item_new_with_label ("x11");
-  gtk_widget_show (glade_menuitem);
-  gtk_menu_append (GTK_MENU (opVideoMenu_menu), glade_menuitem);
- #endif
- #ifdef HAVE_PNG
-  glade_menuitem = gtk_menu_item_new_with_label ("png");
-  gtk_widget_show (glade_menuitem);
-  gtk_menu_append (GTK_MENU (opVideoMenu_menu), glade_menuitem);
- #endif
- glade_menuitem = gtk_menu_item_new_with_label ("null");
- gtk_widget_show (glade_menuitem);
- gtk_menu_append (GTK_MENU (opVideoMenu_menu), glade_menuitem);
- gtk_option_menu_set_menu (GTK_OPTION_MENU (opVideoMenu), opVideoMenu_menu);
+  label13=gtk_label_new( MSGTR_PREFERENCES_SUB_POS );
+  gtk_widget_set_name( label13,"label13" );
+  gtk_widget_ref( label13 );
+  gtk_object_set_data_full( GTK_OBJECT( Preferences ),"label13",label13,(GtkDestroyNotify)gtk_widget_unref );
+  gtk_widget_show( label13 );
+  gtk_table_attach( GTK_TABLE( table1 ),label13,0,1,2,3,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 );
+  gtk_misc_set_alignment( GTK_MISC( label13 ),0,0.5 );
+  gtk_misc_set_padding( GTK_MISC( label13 ),4,0 );
+
+  HSSubPositionadj=GTK_ADJUSTMENT( gtk_adjustment_new( 100,0,100,1,0,0 ) );
+  HSSubPosition=gtk_hscale_new( HSSubPositionadj );
+  gtk_widget_set_name( HSSubPosition,"HSSubPosition" );
+  gtk_widget_ref( HSSubPosition );
+  gtk_object_set_data_full( GTK_OBJECT( Preferences ),"HSSubPosition",HSSubPosition,(GtkDestroyNotify)gtk_widget_unref );
+  gtk_widget_show( HSSubPosition );
+  gtk_table_attach( GTK_TABLE( table1 ),HSSubPosition,1,2,2,3,(GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 );
+  gtk_scale_set_value_pos( GTK_SCALE( HSSubPosition ),GTK_POS_RIGHT );
+  gtk_scale_set_digits( GTK_SCALE( HSSubPosition ),0 );
+
+  HSSubFPSadj=GTK_ADJUSTMENT( gtk_adjustment_new( 0,0,100,0.01,0,0 ) );
+  HSSubFPS=gtk_hscale_new( HSSubFPSadj );
+  gtk_widget_set_name( HSSubFPS,"HSSubFPS" );
+  gtk_widget_ref( HSSubFPS );
+  gtk_object_set_data_full( GTK_OBJECT( Preferences ),"HSSubFPS",HSSubFPS,(GtkDestroyNotify)gtk_widget_unref );
+  gtk_widget_show( HSSubFPS );
+  gtk_table_attach( GTK_TABLE( table1 ),HSSubFPS,1,2,1,2,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 );
+  gtk_scale_set_value_pos( GTK_SCALE( HSSubFPS ),GTK_POS_RIGHT );
+
+  vbox9=gtk_vbox_new( FALSE,0 );
+  gtk_widget_set_name( vbox9,"vbox9" );
+  gtk_widget_ref( vbox9 );
+  gtk_object_set_data_full( GTK_OBJECT( Preferences ),"vbox9",vbox9,(GtkDestroyNotify)gtk_widget_unref );
+  gtk_widget_show( vbox9 );
+  gtk_box_pack_start( GTK_BOX( vbox8 ),vbox9,FALSE,FALSE,0 );
+
+  CBNoAutoSub=gtk_check_button_new_with_label( MSGTR_PREFERENCES_SUB_AutoLoad );
+  gtk_widget_set_name( CBNoAutoSub,"CBNoAutoSub" );
+  gtk_widget_ref( CBNoAutoSub );
+  gtk_object_set_data_full( GTK_OBJECT( Preferences ),"CBNoAutoSub",CBNoAutoSub,(GtkDestroyNotify)gtk_widget_unref );
+  gtk_widget_show( CBNoAutoSub );
+  gtk_box_pack_start( GTK_BOX( vbox9 ),CBNoAutoSub,FALSE,FALSE,0 );
+
+  CBSubUnicode=gtk_check_button_new_with_label( MSGTR_PREFERENCES_SUB_Unicode );
+  gtk_widget_set_name( CBSubUnicode,"CBSubUnicode" );
+  gtk_widget_ref( CBSubUnicode );
+  gtk_object_set_data_full( GTK_OBJECT( Preferences ),"CBSubUnicode",CBSubUnicode,(GtkDestroyNotify)gtk_widget_unref );
+  gtk_widget_show( CBSubUnicode );
+  gtk_box_pack_start( GTK_BOX( vbox9 ),CBSubUnicode,FALSE,FALSE,0 );
+
+  CBDumpMPSub=gtk_check_button_new_with_label( MSGTR_PREFERENCES_SUB_MPSUB );
+  gtk_widget_set_name( CBDumpMPSub,"CBDumpMPSub" );
+  gtk_widget_ref( CBDumpMPSub );
+  gtk_object_set_data_full( GTK_OBJECT( Preferences ),"CBDumpMPSub",CBDumpMPSub,(GtkDestroyNotify)gtk_widget_unref );
+  gtk_widget_show( CBDumpMPSub );
+  gtk_box_pack_start( GTK_BOX( vbox9 ),CBDumpMPSub,FALSE,FALSE,0 );
+
+  CBDumpSrt=gtk_check_button_new_with_label( MSGTR_PREFERENCES_SUB_SRT );
+  gtk_widget_set_name( CBDumpSrt,"CBDumpSrt" );
+  gtk_widget_ref( CBDumpSrt );
+  gtk_object_set_data_full( GTK_OBJECT( Preferences ),"CBDumpSrt",CBDumpSrt,(GtkDestroyNotify)gtk_widget_unref );
+  gtk_widget_show( CBDumpSrt );
+  gtk_box_pack_start( GTK_BOX( vbox9 ),CBDumpSrt,FALSE,FALSE,0 );
+
+  frame12=gtk_frame_new( MSGTR_PREFERENCES_FRAME_Font );
+  gtk_widget_set_name( frame12,"frame12" );
+  gtk_widget_ref( frame12 );
+  gtk_object_set_data_full( GTK_OBJECT( Preferences ),"frame12",frame12,(GtkDestroyNotify)gtk_widget_unref );
+  gtk_widget_show( frame12 );
+  gtk_box_pack_start( GTK_BOX( vbox6 ),frame12,TRUE,TRUE,0 );
+  gtk_frame_set_shadow_type( GTK_FRAME( frame12 ),GTK_SHADOW_ETCHED_OUT );
 
- opOsdCheckButton = gtk_check_button_new_with_label ("");
- gtk_widget_set_name (opOsdCheckButton, "opOsdCheckButton");
- gtk_widget_ref (opOsdCheckButton);
- gtk_object_set_data_full (GTK_OBJECT (Options), "opOsdCheckButton", opOsdCheckButton,
-                           (GtkDestroyNotify) gtk_widget_unref);
- gtk_widget_show (opOsdCheckButton);
- gtk_table_attach (GTK_TABLE (table2), opOsdCheckButton, 1, 2, 1, 2,
-                   (GtkAttachOptions) (GTK_FILL),
-                   (GtkAttachOptions) (0), 0, 0);
- gtk_widget_set_usize (opOsdCheckButton, -2, 24);
- gtk_tooltips_set_tip (tooltips, opOsdCheckButton, "On/off OSD.", NULL);
+  vbox603=gtk_vbox_new( FALSE,0 );
+  gtk_widget_set_name( vbox603,"vbox603" );
+  gtk_widget_ref( vbox603 );
+  gtk_object_set_data_full( GTK_OBJECT( Preferences ),"vbox603",vbox603,(GtkDestroyNotify)gtk_widget_unref );
+  gtk_widget_show( vbox603 );
+  gtk_container_add( GTK_CONTAINER( frame12 ),vbox603 );
+
+  hbox6=gtk_hbox_new( FALSE,0 );
+  gtk_widget_set_name( hbox6,"hbox6" );
+  gtk_widget_ref( hbox6 );
+  gtk_object_set_data_full( GTK_OBJECT( Preferences ),"hbox6",hbox6,(GtkDestroyNotify)gtk_widget_unref );
+  gtk_widget_show( hbox6 );
+  gtk_box_pack_start( GTK_BOX( vbox603 ),hbox6,FALSE,FALSE,0 );
+
+  label15=gtk_label_new( MSGTR_PREFERENCES_Font );
+  gtk_widget_set_name( label15,"label15" );
+  gtk_widget_ref( label15 );
+  gtk_object_set_data_full( GTK_OBJECT( Preferences ),"label15",label15,(GtkDestroyNotify)gtk_widget_unref );
+  gtk_widget_show( label15 );
+  gtk_box_pack_start( GTK_BOX( hbox6 ),label15,FALSE,FALSE,0 );
+  gtk_misc_set_alignment( GTK_MISC( label15 ),0,0.5 );
+  gtk_misc_set_padding( GTK_MISC( label15 ),4,0 );
+
+  prEFontName=gtk_entry_new();
+  gtk_widget_set_name( prEFontName,"prEFontName" );
+  gtk_widget_ref( prEFontName );
+  gtk_object_set_data_full( GTK_OBJECT( Preferences ),"prEFontName",prEFontName,(GtkDestroyNotify)gtk_widget_unref );
+  gtk_widget_show( prEFontName );
+  gtk_box_pack_start( GTK_BOX( hbox6 ),prEFontName,TRUE,TRUE,0 );
+
+  hbuttonbox5=gtk_hbutton_box_new();
+  gtk_widget_set_name( hbuttonbox5,"hbuttonbox5" );
+  gtk_widget_ref( hbuttonbox5 );
+  gtk_object_set_data_full( GTK_OBJECT( Preferences ),"hbuttonbox5",hbuttonbox5,(GtkDestroyNotify)gtk_widget_unref );
+  gtk_widget_show( hbuttonbox5 );
+  gtk_box_pack_start( GTK_BOX( hbox6 ),hbuttonbox5,FALSE,FALSE,0 );
+  gtk_container_set_border_width( GTK_CONTAINER( hbuttonbox5 ),3 );
+  gtk_button_box_set_spacing( GTK_BUTTON_BOX( hbuttonbox5 ),0 );
+  gtk_button_box_set_child_size( GTK_BUTTON_BOX( hbuttonbox5 ),85,20 );
+  gtk_button_box_set_child_ipadding( GTK_BUTTON_BOX( hbuttonbox5 ),0,0 );
 
- hbuttonbox3 = gtk_hbutton_box_new ();
- gtk_widget_set_name (hbuttonbox3, "hbuttonbox3");
- gtk_widget_ref (hbuttonbox3);
- gtk_object_set_data_full (GTK_OBJECT (Options), "hbuttonbox3", hbuttonbox3,
-                           (GtkDestroyNotify) gtk_widget_unref);
- gtk_widget_show (hbuttonbox3);
- gtk_table_attach (GTK_TABLE (table2), hbuttonbox3, 1, 2, 4, 5,
-                   (GtkAttachOptions) (GTK_FILL),
-                   (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);
- gtk_widget_set_usize (hbuttonbox3, -2, 31);
- gtk_button_box_set_layout (GTK_BUTTON_BOX (hbuttonbox3), GTK_BUTTONBOX_END);
+  BLoadFont=gtk_button_new_with_label( MSGTR_Browse );
+  gtk_widget_set_name( BLoadFont,"BLoadFont" );
+  gtk_widget_ref( BLoadFont );
+  gtk_object_set_data_full( GTK_OBJECT( Preferences ),"BLoadFont",BLoadFont,(GtkDestroyNotify)gtk_widget_unref );
+  gtk_widget_show( BLoadFont );
+  gtk_container_add( GTK_CONTAINER( hbuttonbox5 ),BLoadFont );
+  GTK_WIDGET_UNSET_FLAGS( BLoadFont,GTK_CAN_FOCUS );
+
+  hbox7=gtk_hbox_new( FALSE,0 );
+  gtk_widget_set_name( hbox7,"hbox7" );
+  gtk_widget_ref( hbox7 );
+  gtk_object_set_data_full( GTK_OBJECT( Preferences ),"hbox7",hbox7,(GtkDestroyNotify)gtk_widget_unref );
+  gtk_widget_show( hbox7 );
+  gtk_box_pack_start( GTK_BOX( vbox603 ),hbox7,FALSE,FALSE,0 );
 
- opVideoConfButton = gtk_button_new_with_label ("Configure");
- gtk_widget_set_name (opVideoConfButton, "opVideoConfButton");
- gtk_widget_ref (opVideoConfButton);
- gtk_object_set_data_full (GTK_OBJECT (Options), "opVideoConfButton", opVideoConfButton,
-                           (GtkDestroyNotify) gtk_widget_unref);
- gtk_widget_show (opVideoConfButton);
- gtk_container_add (GTK_CONTAINER (hbuttonbox3), opVideoConfButton);
- gtk_widget_set_usize (opVideoConfButton, -2, 31);
- GTK_WIDGET_SET_FLAGS (opVideoConfButton, GTK_CAN_DEFAULT);
- gtk_tooltips_set_tip (tooltips, opVideoConfButton, "Configure selected video driver.", NULL);
+  label16=gtk_label_new( MSGTR_PREFERENCES_FontFactor );
+  gtk_widget_set_name( label16,"label16" );
+  gtk_widget_ref( label16 );
+  gtk_object_set_data_full( GTK_OBJECT( Preferences ),"label16",label16,(GtkDestroyNotify)gtk_widget_unref );
+  gtk_widget_show( label16 );
+  gtk_box_pack_start( GTK_BOX( hbox7 ),label16,FALSE,FALSE,0 );
+  gtk_misc_set_alignment( GTK_MISC( label16 ),7.45058e-09,0.5 );
+  gtk_misc_set_padding( GTK_MISC( label16 ),4,0 );
+
+  HSFontFactoradj=GTK_ADJUSTMENT( gtk_adjustment_new( 0,0,10,0.05,0,0 ) );
+  HSFontFactor=gtk_hscale_new( HSFontFactoradj );
+  gtk_widget_set_name( HSFontFactor,"HSFontFactor" );
+  gtk_widget_ref( HSFontFactor );
+  gtk_object_set_data_full( GTK_OBJECT( Preferences ),"HSFontFactor",HSFontFactor,(GtkDestroyNotify)gtk_widget_unref );
+  gtk_widget_show( HSFontFactor );
+  gtk_box_pack_start( GTK_BOX( hbox7 ),HSFontFactor,TRUE,TRUE,0 );
+  gtk_scale_set_value_pos( GTK_SCALE( HSFontFactor ),GTK_POS_RIGHT );
+  gtk_scale_set_digits( GTK_SCALE( HSFontFactor ),2 );
+
+  label3=gtk_label_new( "Subtitle & OSD" );
+  gtk_widget_set_name( label3,"label3" );
+  gtk_widget_ref( label3 );
+  gtk_object_set_data_full( GTK_OBJECT( Preferences ),"label3",label3,(GtkDestroyNotify)gtk_widget_unref );
+  gtk_widget_show( label3 );
+  gtk_notebook_set_tab_label( GTK_NOTEBOOK( notebook1 ),gtk_notebook_get_nth_page( GTK_NOTEBOOK( notebook1 ),2 ),label3 );
 
- opOSDLabel = gtk_label_new ("OSD:");
- gtk_widget_set_name (opOSDLabel, "opOSDLabel");
- gtk_widget_ref (opOSDLabel);
- gtk_object_set_data_full (GTK_OBJECT (Options), "opOSDLabel", opOSDLabel,
-                           (GtkDestroyNotify) gtk_widget_unref);
- gtk_widget_show (opOSDLabel);
- gtk_table_attach (GTK_TABLE (table2), opOSDLabel, 0, 1, 1, 2,
-                   (GtkAttachOptions) (GTK_FILL),
-                   (GtkAttachOptions) (0), 0, 0);
- gtk_widget_set_usize (opOSDLabel, 35, -2);
- gtk_misc_set_alignment (GTK_MISC (opOSDLabel), 0, 0.5);
+  vbox601=gtk_vbox_new( FALSE,0 );
+  gtk_widget_set_name( vbox601,"vbox601" );
+  gtk_widget_ref( vbox601 );
+  gtk_object_set_data_full( GTK_OBJECT( Preferences ),"vbox601",vbox601,(GtkDestroyNotify)gtk_widget_unref );
+  gtk_widget_show( vbox601 );
+  gtk_container_add( GTK_CONTAINER( notebook1 ),vbox601 );
+
+  frame11=gtk_frame_new( MSGTR_PREFERENCES_FRAME_PostProcess );
+  gtk_widget_set_name( frame11,"frame11" );
+  gtk_widget_ref( frame11 );
+  gtk_object_set_data_full( GTK_OBJECT( Preferences ),"frame11",frame11,(GtkDestroyNotify)gtk_widget_unref );
+  gtk_widget_show( frame11 );
+  gtk_box_pack_start( GTK_BOX( vbox601 ),frame11,FALSE,FALSE,0 );
+  gtk_frame_set_shadow_type( GTK_FRAME( frame11 ),GTK_SHADOW_ETCHED_OUT );
+
+  vbox602=gtk_vbox_new( FALSE,0 );
+  gtk_widget_set_name( vbox602,"vbox602" );
+  gtk_widget_ref( vbox602 );
+  gtk_object_set_data_full( GTK_OBJECT( Preferences ),"vbox602",vbox602,(GtkDestroyNotify)gtk_widget_unref );
+  gtk_widget_show( vbox602 );
+  gtk_container_add( GTK_CONTAINER( frame11 ),vbox602 );
+
+  CBPostprocess=gtk_check_button_new_with_label( MSGTR_PREFERENCES_PostProcess );
+  gtk_widget_set_name( CBPostprocess,"CBPostprocess" );
+  gtk_widget_ref( CBPostprocess );
+  gtk_object_set_data_full( GTK_OBJECT( Preferences ),"CBPostprocess",CBPostprocess,(GtkDestroyNotify)gtk_widget_unref );
+  gtk_widget_show( CBPostprocess );
+  gtk_box_pack_start( GTK_BOX( vbox602 ),CBPostprocess,FALSE,FALSE,0 );
+
+  hbox5=gtk_hbox_new( FALSE,0 );
+  gtk_widget_set_name( hbox5,"hbox5" );
+  gtk_widget_ref( hbox5 );
+  gtk_object_set_data_full( GTK_OBJECT( Preferences ),"hbox5",hbox5,(GtkDestroyNotify)gtk_widget_unref );
+  gtk_widget_show( hbox5 );
+  gtk_box_pack_start( GTK_BOX( vbox602 ),hbox5,FALSE,FALSE,0 );
 
- label5 = gtk_label_new ("OSD level:");
- gtk_widget_set_name (label5, "label5");
- gtk_widget_ref (label5);
- gtk_object_set_data_full (GTK_OBJECT (Options), "label5", label5,
-                           (GtkDestroyNotify) gtk_widget_unref);
- gtk_widget_show (label5);
- gtk_table_attach (GTK_TABLE (table2), label5, 0, 1, 2, 3,
-                   (GtkAttachOptions) (GTK_FILL),
-                   (GtkAttachOptions) (0), 0, 0);
- gtk_widget_set_usize (label5, 63, -2);
- gtk_misc_set_alignment (GTK_MISC (label5), 0, 0.5);
+  label14=gtk_label_new( MSGTR_PREFERENCES_AutoQuality );
+  gtk_widget_set_name( label14,"label14" );
+  gtk_widget_ref( label14 );
+  gtk_object_set_data_full( GTK_OBJECT( Preferences ),"label14",label14,(GtkDestroyNotify)gtk_widget_unref );
+  gtk_widget_show( label14 );
+  gtk_box_pack_start( GTK_BOX( hbox5 ),label14,FALSE,FALSE,0 );
+  gtk_misc_set_alignment( GTK_MISC( label14 ),7.45058e-09,0.5 );
+  gtk_misc_set_padding( GTK_MISC( label14 ),4,0 );
 
- opOSDLevelSpinButton_adj = gtk_adjustment_new (0, 0, 2, 1, 10, 10);
- opOSDLevelSpinButton = gtk_spin_button_new (GTK_ADJUSTMENT (opOSDLevelSpinButton_adj), 1, 0);
- gtk_widget_set_name (opOSDLevelSpinButton, "opOSDLevelSpinButton");
- gtk_widget_ref (opOSDLevelSpinButton);
- gtk_object_set_data_full (GTK_OBJECT (Options), "opOSDLevelSpinButton", opOSDLevelSpinButton,
-                           (GtkDestroyNotify) gtk_widget_unref);
- gtk_widget_show (opOSDLevelSpinButton);
- gtk_table_attach (GTK_TABLE (table2), opOSDLevelSpinButton, 1, 2, 2, 3,
-                   (GtkAttachOptions) (GTK_FILL),
-                   (GtkAttachOptions) (0), 0, 0);
- gtk_widget_set_usize (opOSDLevelSpinButton, 136, 25);
- gtk_tooltips_set_tip (tooltips, opOSDLevelSpinButton, "Set OSD level.", NULL);
- gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (opOSDLevelSpinButton), TRUE);
+  HSPPQualityadj=GTK_ADJUSTMENT( gtk_adjustment_new( 0,0,100,0,0,0 ) );
+  HSPPQuality=gtk_hscale_new( HSPPQualityadj );
+  gtk_widget_set_name( HSPPQuality,"HSPPQuality" );
+  gtk_widget_ref( HSPPQuality );
+  gtk_object_set_data_full( GTK_OBJECT( Preferences ),"HSPPQuality",HSPPQuality,(GtkDestroyNotify)gtk_widget_unref );
+  gtk_widget_show( HSPPQuality );
+  gtk_box_pack_start( GTK_BOX( hbox5 ),HSPPQuality,TRUE,TRUE,0 );
+  gtk_scale_set_value_pos( GTK_SCALE( HSPPQuality ),GTK_POS_RIGHT );
+  gtk_scale_set_digits( GTK_SCALE( HSPPQuality ),0 );
+
+  frame11=gtk_frame_new( MSGTR_PREFERENCES_FRAME_CodecDemuxer );
+  gtk_widget_set_name( frame11,"frame11" );
+  gtk_widget_ref( frame11 );
+  gtk_object_set_data_full( GTK_OBJECT( Preferences ),"frame11",frame11,(GtkDestroyNotify)gtk_widget_unref );
+  gtk_widget_show( frame11 );
+  gtk_box_pack_start( GTK_BOX( vbox601 ),frame11,FALSE,FALSE,0 );
+  gtk_frame_set_shadow_type( GTK_FRAME( frame11 ),GTK_SHADOW_ETCHED_OUT );
+
+  frame12=gtk_frame_new( NULL );
+  gtk_widget_set_name( frame12,"frame12" );
+  gtk_widget_ref( frame12 );
+  gtk_object_set_data_full( GTK_OBJECT( Preferences ),"frame12",frame12,(GtkDestroyNotify)gtk_widget_unref );
+  gtk_widget_show( frame12 );
+  gtk_container_add( GTK_CONTAINER( frame11 ),frame12 );
+  gtk_container_set_border_width( GTK_CONTAINER( frame12 ),0 );
+  gtk_frame_set_shadow_type( GTK_FRAME( frame12 ),GTK_SHADOW_NONE );
 
- frame17 = gtk_frame_new (NULL);
- gtk_widget_set_name (frame17, "frame17");
- gtk_widget_ref (frame17);
- gtk_object_set_data_full (GTK_OBJECT (Options), "frame17", frame17,
-                           (GtkDestroyNotify) gtk_widget_unref);
- gtk_widget_show (frame17);
- gtk_table_attach (GTK_TABLE (table2), frame17, 1, 2, 3, 4,
-                   (GtkAttachOptions) (GTK_FILL),
-                   (GtkAttachOptions) (GTK_FILL), 0, 0);
- gtk_widget_set_usize (frame17, -2, 40);
- gtk_frame_set_shadow_type (GTK_FRAME (frame17), GTK_SHADOW_NONE);
+  vbox602=gtk_vbox_new( FALSE,0 );
+  gtk_widget_set_name( vbox602,"vbox602" );
+  gtk_widget_ref( vbox602 );
+  gtk_object_set_data_full( GTK_OBJECT( Preferences ),"vbox602",vbox602,(GtkDestroyNotify)gtk_widget_unref );
+  gtk_widget_show( vbox602 );
+  gtk_container_add( GTK_CONTAINER( frame12 ),vbox602 );
+
+  CBNonInterlaved=gtk_check_button_new_with_label( MSGTR_PREFERENCES_NI );
+  gtk_widget_set_name( CBNonInterlaved,"CBNonInterlaved" );
+  gtk_widget_ref( CBNonInterlaved );
+  gtk_object_set_data_full( GTK_OBJECT( Preferences ),"CBNonInterlaved",CBNonInterlaved,(GtkDestroyNotify)gtk_widget_unref );
+  gtk_widget_show( CBNonInterlaved );
+  gtk_box_pack_start( GTK_BOX( vbox602 ),CBNonInterlaved,FALSE,FALSE,0 );
 
- opAudio = gtk_label_new ("Audio & Video");
- gtk_widget_set_name (opAudio, "opAudio");
- gtk_widget_ref (opAudio);
- gtk_object_set_data_full (GTK_OBJECT (Options), "opAudio", opAudio,
-                           (GtkDestroyNotify) gtk_widget_unref);
- gtk_widget_show (opAudio);
- gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook1), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook1), 0), opAudio);
- gtk_widget_set_usize (opAudio, 80, -2);
+  CBIndex=gtk_check_button_new_with_label( MSGTR_PREFERENCES_IDX );
+  gtk_widget_set_name( CBIndex,"CBIndex" );
+  gtk_widget_ref( CBIndex );
+  gtk_object_set_data_full( GTK_OBJECT( Preferences ),"CBIndex",CBIndex,(GtkDestroyNotify)gtk_widget_unref );
+  gtk_widget_show( CBIndex );
+  gtk_box_pack_start( GTK_BOX( vbox602 ),CBIndex,FALSE,FALSE,0 );
+
+  hbox5=gtk_hbox_new( FALSE,0 );
+  gtk_widget_set_name( hbox5,"hbox5" );
+  gtk_widget_ref( hbox5 );
+  gtk_object_set_data_full( GTK_OBJECT( Preferences ),"hbox5",hbox5,(GtkDestroyNotify)gtk_widget_unref );
+  gtk_widget_show( hbox5 );
+  gtk_box_pack_start( GTK_BOX( vbox602 ),hbox5,FALSE,FALSE,0 );
+
+  label16=gtk_label_new( MSGTR_PREFERENCES_VideoCodecFamily );
+  gtk_widget_set_name( label16,"label16" );
+  gtk_widget_ref( label16 );
+  gtk_object_set_data_full( GTK_OBJECT( Preferences ),"label16",label16,(GtkDestroyNotify)gtk_widget_unref );
+  gtk_widget_show( label16 );
+  gtk_box_pack_start( GTK_BOX( hbox5 ),label16,FALSE,FALSE,0 );
+  gtk_misc_set_alignment( GTK_MISC( label16 ),7.45058e-09,0.5 );
+  gtk_misc_set_padding( GTK_MISC( label16 ),4,0 );
 
- frame11 = gtk_frame_new (NULL);
- gtk_widget_set_name (frame11, "frame11");
- gtk_widget_ref (frame11);
- gtk_object_set_data_full (GTK_OBJECT (Options), "frame11", frame11,
-                           (GtkDestroyNotify) gtk_widget_unref);
- gtk_widget_show (frame11);
- gtk_container_add (GTK_CONTAINER (notebook1), frame11);
+  CBVFM=gtk_combo_new();
+  gtk_widget_set_name( CBVFM,"CBVFM" );
+  gtk_widget_ref( CBVFM );
+  gtk_widget_show( CBVFM );
+  gtk_box_pack_start( GTK_BOX( hbox5 ),CBVFM,TRUE,TRUE,0 );
+  {
+   int i;
+   for ( i=0;i<7;i++ ) CBVFM_items=g_list_append( CBVFM_items,lVFM[i].name );
+  }
+  gtk_combo_set_popdown_strings( GTK_COMBO( CBVFM ),CBVFM_items );
+  g_list_free( CBVFM_items );
+
+  EVFM=GTK_COMBO( CBVFM )->entry;
+  gtk_widget_set_name( EVFM,"CEVFM" );
+  gtk_entry_set_editable( GTK_ENTRY( EVFM ),FALSE );
+  gtk_widget_ref( EVFM );
+  gtk_object_set_data_full( GTK_OBJECT( Preferences ),"EVFM",EVFM,(GtkDestroyNotify)gtk_widget_unref );
+  gtk_widget_show( EVFM );
 
- frame12 = gtk_frame_new (NULL);
- gtk_widget_set_name (frame12, "frame12");
- gtk_widget_ref (frame12);
- gtk_object_set_data_full (GTK_OBJECT (Options), "frame12", frame12,
-                           (GtkDestroyNotify) gtk_widget_unref);
- gtk_widget_show (frame12);
- gtk_container_add (GTK_CONTAINER (frame11), frame12);
- gtk_frame_set_shadow_type (GTK_FRAME (frame12), GTK_SHADOW_NONE);
+  label4=gtk_label_new( "Misc" );
+  gtk_widget_set_name( label4,"label4" );
+  gtk_widget_ref( label4 );
+  gtk_object_set_data_full( GTK_OBJECT( Preferences ),"label4",label4,(GtkDestroyNotify)gtk_widget_unref );
+  gtk_widget_show( label4 );
+  gtk_notebook_set_tab_label( GTK_NOTEBOOK( notebook1 ),gtk_notebook_get_nth_page( GTK_NOTEBOOK( notebook1 ),3 ),label4 );
 
- hbox2 = gtk_hbox_new (FALSE, 0);
- gtk_widget_set_name (hbox2, "hbox2");
- gtk_widget_ref (hbox2);
- gtk_object_set_data_full (GTK_OBJECT (Options), "hbox2", hbox2,
-                           (GtkDestroyNotify) gtk_widget_unref);
- gtk_widget_show (hbox2);
- gtk_container_add (GTK_CONTAINER (frame12), hbox2);
+  hseparator1=gtk_hseparator_new();
+  gtk_widget_set_name( hseparator1,"hseparator1" );
+  gtk_widget_ref( hseparator1 );
+  gtk_object_set_data_full( GTK_OBJECT( Preferences ),"hseparator1",hseparator1,(GtkDestroyNotify)gtk_widget_unref );
+  gtk_widget_show( hseparator1 );
+  gtk_box_pack_start( GTK_BOX( vbox1 ),hseparator1,FALSE,FALSE,0 );
+  gtk_widget_set_usize( hseparator1,-2,6 );
+
+  hbuttonbox1=gtk_hbutton_box_new();
+  gtk_widget_set_name( hbuttonbox1,"hbuttonbox1" );
+  gtk_widget_ref( hbuttonbox1 );
+  gtk_object_set_data_full( GTK_OBJECT( Preferences ),"hbuttonbox1",hbuttonbox1,(GtkDestroyNotify)gtk_widget_unref );
+  gtk_widget_show( hbuttonbox1 );
+  gtk_box_pack_start( GTK_BOX( vbox1 ),hbuttonbox1,FALSE,FALSE,0 );
+  gtk_button_box_set_layout( GTK_BUTTON_BOX( hbuttonbox1 ),GTK_BUTTONBOX_END );
+  gtk_button_box_set_spacing( GTK_BUTTON_BOX( hbuttonbox1 ),10 );
+  gtk_button_box_set_child_size( GTK_BUTTON_BOX( hbuttonbox1 ),85,20 );
 
- frame13 = gtk_frame_new (NULL);
- gtk_widget_set_name (frame13, "frame13");
- gtk_widget_ref (frame13);
- gtk_object_set_data_full (GTK_OBJECT (Options), "frame13", frame13,
-                           (GtkDestroyNotify) gtk_widget_unref);
- gtk_widget_show (frame13);
- gtk_box_pack_start (GTK_BOX (hbox2), frame13, TRUE, TRUE, 0);
- gtk_widget_set_usize (frame13, 212, -2);
- gtk_frame_set_shadow_type (GTK_FRAME (frame13), GTK_SHADOW_NONE);
+  BOk=gtk_button_new_with_label( MSGTR_Ok );
+  gtk_widget_set_name( BOk,"BOk" );
+  gtk_widget_ref( BOk );
+  gtk_object_set_data_full( GTK_OBJECT( Preferences ),"BOk",BOk,(GtkDestroyNotify)gtk_widget_unref );
+  gtk_widget_show( BOk );
+  gtk_container_add( GTK_CONTAINER( hbuttonbox1 ),BOk );
+//  GTK_WIDGET_UNSET_FLAGS( BOk,GTK_CAN_FOCUS );
 
- table4 = gtk_table_new (2, 1, FALSE);
- gtk_widget_set_name (table4, "table4");
- gtk_widget_ref (table4);
- gtk_object_set_data_full (GTK_OBJECT (Options), "table4", table4,
-                           (GtkDestroyNotify) gtk_widget_unref);
- gtk_widget_show (table4);
- gtk_container_add (GTK_CONTAINER (frame13), table4);
+  BCancel=gtk_button_new_with_label( MSGTR_Cancel );
+  gtk_widget_set_name( BCancel,"BCancel" );
+  gtk_widget_ref( BCancel );
+  gtk_object_set_data_full( GTK_OBJECT( Preferences ),"BCancel",BCancel,(GtkDestroyNotify)gtk_widget_unref );
+  gtk_widget_show( BCancel );
+  gtk_container_add( GTK_CONTAINER( hbuttonbox1 ),BCancel );
+//  GTK_WIDGET_UNSET_FLAGS( BCancel,GTK_CAN_FOCUS );
+  
+  gtk_widget_add_accelerator( BOk,"released",accel_group,GDK_Return,0,GTK_ACCEL_VISIBLE );
+  gtk_widget_add_accelerator( BCancel,"released",accel_group,GDK_Escape,0,GTK_ACCEL_VISIBLE );
+
+  gtk_signal_connect( GTK_OBJECT( Preferences ),"destroy",GTK_SIGNAL_FUNC( prDestroy ),NULL );
+  gtk_signal_connect( GTK_OBJECT( Preferences ),"show",GTK_SIGNAL_FUNC( prShow ),(void*)1 );
+  gtk_signal_connect( GTK_OBJECT( Preferences ),"hide",GTK_SIGNAL_FUNC( prShow ),(void*)0 );
+  
+  gtk_signal_connect( GTK_OBJECT( AConfig ),"released",GTK_SIGNAL_FUNC( prButton ),(void*)bAConfig );
+  gtk_signal_connect( GTK_OBJECT( BOk ),"released",GTK_SIGNAL_FUNC( prButton ),(void*)bOk );
+  gtk_signal_connect( GTK_OBJECT( BCancel ),"released",GTK_SIGNAL_FUNC( prButton ),(void*)bCancel );
+  gtk_signal_connect( GTK_OBJECT( VConfig ),"released",GTK_SIGNAL_FUNC( prButton ),(void*)bVconfig );
+#if 0
+  gtk_signal_connect( GTK_OBJECT( BLoadSubtitle ),"released",GTK_SIGNAL_FUNC( prButton ),(void*)bLSubtitle );
+#endif
+  gtk_signal_connect( GTK_OBJECT( BLoadFont ),"released",GTK_SIGNAL_FUNC( prButton ),(void*)bLFont );
 
- opAutoFullscreenCheckBox = gtk_check_button_new_with_label ("Always switch fullscreen on play");
- gtk_widget_set_name (opAutoFullscreenCheckBox, "opAutoFullscreenCheckBox");
- gtk_widget_ref (opAutoFullscreenCheckBox);
- gtk_object_set_data_full (GTK_OBJECT (Options), "opAutoFullscreenCheckBox", opAutoFullscreenCheckBox,
-                           (GtkDestroyNotify) gtk_widget_unref);
- gtk_widget_show (opAutoFullscreenCheckBox);
- gtk_table_attach (GTK_TABLE (table4), opAutoFullscreenCheckBox, 0, 1, 0, 1,
-                   (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                   (GtkAttachOptions) (0), 0, 0);
- gtk_widget_set_usize (opAutoFullscreenCheckBox, -2, 25);
- gtk_tooltips_set_tip (tooltips, opAutoFullscreenCheckBox, "Switch player window to fullscreen on all play.", NULL);
+#if 0
+  gtk_signal_connect( GTK_OBJECT( CBNoSound ),"toggled",GTK_SIGNAL_FUNC( on_CBNoSound_toggled ),NULL );
+  gtk_signal_connect( GTK_OBJECT( CBNormalize ),"toggled",GTK_SIGNAL_FUNC( on_CBNormalize_toggled ),NULL );
+  gtk_signal_connect( GTK_OBJECT( CBSurround ),"toggled",GTK_SIGNAL_FUNC( on_CBSurround_toggled ),NULL );
+  gtk_signal_connect( GTK_OBJECT( CBExtraStereo ),"toggled",GTK_SIGNAL_FUNC( on_CBExtraStereo_toggled ),NULL );
+  gtk_signal_connect( GTK_OBJECT( CBDoubleBuffer ),"toggled",GTK_SIGNAL_FUNC( on_CBDoubleBuffer_toggled ),NULL );
+  gtk_signal_connect( GTK_OBJECT( CBDR ),"toggled",GTK_SIGNAL_FUNC( on_CBDR_toggled ),NULL );
+  gtk_signal_connect( GTK_OBJECT( CBFramedrop ),"toggled",GTK_SIGNAL_FUNC( on_CBFramedrop_toggled ),NULL );
+  gtk_signal_connect( GTK_OBJECT( CBHFramedrop ),"toggled",GTK_SIGNAL_FUNC( on_CBHFramedrop_toggled ),NULL );
+  gtk_signal_connect( GTK_OBJECT( CBFullScreen ),"toggled",GTK_SIGNAL_FUNC( on_CBFullScreen_toggled ),NULL );
+  gtk_signal_connect( GTK_OBJECT( CBNonInterlaved ),"toggled",GTK_SIGNAL_FUNC( on_CBNonInterlaved_toggled ),NULL );
+  gtk_signal_connect( GTK_OBJECT( CBFlip ),"toggled",GTK_SIGNAL_FUNC( on_CBFlip_toggled ),NULL );
+  gtk_signal_connect( GTK_OBJECT( CBPostprocess ),"toggled",GTK_SIGNAL_FUNC( on_CBPostprocess_toggled ),NULL );
+  gtk_signal_connect( GTK_OBJECT( CBNoAutoSub ),"toggled",GTK_SIGNAL_FUNC( on_CBNoAutoSub_toggled ),NULL );
+  gtk_signal_connect( GTK_OBJECT( CBSubUnicode ),"toggled",GTK_SIGNAL_FUNC( on_CNSubUnicode_toggled ),NULL );
+  gtk_signal_connect( GTK_OBJECT( CBDumpMPSub ),"toggled",GTK_SIGNAL_FUNC( on_CBDumpMPSub_toggled ),NULL );
+  gtk_signal_connect( GTK_OBJECT( CBDumpSrt ),"toggled",GTK_SIGNAL_FUNC( on_CBDumpSrt_toggled ),NULL );
+#endif
+#if 0
+  gtk_signal_connect( GTK_OBJECT( RBOSDNone ),"toggled",GTK_SIGNAL_FUNC( on_RBOSDNone_toggled ),NULL );
+  gtk_signal_connect( GTK_OBJECT( RBOSDTandP ),"toggled",GTK_SIGNAL_FUNC( on_RBOSDTandP_toggled ),NULL );
+  gtk_signal_connect( GTK_OBJECT( RBOSDIndicator ),"toggled",GTK_SIGNAL_FUNC( on_RBOSDIndicator_toggled ),NULL );
+  gtk_signal_connect( GTK_OBJECT( CBAudioEqualizer ),"toggled",GTK_SIGNAL_FUNC( on_CBAudioEqualizer_toggled ),NULL );
+#endif
+#if 0
+  gtk_signal_connect( GTK_OBJECT( HSAudioDelay ),"motion_notify_event",GTK_SIGNAL_FUNC( on_HSAudioDelay_motion_notify_event ),NULL );
+  gtk_signal_connect( GTK_OBJECT( HSPanscan ),"motion_notify_event",GTK_SIGNAL_FUNC( on_HSPanscan_motion_notify_event ),NULL );
+  gtk_signal_connect( GTK_OBJECT( label2 ),"motion_notify_event",GTK_SIGNAL_FUNC( on_label2_motion_notify_event ),NULL );
+  gtk_signal_connect( GTK_OBJECT( HSSubDelay ),"motion_notify_event",GTK_SIGNAL_FUNC( on_HSSubDelay_motion_notify_event ),NULL );
+  gtk_signal_connect( GTK_OBJECT( HSSubPosition ),"motion_notify_event",GTK_SIGNAL_FUNC( on_HSSubPosition_motion_notify_event ),NULL );
+  gtk_signal_connect( GTK_OBJECT( HSSubFPS ),"motion_notify_event",GTK_SIGNAL_FUNC( on_HSSubFPS_motion_notify_event ),NULL );
+  gtk_signal_connect( GTK_OBJECT( HSFontFactor ),"motion_notify_event",GTK_SIGNAL_FUNC( on_HSFontFactor_motion_notify_event ),NULL );
+  gtk_signal_connect( GTK_OBJECT( HSPPQuality ),"motion_notify_event",GTK_SIGNAL_FUNC( on_HSPPQuality_motion_notify_event ),NULL );
+#endif
 
- vseparator1 = gtk_vseparator_new ();
- gtk_widget_set_name (vseparator1, "vseparator1");
- gtk_widget_ref (vseparator1);
- gtk_object_set_data_full (GTK_OBJECT (Options), "vseparator1", vseparator1,
-                           (GtkDestroyNotify) gtk_widget_unref);
- gtk_widget_show (vseparator1);
- gtk_box_pack_start (GTK_BOX (hbox2), vseparator1, FALSE, FALSE, 0);
- gtk_widget_set_usize (vseparator1, 3, -2);
+  gtk_notebook_set_page( GTK_NOTEBOOK( notebook1 ),2 );
+
+  gtk_window_add_accel_group( GTK_WINDOW( Preferences ),accel_group );
+
+  return Preferences;
+}
 
- frame14 = gtk_frame_new (NULL);
- gtk_widget_set_name (frame14, "frame14");
- gtk_widget_ref (frame14);
- gtk_object_set_data_full (GTK_OBJECT (Options), "frame14", frame14,
-                           (GtkDestroyNotify) gtk_widget_unref);
- gtk_widget_show (frame14);
- gtk_box_pack_start (GTK_BOX (hbox2), frame14, TRUE, TRUE, 0);
- gtk_widget_set_usize (frame14, 212, -2);
- gtk_frame_set_shadow_type (GTK_FRAME (frame14), GTK_SHADOW_NONE);
+       GtkWidget * OSSConfig;
+static GtkWidget * CEOssDevice;
+static GtkWidget * CEOssMixer;
+static GtkWidget * CBOssMixer;
+static GtkWidget * CBOssDevice;
+static GtkWidget * BOssOk;
+static GtkWidget * BOssCancel;
+
+void ShowOSSConfig( void )
+{
+ if ( gtkVOSSConfig ) gtkActive( OSSConfig );
+   else OSSConfig=create_OSSConfig();
+
+ if ( gtkAOOSSMixer ) gtk_entry_set_text( GTK_ENTRY( CEOssMixer ),gtkAOOSSMixer );
+   else gtk_entry_set_text( GTK_ENTRY( CEOssMixer ),PATH_DEV_MIXER );
+ if ( gtkAOOSSDevice ) gtk_entry_set_text( GTK_ENTRY( CEOssDevice ),gtkAOOSSDevice );
+   else gtk_entry_set_text( GTK_ENTRY( CEOssDevice ),PATH_DEV_DSP );
 
- opMisc = gtk_label_new ("Misc");
- gtk_widget_set_name (opMisc, "opMisc");
- gtk_widget_ref (opMisc);
- gtk_object_set_data_full (GTK_OBJECT (Options), "opMisc", opMisc,
-                           (GtkDestroyNotify) gtk_widget_unref);
- gtk_widget_show (opMisc);
- gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook1), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook1), 1), opMisc);
- gtk_widget_set_usize (opMisc, 75, -2);
+ gtk_widget_show( OSSConfig );
+ gtkSetLayer( OSSConfig );
+ gtkVOSSConfig=1; gtkVisible++;
+}
+
+void HideOSSConfig( void )
+{
+ if ( !gtkVOSSConfig ) return;
+ gtk_widget_hide( OSSConfig );
+ gtk_widget_destroy( OSSConfig ); 
+ gtkVOSSConfig=0; gtkVisible--;
+}
+
+static void ossDestroy( GtkObject * object,gpointer user_data )
+{ HideOSSConfig(); }
+
+static void ossShow( GtkWidget * widget,gpointer user_data )
+{ gtkVOSSConfig=(int)user_data; }
 
- hseparator1 = gtk_hseparator_new ();
- gtk_widget_set_name (hseparator1, "hseparator1");
- gtk_widget_ref (hseparator1);
- gtk_object_set_data_full (GTK_OBJECT (Options), "hseparator1", hseparator1,
-                           (GtkDestroyNotify) gtk_widget_unref);
- gtk_widget_show (hseparator1);
- gtk_box_pack_start (GTK_BOX (vbox1), hseparator1, FALSE, FALSE, 0);
- gtk_widget_set_usize (hseparator1, -2, 5);
+static void ossButton( GtkButton * button,gpointer user_data )
+{
+ switch( (int)user_data )
+  {
+   case 1:
+        if ( gtkAOOSSMixer ) free( gtkAOOSSMixer );   gtkAOOSSMixer=strdup( gtk_entry_get_text( GTK_ENTRY( CEOssMixer ) ) );
+        if ( gtkAOOSSDevice ) free( gtkAOOSSDevice ); gtkAOOSSDevice=strdup( gtk_entry_get_text( GTK_ENTRY( CEOssDevice ) ) );
+   case 0:
+	HideOSSConfig();
+	break;
+  }
+}
 
- hbuttonbox1 = gtk_hbutton_box_new ();
- gtk_widget_set_name (hbuttonbox1, "hbuttonbox1");
- gtk_widget_ref (hbuttonbox1);
- gtk_object_set_data_full (GTK_OBJECT (Options), "hbuttonbox1", hbuttonbox1,
-                           (GtkDestroyNotify) gtk_widget_unref);
- gtk_widget_show (hbuttonbox1);
- gtk_box_pack_start (GTK_BOX (vbox1), hbuttonbox1, TRUE, TRUE, 0);
- gtk_widget_set_usize (hbuttonbox1, -2, 27);
- gtk_button_box_set_layout (GTK_BUTTON_BOX (hbuttonbox1), GTK_BUTTONBOX_END);
- gtk_button_box_set_spacing (GTK_BUTTON_BOX (hbuttonbox1), 0);
- gtk_button_box_set_child_size (GTK_BUTTON_BOX (hbuttonbox1), 90, 30);
+GtkWidget * create_OSSConfig( void )
+{
+  GList 	* CBOssDevice_items=NULL;
+  GList 	* CBOssMixer_items=NULL;
+  GtkWidget * frame13;
+  GtkWidget * frame14;
+  GtkWidget * frame15;
+  GtkWidget * frame16;
+  GtkWidget * vbox604;
+  GtkWidget * table2;
+  GtkWidget * label18;
+  GtkWidget * label19;
+  GtkWidget * hseparator3;
+  GtkWidget * hbuttonbox6;
+  GtkAccelGroup * accel_group;
+
+  accel_group=gtk_accel_group_new();
+
+  OSSConfig=gtk_window_new( GTK_WINDOW_DIALOG );
+  gtk_widget_set_name( OSSConfig,"OSSConfig" );
+  gtk_object_set_data( GTK_OBJECT( OSSConfig ),"OSSConfig",OSSConfig );
+  gtk_widget_set_usize( OSSConfig,270,92 );
+  gtk_window_set_title( GTK_WINDOW( OSSConfig ),MSGTR_OSSPreferences );
+  gtk_window_set_position( GTK_WINDOW( OSSConfig ),GTK_WIN_POS_CENTER );
+  gtk_window_set_policy( GTK_WINDOW( OSSConfig ),FALSE,FALSE,FALSE );
+  gtk_window_set_wmclass( GTK_WINDOW( OSSConfig ),"OSS Config","MPlayer" );
 
- opOk = gtk_button_new_with_label ("Ok");
- gtk_widget_set_name (opOk, "opOk");
- gtk_widget_ref (opOk);
- gtk_object_set_data_full (GTK_OBJECT (Options), "opOk", opOk,
-                           (GtkDestroyNotify) gtk_widget_unref);
- gtk_widget_show (opOk);
- gtk_container_add (GTK_CONTAINER (hbuttonbox1), opOk);
- GTK_WIDGET_SET_FLAGS (opOk, GTK_CAN_DEFAULT);
+  gtk_widget_realize( OSSConfig );
+  gtkAddIcon( OSSConfig );
+    
+  frame13=gtk_frame_new( NULL );
+  gtk_widget_set_name( frame13,"frame13" );
+  gtk_widget_ref( frame13 );
+  gtk_object_set_data_full( GTK_OBJECT( OSSConfig ),"frame13",frame13,(GtkDestroyNotify)gtk_widget_unref );
+  gtk_widget_show( frame13 );
+  gtk_container_add( GTK_CONTAINER( OSSConfig ),frame13 );
+  gtk_container_set_border_width( GTK_CONTAINER( frame13 ),1 );
+  gtk_frame_set_shadow_type( GTK_FRAME( frame13 ),GTK_SHADOW_IN );
 
- opCancel = gtk_button_new_with_label ("Cancel");
- gtk_widget_set_name (opCancel, "opCancel");
- gtk_widget_ref (opCancel);
- gtk_object_set_data_full (GTK_OBJECT (Options), "opCancel", opCancel,
-                           (GtkDestroyNotify) gtk_widget_unref);
- gtk_widget_show (opCancel);
- gtk_container_add (GTK_CONTAINER (hbuttonbox1), opCancel);
- GTK_WIDGET_SET_FLAGS (opCancel, GTK_CAN_DEFAULT);
+  frame14=gtk_frame_new( NULL );
+  gtk_widget_set_name( frame14,"frame14" );
+  gtk_widget_ref( frame14 );
+  gtk_object_set_data_full( GTK_OBJECT( OSSConfig ),"frame14",frame14,(GtkDestroyNotify)gtk_widget_unref );
+  gtk_widget_show( frame14 );
+  gtk_container_add( GTK_CONTAINER( frame13 ),frame14 );
+  gtk_frame_set_shadow_type( GTK_FRAME( frame14 ),GTK_SHADOW_NONE );
+
+  frame15=gtk_frame_new( NULL );
+  gtk_widget_set_name( frame15,"frame15" );
+  gtk_widget_ref( frame15 );
+  gtk_object_set_data_full( GTK_OBJECT( OSSConfig ),"frame15",frame15,(GtkDestroyNotify)gtk_widget_unref );
+  gtk_widget_show( frame15 );
+  gtk_container_add( GTK_CONTAINER( frame14 ),frame15 );
+  gtk_frame_set_shadow_type( GTK_FRAME( frame15 ),GTK_SHADOW_ETCHED_OUT );
 
- gtk_signal_connect (GTK_OBJECT (Options), "key_press_event",
-                     GTK_SIGNAL_FUNC (on_window2_key_press_event),
-                     NULL);
- gtk_signal_connect (GTK_OBJECT (Options), "key_release_event",
-                     GTK_SIGNAL_FUNC (on_window2_key_release_event),
-                     NULL);
- gtk_signal_connect (GTK_OBJECT (Options), "destroy_event",
-                     GTK_SIGNAL_FUNC (on_window2_destroy_event),
-                     NULL);
- gtk_signal_connect (GTK_OBJECT (opAudioDriverMenu), "released",
-                     GTK_SIGNAL_FUNC (on_opAudioDriverMenu_released),
-                     NULL);
- gtk_signal_connect (GTK_OBJECT (opAudioDelaySkinButton), "changed",
-                     GTK_SIGNAL_FUNC (on_opAudioDelaySkinButton_changed),
-                     NULL);
- gtk_signal_connect (GTK_OBJECT (opAudioDelaySkinButton), "move_to_column",
-                     GTK_SIGNAL_FUNC (on_opAudioDelaySkinButton_move_to_column),
-                     NULL);
- gtk_signal_connect (GTK_OBJECT (opAudioDelaySkinButton), "move_to_row",
-                     GTK_SIGNAL_FUNC (on_opAudioDelaySkinButton_move_to_row),
-                     NULL);
- gtk_signal_connect (GTK_OBJECT (opAudioConfigureButton), "released",
-                     GTK_SIGNAL_FUNC (on_opAudioConfigureButton_released),
-                     NULL);
+  frame16=gtk_frame_new( NULL );
+  gtk_widget_set_name( frame16,"frame16" );
+  gtk_widget_ref( frame16 );
+  gtk_object_set_data_full( GTK_OBJECT( OSSConfig ),"frame16",frame16,(GtkDestroyNotify)gtk_widget_unref );
+  gtk_widget_show( frame16 );
+  gtk_container_add( GTK_CONTAINER( frame15 ),frame16 );
+  gtk_widget_set_usize( frame16,384,256 );
+  gtk_frame_set_shadow_type( GTK_FRAME( frame16 ),GTK_SHADOW_NONE );
+
+  vbox604=gtk_vbox_new( FALSE,0 );
+  gtk_widget_set_name( vbox604,"vbox604" );
+  gtk_widget_ref( vbox604 );
+  gtk_object_set_data_full( GTK_OBJECT( OSSConfig ),"vbox604",vbox604,(GtkDestroyNotify)gtk_widget_unref );
+  gtk_widget_show( vbox604 );
+  gtk_container_add( GTK_CONTAINER( frame16 ),vbox604 );
+
+  table2=gtk_table_new( 2,2,FALSE );
+  gtk_widget_set_name( table2,"table2" );
+  gtk_widget_ref( table2 );
+  gtk_object_set_data_full( GTK_OBJECT( OSSConfig ),"table2",table2,(GtkDestroyNotify)gtk_widget_unref );
+  gtk_widget_show( table2 );
+  gtk_box_pack_start( GTK_BOX( vbox604 ),table2,TRUE,TRUE,0 );
+
+  label18=gtk_label_new( MSGTR_PREFERENCES_OSS_Device );
+  gtk_widget_set_name( label18,"label18" );
+  gtk_widget_ref( label18 );
+  gtk_object_set_data_full( GTK_OBJECT( OSSConfig ),"label18",label18,(GtkDestroyNotify)gtk_widget_unref );
+  gtk_widget_show( label18 );
+  gtk_table_attach( GTK_TABLE( table2 ),label18,0,1,0,1,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 );
+  gtk_misc_set_alignment( GTK_MISC( label18 ),0,0.5 );
+  gtk_misc_set_padding( GTK_MISC( label18 ),4,0 );
+
+  label19=gtk_label_new( MSGTR_PREFERENCES_OSS_Mixer );
+  gtk_widget_set_name( label19,"label19" );
+  gtk_widget_ref( label19 );
+  gtk_object_set_data_full( GTK_OBJECT( OSSConfig ),"label19",label19,(GtkDestroyNotify)gtk_widget_unref );
+  gtk_widget_show( label19 );
+  gtk_table_attach( GTK_TABLE( table2 ),label19,0,1,1,2,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 );
+  gtk_misc_set_alignment( GTK_MISC( label19 ),0,0.5 );
+  gtk_misc_set_padding( GTK_MISC( label19 ),4,0 );
 
- gtk_signal_connect (GTK_OBJECT (opVideoMenu), "released",
-                     GTK_SIGNAL_FUNC (on_opVideoMenu_released),
-                     NULL);
- gtk_signal_connect (GTK_OBJECT (opVideoMenu), "clicked",
-                     GTK_SIGNAL_FUNC (on_opVideoMenu_clicked),
-                     NULL);
- gtk_signal_connect (GTK_OBJECT (opVideoMenu), "button_release_event",
-                     GTK_SIGNAL_FUNC (on_opVideoMenu_button_release_event),
-                     NULL);
- gtk_signal_connect (GTK_OBJECT (opVideoMenu), "pressed",
-                     GTK_SIGNAL_FUNC (on_opVideoMenu_pressed),
-                     NULL);
+  CBOssDevice=gtk_combo_new();
+  gtk_widget_set_name( CBOssDevice,"CBOssDevice" );
+  gtk_widget_ref( CBOssDevice );
+  gtk_object_set_data_full( GTK_OBJECT( OSSConfig ),"CBOssDevice",CBOssDevice,(GtkDestroyNotify)gtk_widget_unref );
+  gtk_widget_show( CBOssDevice );
+  gtk_table_attach( GTK_TABLE( table2 ),CBOssDevice,1,2,0,1,(GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 );
+  CBOssDevice_items=g_list_append( CBOssDevice_items,(gpointer)"/dev/dsp" );
+  CBOssDevice_items=g_list_append( CBOssDevice_items,(gpointer)"/dev/dsp0" );
+  CBOssDevice_items=g_list_append( CBOssDevice_items,(gpointer)"/dev/dsp1" );
+  CBOssDevice_items=g_list_append( CBOssDevice_items,(gpointer)"/dev/dsp2" );
+  CBOssDevice_items=g_list_append( CBOssDevice_items,(gpointer)"/dev/dsp3" );
+  gtk_combo_set_popdown_strings( GTK_COMBO( CBOssDevice ),CBOssDevice_items );
+  g_list_free( CBOssDevice_items );
+
+  CEOssDevice=GTK_COMBO( CBOssDevice )->entry;
+  gtk_widget_set_name( CEOssDevice,"CEOssDevice" );
+  gtk_widget_ref( CEOssDevice );
+  gtk_object_set_data_full( GTK_OBJECT( OSSConfig ),"CEOssDevice",CEOssDevice,(GtkDestroyNotify)gtk_widget_unref );
+  gtk_widget_show( CEOssDevice );
+//  gtk_entry_set_text( GTK_ENTRY( CEOssDevice ),"/dev/dsp" );
+
+  CBOssMixer=gtk_combo_new();
+  gtk_widget_set_name( CBOssMixer,"CBOssMixer" );
+  gtk_widget_ref( CBOssMixer );
+  gtk_object_set_data_full( GTK_OBJECT( OSSConfig ),"CBOssMixer",CBOssMixer,(GtkDestroyNotify)gtk_widget_unref );
+  gtk_widget_show( CBOssMixer );
+  gtk_table_attach( GTK_TABLE( table2 ),CBOssMixer,1,2,1,2,(GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 );
+  CBOssMixer_items=g_list_append( CBOssMixer_items,(gpointer)"/dev/mixer" );
+  CBOssMixer_items=g_list_append( CBOssMixer_items,(gpointer)"/dev/mixer0" );
+  CBOssMixer_items=g_list_append( CBOssMixer_items,(gpointer)"/dev/mixer1" );
+  CBOssMixer_items=g_list_append( CBOssMixer_items,(gpointer)"/dev/mixer2" );
+  CBOssMixer_items=g_list_append( CBOssMixer_items,(gpointer)"/dev/mixer3" );
+  gtk_combo_set_popdown_strings( GTK_COMBO( CBOssMixer ),CBOssMixer_items );
+  g_list_free( CBOssMixer_items );
+
+  CEOssMixer=GTK_COMBO( CBOssMixer )->entry;
+  gtk_widget_set_name( CEOssMixer,"CEOssMixer" );
+  gtk_widget_ref( CEOssMixer );
+  gtk_object_set_data_full( GTK_OBJECT( OSSConfig ),"CEOssMixer",CEOssMixer,(GtkDestroyNotify)gtk_widget_unref );
+  gtk_widget_show( CEOssMixer );
+//  gtk_entry_set_text( GTK_ENTRY( CEOssMixer ),"/dev/mixer" );
 
- gtk_signal_connect (GTK_OBJECT (opOsdCheckButton), "toggled",
-                     GTK_SIGNAL_FUNC (on_opOsdCheckButton_toggled),
-                     NULL);
- gtk_signal_connect (GTK_OBJECT (opVideoConfButton), "released",
-                     GTK_SIGNAL_FUNC (on_opVideoConfButton_released),
-                     NULL);
- gtk_signal_connect (GTK_OBJECT (opOSDLevelSpinButton), "changed",
-                     GTK_SIGNAL_FUNC (on_opOSDLevelSpinButton_changed),
-                     NULL);
- gtk_signal_connect (GTK_OBJECT (opOSDLevelSpinButton), "move_to_column",
-                     GTK_SIGNAL_FUNC (on_opOSDLevelSpinButton_move_to_column),
-                     NULL);
- gtk_signal_connect (GTK_OBJECT (opOSDLevelSpinButton), "move_to_row",
-                     GTK_SIGNAL_FUNC (on_opOSDLevelSpinButton_move_to_row),
-                     NULL);
- gtk_signal_connect (GTK_OBJECT (opAutoFullscreenCheckBox), "toggled",
-                     GTK_SIGNAL_FUNC (on_opAutoFullscreenCheckBox_toggled),
-                     NULL);
- gtk_signal_connect (GTK_OBJECT (opOk), "released",
-                     GTK_SIGNAL_FUNC (on_opOk_released),
-                     NULL);
- gtk_signal_connect (GTK_OBJECT (opCancel), "released",
-                     GTK_SIGNAL_FUNC (on_opCancel_released),
-                     NULL);
+  hseparator3=gtk_hseparator_new();
+  gtk_widget_set_name( hseparator3,"hseparator3" );
+  gtk_widget_ref( hseparator3 );
+  gtk_object_set_data_full( GTK_OBJECT( OSSConfig ),"hseparator3",hseparator3,(GtkDestroyNotify)gtk_widget_unref );
+  gtk_widget_show( hseparator3 );
+  gtk_box_pack_start( GTK_BOX( vbox604 ),hseparator3,FALSE,FALSE,0 );
+  gtk_widget_set_usize( hseparator3,-2,8 );
+
+  hbuttonbox6=gtk_hbutton_box_new();
+  gtk_widget_set_name( hbuttonbox6,"hbuttonbox6" );
+  gtk_widget_ref( hbuttonbox6 );
+  gtk_object_set_data_full( GTK_OBJECT( OSSConfig ),"hbuttonbox6",hbuttonbox6,(GtkDestroyNotify)gtk_widget_unref );
+  gtk_widget_show( hbuttonbox6 );
+  gtk_box_pack_start( GTK_BOX( vbox604 ),hbuttonbox6,FALSE,FALSE,0 );
+  gtk_button_box_set_layout( GTK_BUTTON_BOX( hbuttonbox6 ),GTK_BUTTONBOX_END );
+  gtk_button_box_set_spacing( GTK_BUTTON_BOX( hbuttonbox6 ),10 );
+  gtk_button_box_set_child_size( GTK_BUTTON_BOX( hbuttonbox6 ),85,20 );
+  gtk_button_box_set_child_ipadding( GTK_BUTTON_BOX( hbuttonbox6 ),0,0 );
 
- gtk_object_set_data (GTK_OBJECT (Options), "tooltips", tooltips);
+  BOssOk=gtk_button_new_with_label( MSGTR_Ok );
+  gtk_widget_set_name( BOssOk,"BOssOk" );
+  gtk_widget_ref( BOssOk );
+  gtk_object_set_data_full( GTK_OBJECT( OSSConfig ),"BOssOk",BOssOk,(GtkDestroyNotify)gtk_widget_unref );
+  gtk_widget_show( BOssOk );
+  gtk_container_add( GTK_CONTAINER( hbuttonbox6 ),BOssOk );
+  GTK_WIDGET_UNSET_FLAGS( BOssOk,GTK_CAN_FOCUS );
+
+  BOssCancel=gtk_button_new_with_label( MSGTR_Cancel );
+  gtk_widget_set_name( BOssCancel,"BOssCancel" );
+  gtk_widget_ref( BOssCancel );
+  gtk_object_set_data_full( GTK_OBJECT( OSSConfig ),"BOssCancel",BOssCancel,(GtkDestroyNotify)gtk_widget_unref );
+  gtk_widget_show( BOssCancel );
+  gtk_container_add( GTK_CONTAINER( hbuttonbox6 ),BOssCancel );
+  GTK_WIDGET_UNSET_FLAGS( BOssCancel,GTK_CAN_FOCUS );
 
- return Options;
+  gtk_signal_connect( GTK_OBJECT( OSSConfig ),"destroy",GTK_SIGNAL_FUNC( ossDestroy ),NULL );
+  gtk_signal_connect( GTK_OBJECT( OSSConfig ),"hide",GTK_SIGNAL_FUNC( ossShow ),(void*)0 );
+  gtk_signal_connect( GTK_OBJECT( OSSConfig ),"show",GTK_SIGNAL_FUNC( ossShow ),(void*)1 );
+  
+  gtk_signal_connect( GTK_OBJECT( BOssOk ),"released",GTK_SIGNAL_FUNC( ossButton ),(void*)1 );
+  gtk_signal_connect( GTK_OBJECT( BOssCancel ),"released",GTK_SIGNAL_FUNC( ossButton ),(void*)0 );
+
+  gtk_widget_add_accelerator( BOssOk,"released",accel_group,GDK_Return,0,GTK_ACCEL_VISIBLE );
+  gtk_widget_add_accelerator( BOssCancel,"released",accel_group,GDK_Escape,0,GTK_ACCEL_VISIBLE );
+
+  gtk_window_add_accel_group( GTK_WINDOW( OSSConfig ),accel_group );
+
+  return OSSConfig;
 }
+
--- a/Gui/mplayer/gtk/opts.h	Thu Jul 25 20:23:18 2002 +0000
+++ b/Gui/mplayer/gtk/opts.h	Thu Jul 25 20:26:38 2002 +0000
@@ -1,9 +1,17 @@
-#ifndef _GUI_OPTS_H
-#define _GUI_OPTS_H
+
+#ifndef __PREFERENCES_H
+#define __PREFERENCES_H
 
 #include <gtk/gtk.h>
 
-void HideOptions( void );
-GtkWidget * create_Options( void );
+extern GtkWidget * OSSConfig;
+extern GtkWidget * Preferences;
+extern int    	   gtkVPreferences;
+extern GtkWidget * prEFontName;
+
+extern GtkWidget * create_Preferences( void );
+extern GtkWidget * create_OSSConfig( void );
+
+extern void ShowPreferences( void );
 
 #endif
\ No newline at end of file
--- a/Gui/mplayer/gtk/sb.c	Thu Jul 25 20:23:18 2002 +0000
+++ b/Gui/mplayer/gtk/sb.c	Thu Jul 25 20:26:38 2002 +0000
@@ -273,7 +273,7 @@
  gtk_widget_add_accelerator( Cancel,"released",accel_group,GDK_Escape,0,GTK_ACCEL_VISIBLE );
 
  gtk_signal_connect( GTK_OBJECT( SkinBrowser ),"destroy",GTK_SIGNAL_FUNC( on_SkinBrowser_destroy ),0 );
- gtk_signal_connect( GTK_OBJECT( SkinBrowser ),"show",GTK_SIGNAL_FUNC( on_SkinBrowser_show ),1 );
+ gtk_signal_connect( GTK_OBJECT( SkinBrowser ),"show",GTK_SIGNAL_FUNC( on_SkinBrowser_show ),(void *)1 );
  gtk_signal_connect( GTK_OBJECT( SkinBrowser ),"hide",GTK_SIGNAL_FUNC( on_SkinBrowser_show ),0 );
  
  gtk_signal_connect( GTK_OBJECT( SkinList ),"select_row",GTK_SIGNAL_FUNC( on_SkinList_select_row ),NULL );
--- a/Gui/mplayer/mplayer.c	Thu Jul 25 20:23:18 2002 +0000
+++ b/Gui/mplayer/mplayer.c	Thu Jul 25 20:26:38 2002 +0000
@@ -7,6 +7,7 @@
 #include "./mplayer.h"
 #include "../events.h"
 #include "../app.h"
+#include "../cfg.h"
 #include "../interface.h"
 #include "../skin/skin.h"
 #include "../skin/font.h"
@@ -98,9 +99,6 @@
  wsClearWindow( appMPlayer.subWindow );
  if ( appMPlayer.sub.Bitmap.Image ) wsConvert( &appMPlayer.subWindow,appMPlayer.sub.Bitmap.Image,appMPlayer.sub.Bitmap.ImageSize );
 
- wsPostRedisplay( &appMPlayer.mainWindow );
- wsPostRedisplay( &appMPlayer.subWindow );
-
  btnModify( evSetVolume,guiIntfStruct.Volume );
  btnModify( evSetBalance,guiIntfStruct.Balance );
  btnModify( evSetMoviePosition,guiIntfStruct.Position );
@@ -108,17 +106,25 @@
  wsSetIcon( wsDisplay,appMPlayer.mainWindow.WindowID,guiIcon,guiIconMask );
  wsSetIcon( wsDisplay,appMPlayer.subWindow.WindowID,guiIcon,guiIconMask );
  
- if ( fullscreen )
-  {
-   btnModify( evFullScreen,btnPressed );
-   mplFullScreen();
-  }
-
  guiIntfStruct.Playing=0;
 
  if ( !appMPlayer.mainDecoration ) wsWindowDecoration( &appMPlayer.mainWindow,0 );
  
  wsVisibleWindow( &appMPlayer.mainWindow,wsShowWindow );
  wsVisibleWindow( &appMPlayer.subWindow,wsShowWindow );
+
+ {
+  XEvent xev;
+  do { XNextEvent( wsDisplay,&xev ); } while ( xev.type != MapNotify || xev.xmap.event != appMPlayer.subWindow.WindowID );
+  appMPlayer.subWindow.Mapped=wsMapped;
+ }
+
+ if ( fullscreen )
+  {
+   mplFullScreen();
+   btnModify( evFullScreen,btnPressed );
+  }
+
+ mplSubRender=1;
 }
 
--- a/Gui/mplayer/mw.h	Thu Jul 25 20:23:18 2002 +0000
+++ b/Gui/mplayer/mw.h	Thu Jul 25 20:26:38 2002 +0000
@@ -170,7 +170,7 @@
  btnModify( evSetMoviePosition,guiIntfStruct.Position );
  btnModify( evSetVolume,guiIntfStruct.Volume );
 
- if ( mplMainRender )
+ if ( mplMainRender && appMPlayer.mainWindow.State == wsWindowExpose )
   {
    memcpy( mplDrawBuffer,appMPlayer.main.Bitmap.Image,appMPlayer.main.Bitmap.ImageSize );
    for( i=0;i < appMPlayer.NumberOfItems + 1;i++ )
@@ -234,6 +234,8 @@
         break;
 
    case evPlayNetwork:
+        if ( guiIntfStruct.Subtitlename ) { free( guiIntfStruct.Subtitlename ); guiIntfStruct.Subtitlename=NULL; }
+	if ( guiIntfStruct.AudioFile ) { free( guiIntfStruct.AudioFile ); guiIntfStruct.AudioFile=NULL; }
 	guiIntfStruct.StreamType=STREAMTYPE_STREAM;
         goto play;
    case evSetURL:
@@ -244,6 +246,7 @@
    case evSetVCDTrack:
         guiIntfStruct.Track=(int)param;
    case evPlayVCD:
+ 	gtkSet( gtkClearStruct,guiALL,NULL );
 	guiIntfStruct.StreamType=STREAMTYPE_VCD;
 	goto play;
 #endif
@@ -253,6 +256,7 @@
         guiIntfStruct.DVD.current_chapter=1;
         guiIntfStruct.DVD.current_angle=1;
 play_dvd_2:
+ 	gtkSet( gtkClearStruct,guiALL - guiDVD,NULL );
         guiIntfStruct.StreamType=STREAMTYPE_DVD;
 #endif
    case evPlay:
@@ -260,7 +264,7 @@
 play:
 
         mplMainAutoPlay=0;
-        if ( ( msg == evPlaySwitchToPause )&&( guiIntfStruct.Playing == 1 ) ) goto NoPause;
+        if ( ( msg == evPlaySwitchToPause )&&( guiIntfStruct.Playing == 2 ) ) goto NoPause;
 
 	vcd_track=0;
 	dvd_title=0;
@@ -272,19 +276,19 @@
 	  guiSetDF( guiIntfStruct.Filename,next->path,next->name );
 	  guiIntfStruct.StreamType=STREAMTYPE_FILE;
 	  guiIntfStruct.FilenameChanged=1;
-	  if ( guiIntfStruct.AudioFile ) free( guiIntfStruct.AudioFile );
-	  guiIntfStruct.AudioFile=NULL;
+	  gfree( (void **)&guiIntfStruct.AudioFile );
+	  gfree( (void **)&guiIntfStruct.Subtitlename );
 	 }
 
         switch ( guiIntfStruct.StreamType )
          {
 	  case STREAMTYPE_STREAM:
 	  case STREAMTYPE_FILE:
-	       guiGetEvent( guiClearStruct,(char *)guiALL );
+	       gtkSet( gtkClearStruct,guiALL - guiFilenames,NULL );
 	       break;
 #ifdef HAVE_VCD
           case STREAMTYPE_VCD:
-	       guiGetEvent( guiClearStruct,(char *)(guiALL - guiVCD ) );
+	       gtkSet( gtkClearStruct,guiALL - guiVCD - guiFilenames,NULL );
 	       if ( !cdrom_device )
 	        {
 		 cdrom_device=DEFAULT_CDROM_DEVICE;
@@ -304,11 +308,11 @@
 #endif
 #ifdef USE_DVDREAD
           case STREAMTYPE_DVD:
-	       guiGetEvent( guiClearStruct,(char *)(guiALL - guiDVD ) );
+	       gtkSet( gtkClearStruct,guiALL - guiDVD - guiFilenames,NULL );
 	       if ( !dvd_device ) 
 	        {
 	         dvd_device=DEFAULT_DVD_DEVICE;
-                 guiSetFilename( guiIntfStruct.Filename,dvd_device );
+                 guiSetFilename( guiIntfStruct.Filename,dvd_device )
 		} 
 	       if ( guiIntfStruct.Playing != 2 )
 	        {
@@ -321,7 +325,6 @@
 #endif
          }
         mplPlay();
-        mplMainRender=1;
         break;
 #ifdef USE_DVDREAD
    case evSetDVDSubtitle:
@@ -348,37 +351,21 @@
    case evPauseSwitchToPlay:
 NoPause:
         mplPause();
-        mplMainRender=1;
         break;
 
-   case evStop:
-        mplStop();
-        mplMainRender=1;
-        break;
+   case evStop: guiIntfStruct.Playing=guiSetStop; break;
 
    case evLoadPlay:
         mplMainAutoPlay=1;
 //	guiIntfStruct.StreamType=STREAMTYPE_FILE;
    case evLoad:
-        mplMainRender=1;
 	gtkSet( gtkDelPl,0,NULL );
         gtkShow( evLoad,NULL );
         break;
-   case evLoadSubtitle:
-        mplMainRender=1;
-        gtkShow( evLoadSubtitle,NULL );
-        break;
-   case evLoadAudioFile:
-	gtkShow( evLoadAudioFile,NULL );
-	break;
-   case evPrev:
-	mplPrev();
-        mplMainRender=1;
-        break;
-   case evNext:
-	mplNext();
-        mplMainRender=1;
-        break;
+   case evLoadSubtitle:  gtkShow( evLoadSubtitle,NULL );  break;
+   case evLoadAudioFile: gtkShow( evLoadAudioFile,NULL ); break;
+   case evPrev: mplPrev(); break;
+   case evNext: mplNext(); break;
 
    case evPlayList:    gtkShow( evPlayList,NULL );        break;
    case evSkinBrowser: gtkShow( evSkinBrowser,skinName ); break;
@@ -461,7 +448,6 @@
            }
          }
         mplFullScreen();
-        mplMainRender=1;
         break;
 
 // --- timer events
@@ -516,7 +502,7 @@
           sx=X; sy=Y; boxMoved=1; itemtype=itPLMButton; // if move the main window
           SelectedItem=currentselected;
           if ( SelectedItem == -1 ) break; // yeees, i'm move the fucking window
-          boxMoved=0; mplMainRender=1; // No, not move the window, i'm pressed one button
+          boxMoved=0; //mplMainRender=1; // No, not move the window, i'm pressed one button
           item=&appMPlayer.Items[SelectedItem];
           itemtype=item->type;
           item->pressed=btnPressed;
@@ -547,7 +533,7 @@
                  break;
            }
           mplEventHandling( item->msg,value );
-          mplMainRender=1;
+//          mplMainRender=1;
           itemtype=0;
           break;
 
@@ -565,7 +551,6 @@
             item->value+=value;
             btnModify( item->msg,item->value );
             mplEventHandling( item->msg,item->value );
-            mplMainRender=1;
            }
           break;
 
--- a/Gui/mplayer/play.c	Thu Jul 25 20:23:18 2002 +0000
+++ b/Gui/mplayer/play.c	Thu Jul 25 20:26:38 2002 +0000
@@ -91,7 +91,7 @@
 
  if ( !mplGotoTheNext ) { mplGotoTheNext=1; return; }
 
- if ( (next=gtkSet( gtkGetNextPlItem,0,NULL )) && plLastPlayed != next )
+ if ( guiIntfStruct.Playing && (next=gtkSet( gtkGetNextPlItem,0,NULL )) && plLastPlayed != next )
   {
    plLastPlayed=next;
    guiSetDF( guiIntfStruct.Filename,next->path,next->name );
@@ -99,26 +99,24 @@
    guiIntfStruct.FilenameChanged=1;
    if ( guiIntfStruct.AudioFile ) free( guiIntfStruct.AudioFile );
    guiIntfStruct.AudioFile=NULL;
-  } else mplStop();
-}
-
-void mplStop( void )
-{
- guiIntfStruct.Playing=0;
- guiIntfStruct.TimeSec=0;
- guiIntfStruct.Position=0;
- guiIntfStruct.AudioType=0;
+  } 
+  else
+    {
+     guiIntfStruct.TimeSec=0;
+     guiIntfStruct.Position=0;
+     guiIntfStruct.AudioType=0;
 
- if ( !appMPlayer.subWindow.isFullScreen )
-  {
-   wsResizeWindow( &appMPlayer.subWindow,appMPlayer.sub.width,appMPlayer.sub.height );
-   wsMoveWindow( &appMPlayer.subWindow,True,appMPlayer.sub.x,appMPlayer.sub.y );
-  }
- guiGetEvent( guiCEvent,guiSetStop );
- mplSubRender=1;
- wsSetBackgroundRGB( &appMPlayer.subWindow,appMPlayer.subR,appMPlayer.subG,appMPlayer.subB );
- wsClearWindow( appMPlayer.subWindow );
- wsPostRedisplay( &appMPlayer.subWindow );
+     if ( !appMPlayer.subWindow.isFullScreen )
+      {
+       wsResizeWindow( &appMPlayer.subWindow,appMPlayer.sub.width,appMPlayer.sub.height );
+       wsMoveWindow( &appMPlayer.subWindow,True,appMPlayer.sub.x,appMPlayer.sub.y );
+      }
+     guiGetEvent( guiCEvent,guiSetStop );
+     mplSubRender=1;
+     wsSetBackgroundRGB( &appMPlayer.subWindow,appMPlayer.subR,appMPlayer.subG,appMPlayer.subB );
+     wsClearWindow( appMPlayer.subWindow );
+     wsPostRedisplay( &appMPlayer.subWindow );
+    }
 }
 
 void mplPlay( void )
@@ -127,20 +125,22 @@
       ( guiIntfStruct.Filename[0] == 0 )||
       ( guiIntfStruct.Playing == 1 ) ) return;
  if ( guiIntfStruct.Playing == 2 ) { mplPause(); return; }
- guiGetEvent( guiCEvent,guiSetPlay );
+ guiGetEvent( guiCEvent,(void *)guiSetPlay );
  mplSubRender=0;
  wsSetBackgroundRGB( &appMPlayer.subWindow,0,0,0 );
  wsClearWindow( appMPlayer.subWindow );
-// wsPostRedisplay( &appMPlayer.subWindow );
 }
 
 void mplPause( void )
 {
- mp_cmd_t * cmd = (mp_cmd_t *)calloc( 1,sizeof( *cmd ) );
- cmd->id=MP_CMD_PAUSE;
- cmd->name=strdup("pause");
- mp_input_queue_cmd(cmd);
- mplSubRender=0;
+ if ( !guiIntfStruct.Playing ) return;
+ if ( guiIntfStruct.Playing == 1 )
+  {
+   mp_cmd_t * cmd = (mp_cmd_t *)calloc( 1,sizeof( *cmd ) );
+   cmd->id=MP_CMD_PAUSE;
+   cmd->name=strdup("pause");
+   mp_input_queue_cmd(cmd);
+  } else guiIntfStruct.Playing=1;
 }
 
 void mplState( void )
@@ -239,11 +239,14 @@
  btnModify( evFullScreen,!appMPlayer.subWindow.isFullScreen );
 }
 
-void mplSetFileName( char * fname )
+void mplSetFileName( char * dir,char * name )
 {
- if ( !fname ) return;
- if ( guiIntfStruct.Filename ) free( guiIntfStruct.Filename );
- guiIntfStruct.Filename=strdup( fname );
+ if ( !name || !dir ) return;
+ guiSetDF( guiIntfStruct.Filename,dir,name );
+ guiIntfStruct.StreamType=STREAMTYPE_FILE;
+ guiIntfStruct.FilenameChanged=1;
+ gfree( (void **)&guiIntfStruct.AudioFile );
+ gfree( (void **)&guiIntfStruct.Subtitlename );
 }
 
 void mplPrev( void )
@@ -270,12 +273,12 @@
 	break;
 #endif
    default: 
-	if ( (prev=gtkSet( gtkGetPrevPlItem,0,NULL)) ) { mplGotoTheNext=0; break; }
-//	 {
-//	  guiSetDF( guiIntfStruct.Filename,prev->path,prev->name );
-//	  guiIntfStruct.FilenameChanged=1;
-//	  break;
-//	 }
+	if ( (prev=gtkSet( gtkGetPrevPlItem,0,NULL)) )
+	 {
+	  mplSetFileName( prev->path,prev->name );
+	  mplGotoTheNext=0;
+	  break;
+	 }
 	return;
   }
  if ( stop ) mplEventHandling( evStop,0 );
@@ -306,12 +309,12 @@
 	break;
 #endif
    default:
-	if ( (next=gtkSet( gtkGetNextPlItem,0,NULL)) ) { mplGotoTheNext=0; break; }
-//	 {
-//	  guiSetDF( guiIntfStruct.Filename,next->path,next->name );
-//	  guiIntfStruct.FilenameChanged=1;
-//	  break;
-//	 }
+	if ( (next=gtkSet( gtkGetNextPlItem,0,NULL)) ) 
+	 { 
+	  mplSetFileName( next->path,next->name );
+	  mplGotoTheNext=0;
+	  break;
+	 }
 	return;
   }
  if ( stop ) mplEventHandling( evStop,0 );
--- a/Gui/mplayer/play.h	Thu Jul 25 20:23:18 2002 +0000
+++ b/Gui/mplayer/play.h	Thu Jul 25 20:26:38 2002 +0000
@@ -7,7 +7,6 @@
 #include "./mplayer.h"
 
 extern void mplEnd( void );
-extern void mplStop( void );
 extern void mplFullScreen( void );
 extern void mplPlay( void );
 extern void mplPause( void );
@@ -29,6 +28,6 @@
 extern void ChangeSkin( char * name );
 extern void EventHandling( void );
 
-extern void mplSetFileName( char * fname );
+extern void mplSetFileName( char * dir,char * name );
 
 #endif
--- a/Gui/mplayer/sw.h	Thu Jul 25 20:23:18 2002 +0000
+++ b/Gui/mplayer/sw.h	Thu Jul 25 20:26:38 2002 +0000
@@ -1,7 +1,7 @@
 
 // sub window
 
-int             mplSubRender = 1;
+int             mplSubRender = 0;
 int             SubVisible = 0;
 
 void mplSubDraw( wsParamDisplay )
@@ -16,7 +16,7 @@
 
  if ( guiIntfStruct.Playing ) mplSubRender=0;
 
- if ( mplSubRender )
+ if ( mplSubRender && appMPlayer.subWindow.State == wsWindowExpose )
   {
    if ( appMPlayer.sub.Bitmap.Image ) wsPutImage( &appMPlayer.subWindow );
   }
--- a/Gui/mplayer/widgets.c	Thu Jul 25 20:23:18 2002 +0000
+++ b/Gui/mplayer/widgets.c	Thu Jul 25 20:26:38 2002 +0000
@@ -30,7 +30,6 @@
 #include "../../config.h"
 #include "../../help_mp.h"
 
-GtkWidget     * Options;
 GtkWidget     * PopUpMenu = NULL;
 
 GtkWidget     * WarningPixmap;
@@ -148,6 +147,9 @@
          break;
   }
  gtk_widget_show( MessageBox );
+ gtkSetLayer( MessageBox );
+ if ( type == GTK_MB_FATAL )
+  while ( gtkVMessageBox ) gtk_main_iteration_do( 0 );
 }
 
 void gtkSetLayer( GtkWidget * wdg )
@@ -187,13 +189,9 @@
 	  }
         break;
    case evPreferences:
-        gtkMessageBox( GTK_MB_WARNING,"Sorry, this feature is under development ..." );
-//	Options=create_Options();
-//        gtk_widget_show( Options );
-//	gtkSetLayer( Options );
+        ShowPreferences();
         break;
    case evPlayList:
-//	gtkMessageBox( GTK_MB_WARNING,"Sorry, this feature is under development ..." );
         ShowPlayList();
 	gtkSetLayer( PlayList );
         break;
@@ -226,7 +224,7 @@
 	gtkVisible++;
         break;
    case evHidePopUpMenu:
-        if ( PopUpMenu ) { gtk_widget_hide_on_delete( PopUpMenu ); gtkVisible--; PopUpMenu=NULL; }
+        if ( PopUpMenu ) { gtk_widget_hide_on_delete( PopUpMenu ); /*gtkVisible--;*/ PopUpMenu=NULL; }
         break;
    case evPlayNetwork:
 	ShowURLDialogBox();
--- a/Gui/wm/ws.c	Thu Jul 25 20:23:18 2002 +0000
+++ b/Gui/wm/ws.c	Thu Jul 25 20:26:38 2002 +0000
@@ -293,7 +293,7 @@
   {
    case wsRGB32:
      mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"rgb32 to rgb32\n" );
-     wsConvFunc=BGR8880_to_RGB8880_c;
+     wsConvFunc=(void *)BGR8880_to_RGB8880_c;
      break;
    case wsBGR32:
      mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"rgb32 to bgr32\n" );
@@ -305,7 +305,7 @@
      break;
    case wsBGR24:
      mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"rgb32 to bgr24\n" );
-     wsConvFunc=BGR8880_to_BGR888_c;
+     wsConvFunc=(void *)BGR8880_to_BGR888_c;
      break;
    case wsRGB16:
      mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"rgb32 to rgb16\n" );
@@ -313,7 +313,7 @@
      break;
    case wsBGR16:
      mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"rgb32 to bgr16\n" );
-     wsConvFunc=BGR8880_to_BGR565_c;
+     wsConvFunc=(void *)BGR8880_to_BGR565_c;
      break;
    case wsRGB15:
      mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"rgb32 to rgb15\n" );
@@ -321,7 +321,7 @@
      break;
    case wsBGR15:
      mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"rgb32 to bgr15\n" );
-     wsConvFunc=BGR8880_to_BGR555_c;
+     wsConvFunc=(void *)BGR8880_to_BGR555_c;
      break;
   }
  XSetErrorHandler( wsErrorHandler );
@@ -874,6 +874,7 @@
 {
  if ( win->ReDraw )
   {
+   win->State=wsWindowExpose;
    win->ReDraw( wsDisplay,win->WindowID );
    XFlush( wsDisplay );
   }
--- a/Gui/wm/ws.h	Thu Jul 25 20:23:18 2002 +0000
+++ b/Gui/wm/ws.h	Thu Jul 25 20:26:38 2002 +0000
@@ -224,7 +224,7 @@
 extern void wsSetBackground( wsTWindow * win,int color );
 extern void wsSetForegroundRGB( wsTWindow * win,int r,int g,int b );
 extern void wsSetBackgroundRGB( wsTWindow * win,int r,int g,int b );
-#define wsClearWindow( win ); XClearWindow( wsDisplay,win.WindowID );
+#define wsClearWindow( win ) XClearWindow( wsDisplay,win.WindowID )
 extern void wsSetTitle( wsTWindow * win,char * name );
 extern void wsVisibleWindow( wsTWindow * win,int show );
 extern void wsWindowDecoration( wsTWindow * win,long d );