[Mplayer-cvslog] CVS: main/Gui/mplayer/gtk about.h,NONE,1.1 fs.h,NONE,1.1 mb.h,NONE,1.1 opts.h,NONE,1.1 pl.h,NONE,1.1 sb.h,NONE,1.1

Arpi of Ize arpi at mplayer.dev.hu
Sat Aug 25 23:04:31 CEST 2001


Update of /cvsroot/mplayer/main/Gui/mplayer/gtk
In directory mplayer:/var/tmp.root/cvs-serv13203/mplayer/gtk

Added Files:
	about.h fs.h mb.h opts.h pl.h sb.h 
Log Message:
GUI version n-1

--- NEW FILE ---

#ifndef __WIDGET_ABOUT
#define __WIDGET_ABOUT

#include "../../language.h"

GtkWidget   * About;
GdkColormap * abColorMap;

void ab_Ok_released( GtkButton * button,gpointer user_data)
{
 gtk_widget_hide( AboutBox );
 gtkVisibleAboutBox=0;
}

GtkWidget * create_About( void )
{
 GtkWidget     * frame17;
 GtkWidget     * frame18;
 GtkWidget     * frame19;
 GtkWidget     * frame20;
 GtkWidget     * hbox7;
 GtkWidget     * pixmap1;
 GtkWidget     * vbox8;
 GtkWidget     * label4;
 GtkWidget     * hbuttonbox6;
 GtkWidget     * Ok;
 GtkAccelGroup * accel_group;

 GtkStyle      * pixmapstyle;
 GtkPixmap     * pixmapwid;
 GdkBitmap     * mask;

 accel_group=gtk_accel_group_new();

 About=gtk_window_new( GTK_WINDOW_DIALOG );
 gtk_widget_set_name( About,langAbout );
 gtk_object_set_data( GTK_OBJECT( About ),langAbout,About );
 gtk_widget_set_usize( About,290,105 );
 GTK_WIDGET_SET_FLAGS( About,GTK_CAN_FOCUS );
 GTK_WIDGET_SET_FLAGS( About,GTK_CAN_DEFAULT );
 gtk_window_set_title( GTK_WINDOW( About ),langAbout );
 gtk_window_set_position( GTK_WINDOW( About ),GTK_WIN_POS_CENTER );
 gtk_window_set_modal( GTK_WINDOW( About ),TRUE );
 gtk_window_set_policy( GTK_WINDOW( About ),FALSE,FALSE,FALSE );

 frame17=gtk_frame_new( NULL );
 gtk_widget_set_name( frame17,"frame17" );
 gtk_widget_ref( frame17 );
 gtk_object_set_data_full( GTK_OBJECT( About ),"frame17",frame17,
                          ( GtkDestroyNotify ) gtk_widget_unref );
 gtk_widget_show( frame17 );
 gtk_container_add( GTK_CONTAINER( About ),frame17 );
 gtk_frame_set_shadow_type( GTK_FRAME( frame17 ),GTK_SHADOW_IN );

 frame18=gtk_frame_new( NULL );
 gtk_widget_set_name( frame18,"frame18" );
 gtk_widget_ref( frame18 );
 gtk_object_set_data_full( GTK_OBJECT( About ),"frame18",frame18,
                          ( GtkDestroyNotify ) gtk_widget_unref );
 gtk_widget_show( frame18 );
 gtk_container_add( GTK_CONTAINER( frame17 ),frame18 );
 gtk_frame_set_shadow_type( GTK_FRAME( frame18 ),GTK_SHADOW_NONE );

 frame19=gtk_frame_new( NULL );
 gtk_widget_set_name( frame19,"frame19" );
 gtk_widget_ref( frame19 );
 gtk_object_set_data_full( GTK_OBJECT( About ),"frame19",frame19,( GtkDestroyNotify ) gtk_widget_unref );
 gtk_widget_show( frame19 );
 gtk_container_add( GTK_CONTAINER( frame18 ),frame19 );
 gtk_frame_set_shadow_type( GTK_FRAME( frame19 ),GTK_SHADOW_ETCHED_OUT );

 frame20=gtk_frame_new( NULL );
 gtk_widget_set_name( frame20,"frame20" );
 gtk_widget_ref( frame20 );
 gtk_object_set_data_full( GTK_OBJECT( About ),"frame20",frame20,( GtkDestroyNotify ) gtk_widget_unref );
 gtk_widget_show( frame20 );
 gtk_container_add( GTK_CONTAINER( frame19 ),frame20 );
 gtk_frame_set_shadow_type( GTK_FRAME( frame20 ),GTK_SHADOW_NONE );

 hbox7=gtk_hbox_new( FALSE,0 );
 gtk_widget_set_name( hbox7,"hbox7" );
 gtk_widget_ref( hbox7 );
 gtk_object_set_data_full( GTK_OBJECT( About ),"hbox7",hbox7,
                          ( GtkDestroyNotify ) gtk_widget_unref );
 gtk_widget_show( hbox7 );
 gtk_container_add( GTK_CONTAINER( frame20 ),hbox7 );

 pixmapstyle=gtk_widget_get_style( About );
 pixmapwid=gdk_pixmap_colormap_create_from_xpm_d( About->window,gdk_colormap_get_system(),&mask,&pixmapstyle->bg[GTK_STATE_NORMAL],(gchar **)logo_xpm );pixmap1=gtk_pixmap_new( pixmapwid,mask );

 gtk_widget_set_name( pixmap1,"pixmap1" );
 gtk_widget_ref( pixmap1 );
 gtk_object_set_data_full( GTK_OBJECT( About ),"pixmap1",pixmap1,
                          ( GtkDestroyNotify ) gtk_widget_unref );
 gtk_widget_show( pixmap1 );
 gtk_box_pack_start( GTK_BOX( hbox7 ),pixmap1,TRUE,TRUE,0 );

 vbox8=gtk_vbox_new( FALSE,0 );
 gtk_widget_set_name( vbox8,"vbox8" );
 gtk_widget_ref( vbox8 );
 gtk_object_set_data_full( GTK_OBJECT( About ),"vbox8",vbox8,
                          ( GtkDestroyNotify ) gtk_widget_unref );
 gtk_widget_show( vbox8 );
 gtk_box_pack_start( GTK_BOX( hbox7 ),vbox8,TRUE,TRUE,0 );

 label4=gtk_label_new( "The Movie Player for Linux" );
 gtk_widget_set_name( label4,"label4" );
 gtk_widget_ref( label4 );
 gtk_object_set_data_full( GTK_OBJECT( About ),"label4",label4,
                          ( GtkDestroyNotify ) gtk_widget_unref );
 gtk_widget_show( label4 );
 gtk_box_pack_start( GTK_BOX( vbox8 ),label4,FALSE,FALSE,0 );
 gtk_widget_set_usize( label4,-2,50 );
 gtk_label_set_line_wrap( GTK_LABEL( label4 ),TRUE );

 hbuttonbox6=gtk_hbutton_box_new();
 gtk_widget_set_name( hbuttonbox6,"hbuttonbox6" );
 gtk_widget_ref( hbuttonbox6 );
 gtk_object_set_data_full( GTK_OBJECT( About ),"hbuttonbox6",hbuttonbox6,( GtkDestroyNotify ) gtk_widget_unref );
 gtk_widget_show( hbuttonbox6 );
 gtk_box_pack_start( GTK_BOX( vbox8 ),hbuttonbox6,FALSE,FALSE,0 );
 gtk_button_box_set_spacing( GTK_BUTTON_BOX( hbuttonbox6 ),0 );
 gtk_button_box_set_child_size( GTK_BUTTON_BOX( hbuttonbox6 ),115,33 );

 Ok=gtk_button_new_with_label( langOk );
 gtk_widget_set_name( Ok,langOk );
 gtk_widget_ref( Ok );
 gtk_object_set_data_full( GTK_OBJECT( About ),langOk,Ok,( GtkDestroyNotify ) gtk_widget_unref );
 gtk_widget_show( Ok );
 gtk_container_add( GTK_CONTAINER( hbuttonbox6 ),Ok );
 gtk_widget_set_usize( Ok,49,32 );
 GTK_WIDGET_SET_FLAGS( Ok,GTK_CAN_DEFAULT );
 gtk_widget_add_accelerator (Ok, "released",accel_group,GDK_Return,0,GTK_ACCEL_VISIBLE);

// gtk_signal_connect( GTK_OBJECT( About ),"destroy",GTK_SIGNAL_FUNC( on_About_destroy ),NULL );
 gtk_signal_connect( GTK_OBJECT( About ),"destroy",GTK_SIGNAL_FUNC( ab_Ok_released ),NULL );
 gtk_signal_connect( GTK_OBJECT( Ok ),"released",GTK_SIGNAL_FUNC( ab_Ok_released ),NULL);

 gtk_window_add_accel_group( GTK_WINDOW( About ),accel_group );

 gtk_widget_grab_focus( Ok );
 return About;
}

#endif
--- NEW FILE ---

#ifndef __MY_fsFileSelector
#define __MY_fsFileSelector

#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <sys/stat.h>
#include <glob.h>
#include <unistd.h>

#include "../../language.h"

#ifndef get_current_dir_name
 extern char * get_current_dir_name( void );
#endif

gchar         * fsSelectedFile = NULL;
gchar         * fsSelectedDirectory = NULL;
unsigned char * fsThatDir = ".";
gchar         * fsFilter = NULL;

int             fsPressed = 0;
int             fsLastFilterNames = 2;
unsigned char * fsFilterNames[3][2] = { { "MPEG files( *.mpg )", "*.mpg" },
                                        { "AVI files( *.avi )",  "*.avi" },
                                        { "All files( *)",       "*"     } };

GtkWidget   * fsFileNamesList;
GtkWidget   * fsFNameList;
GtkWidget   * fsFileSelect;
GdkColormap * fsColorMap;
GtkWidget   * fsOk;
GtkWidget   * fsUp;
GtkWidget   * fsCancel;
GtkWidget   * fsCombo4;
GtkWidget   * fsComboEntry2;
GList       * fsList_items = NULL;
GList       * fsTopList_items = NULL;

GtkWidget   * fsItemList[6];
int           fsItemListCounter = 0;

void CheckDir( GtkWidget * list,unsigned char * directory )
{
 struct stat     fs;
 int             i,c=2;
 gchar         * str[1][2];
 GdkPixmap     * dpixmap,*fpixmap,*pixmap;
 GdkBitmap     * dmask,*fmask,*mask;
 GtkStyle      * style;
 glob_t          gg;

 gtk_widget_hide( list );
 str[0][0]=NULL;
 style=gtk_widget_get_style( fsFileSelect );
 dpixmap=gdk_pixmap_colormap_create_from_xpm_d( fsFileSelect->window,fsColorMap,&dmask,&style->bg[GTK_STATE_NORMAL],(gchar **)dir_xpm );
 fpixmap=gdk_pixmap_colormap_create_from_xpm_d( fsFileSelect->window,fsColorMap,&fmask,&style->bg[GTK_STATE_NORMAL],(gchar **)file_xpm );
 pixmap=dpixmap; mask=dmask;
 str[0][0]=NULL; str[0][1]=(gchar *)malloc( 3 );
 strcpy( str[0][1],"." );
 gtk_clist_append( GTK_CLIST( list ),str[0] ); gtk_clist_set_pixmap( GTK_CLIST( list ),0,0,pixmap,mask );
 strcpy( str[0][1],".." );
 gtk_clist_append( GTK_CLIST( list ),str[0] ); gtk_clist_set_pixmap( GTK_CLIST( list ),1,0,pixmap,mask );
 free( str[0][0] );

 glob( "*",GLOB_NOSORT,NULL,&gg );
// glob( ".*",GLOB_NOSORT | GLOB_APPEND,NULL,&gg );
 for(  i=0;i<gg.gl_pathc;i++ )
  {
   if(  !strcmp( gg.gl_pathv[i],"." ) || !strcmp( gg.gl_pathv[i],".." ) ) continue;
   stat( gg.gl_pathv[i],&fs );
   if(  S_ISDIR( fs.st_mode ) )
    {
     str[0][1]=(gchar *)malloc( strlen( gg.gl_pathv[i] ) + 2 );
     strcpy( str[0][1],"" );
     strcat( str[0][1],gg.gl_pathv[i] );
     pixmap=dpixmap; mask=dmask;
     gtk_clist_append( GTK_CLIST( list ),str[0] );
     gtk_clist_set_pixmap( GTK_CLIST( list ),c,0,pixmap,mask );
     free( str[0][1] );
     c++;
    }
  }
 globfree( &gg );
 glob( fsFilter,GLOB_NOSORT,NULL,&gg );
// glob( ".*",GLOB_NOSORT | GLOB_APPEND,NULL,&gg );
 pixmap=fpixmap; mask=fmask;
 for(  i=0;i<gg.gl_pathc;i++ )
  {
   if(  !strcmp( gg.gl_pathv[i],"." ) || !strcmp( gg.gl_pathv[i],".." ) ) continue;
   stat( gg.gl_pathv[i],&fs );
   if(  S_ISDIR( fs.st_mode ) ) continue;
   str[0][1]=(gchar *)malloc( strlen( gg.gl_pathv[i] ) + 2 );
   strcpy( str[0][1],"" ); strcat( str[0][1],gg.gl_pathv[i] );
   gtk_clist_append( GTK_CLIST( list ),str[0] );
   gtk_clist_set_pixmap( GTK_CLIST( list ),c,0,pixmap,mask );
   free( str[0][1] );
   c++;
  }
 globfree( &gg );

 gtk_clist_set_sort_type( GTK_CLIST( list ),GTK_SORT_ASCENDING );
 gtk_clist_set_compare_func( GTK_CLIST( list ),NULL );
 gtk_clist_set_sort_column( GTK_CLIST( list ),1 );
 gtk_clist_sort( GTK_CLIST( list ) );
 gtk_clist_set_column_width( GTK_CLIST( list ),0,17 );
 gtk_clist_select_row( GTK_CLIST( list ),0,1 );
 gtk_widget_show( list );
}

void HideFileSelect( void )
{
 gtk_widget_hide( fsFileSelect );
 gtkVisibleFileSelect=0;
 gtkShMem->vs.window=evLoad;
 gtkSendMessage( evHideWindow );
}

void fs_fsFileSelect_destroy( GtkObject * object,gpointer user_data )
{ HideFileSelect(); }

void fs_combo_entry1_activate( GtkEditable * editable,gpointer user_data )
{
 unsigned char * str;

 str=gtk_entry_get_text( GTK_ENTRY(user_data ) );
 gtk_clist_clear(  GTK_CLIST( fsFNameList ) );
 if(  fsFilter ) free( fsFilter );
 if(  (  fsFilter=(unsigned char *)malloc( strlen( str ) + 1 ) )  == NULL )
  {
   dbprintf( 0,"[gtk] not enough memory.\n" );
   exit( 0 );
  }
 strcpy( fsFilter,str );
 CheckDir( fsFNameList,(unsigned char *)get_current_dir_name() );
}

void fs_combo_entry1_changed( GtkEditable * editable,gpointer user_data )
{
 unsigned char * str;
 int             i;

 str=gtk_entry_get_text( GTK_ENTRY(user_data ) );

 for( i=0;i<fsLastFilterNames+1;i++ )
  {
   if(  !strcmp( str,fsFilterNames[i][0] ) )
    {
     if(  fsFilter ) free( fsFilter );
     if( (  fsFilter=(unsigned char *)malloc( 6 ) ) == NULL )
      {
       dbprintf( 0,"[gtk] not enough memory.\n" );
       exit( 0 );
      }
     strcpy( fsFilter,fsFilterNames[i][1] );
    }
  }
 gtk_clist_clear( GTK_CLIST( fsFNameList ) );
 CheckDir( fsFNameList,(unsigned char *)get_current_dir_name() );
}

void fs_fsComboEntry2_activate( GtkEditable * editable,gpointer user_data )
{
 unsigned char * str;

 str=gtk_entry_get_text( GTK_ENTRY( user_data ) );
 if ( chdir( str ) != -1 )
  {
   gtk_clist_clear(  GTK_CLIST( fsFNameList ) );
   CheckDir( fsFNameList,(unsigned char *)get_current_dir_name() );
  }
}

void fs_fsComboEntry2_changed( GtkEditable * editable,gpointer user_data )
{
 unsigned char * str;

 str=gtk_entry_get_text( GTK_ENTRY( user_data ) );
 fsPressed=2;
// if (
// tmp=(unsigned char *)malloc( strlen( fsSelectedDirectory ) + 5 );
// strcpy( tmp,fsSelectedDirectory ); strcat( tmp,"/*" );
// fprintf( stderr,"str: %s\n",tmp );
// free( tmp );
 if ( chdir( str ) != -1 )
  {
   gtk_clist_clear(  GTK_CLIST( fsFNameList ) );
   CheckDir( fsFNameList,(unsigned char *)get_current_dir_name() );
  }
}

void fs_Up_released( GtkButton * button,gpointer user_data )
{
 chdir( ".." );
 fsSelectedFile=fsThatDir;
 gtk_clist_clear(  GTK_CLIST( user_data ) );
 CheckDir( fsFNameList,(unsigned char *)get_current_dir_name() );
 gtk_entry_set_text( GTK_ENTRY( fsComboEntry2 ),(unsigned char *)get_current_dir_name() );
 return;
}

int fsFileExist( unsigned char * fname )
{
 FILE * f = fopen( fname,"r" );
 if ( f == NULL ) return 0;
 fclose( f );
 return 1;
}

void fs_Ok_released( GtkButton * button,gpointer user_data )
{
 unsigned char * str;
 GList         * item;
 int             size,j,i = 1;
 struct stat     fs;

 stat( fsSelectedFile,&fs );
 if(  S_ISDIR(fs.st_mode ) )
  {
   chdir( fsSelectedFile );
   fsSelectedFile=fsThatDir;
   if(  fsFNameList != NULL ) gtk_clist_clear( GTK_CLIST( fsFNameList ) );
   CheckDir( fsFNameList,(unsigned char *)get_current_dir_name() );
   gtk_entry_set_text( GTK_ENTRY( fsComboEntry2 ),(unsigned char *)get_current_dir_name() );
   return;
  }

 HideFileSelect();

 switch( fsPressed )
  {
   case 1:
        fsSelectedDirectory=(unsigned char *)get_current_dir_name();
        #ifdef DEBUG
         dbprintf( 1,"[gtk-fs] fsSelectedFile: %s\n",fsSelectedFile );
        #endif
        break;
   case 2:
        str=gtk_entry_get_text( GTK_ENTRY( fsComboEntry2 ) );
        fsSelectedFile=str;
        #ifdef DEBUG
         dbprintf( 1,"[gtk-fs] fsSelectedFile: %s\n",fsSelectedFile );
        #endif
        if ( !fsFileExist( fsSelectedFile ) ) return;
        fsSelectedDirectory=fsSelectedFile;
        size=strlen( fsSelectedDirectory );
        for ( j=0;j<size;j++ )
         {
          if ( fsSelectedDirectory[ size - j ] == '/' )
           {
            fsSelectedFile+=size - j + 1;
            fsSelectedDirectory[ size - j ]=0;
            break;
           }
         }
        break;
  }
 strcpy( gtkShMem->fs.dir,fsSelectedDirectory );
 strcpy( gtkShMem->fs.filename,fsSelectedFile );
 item=fsTopList_items;
 while( item )
  {
   if ( !strcmp( item->data,fsSelectedDirectory ) ) i=0;
   item=item->next;
  }
 if ( i )
  {
   fsTopList_items=g_list_prepend( fsTopList_items,(gchar *)get_current_dir_name() );
   gtk_combo_set_popdown_strings( GTK_COMBO( user_data ),fsTopList_items );
  }
 gtkSendMessage( evFileLoaded );
}

void fs_Cancel_released( GtkButton * button,gpointer user_data )
{ HideFileSelect(); }

void fs_fsFNameList_select_row( GtkWidget * widget,gint row,gint column,GdkEventButton *bevent,gpointer user_data )
{
 gtk_clist_get_text( GTK_CLIST(widget ),row,1,&fsSelectedFile ); fsSelectedFile++;
 fsPressed=1;
 if( !bevent ) return;
 if( bevent->type == GDK_2BUTTON_PRESS ) gtk_button_released( GTK_BUTTON( fsOk ) );
}

int fsShift = False;

gboolean on_FileSelect_key_release_event( GtkWidget * widget,GdkEventKey * event,gpointer user_data )
{
 switch ( event->keyval )
  {
   case GDK_Escape:
        if ( !fsShift ) gtk_button_released( GTK_BUTTON( fsCancel ) );
        break;
   case GDK_Return:
        if ( !fsShift ) gtk_button_released( GTK_BUTTON( fsOk ) );
        break;
   case GDK_BackSpace:
        if ( !fsShift ) gtk_button_released( GTK_BUTTON( fsUp ) );
        break;
   case GDK_Tab:
        if ( fsShift )
         {
          fsItemListCounter--;
          if ( fsItemListCounter < 0 ) fsItemListCounter=5;
         }
         else
          {
           fsItemListCounter++;
           if ( fsItemListCounter > 5 ) fsItemListCounter=0;
          }
        gtk_widget_grab_focus( fsItemList[fsItemListCounter] );
        break;
   case GDK_Shift_L:
   case GDK_Shift_R:
        fsShift=False;
        break;
  }
 return FALSE;
}

gboolean on_FileSelect_key_press_event( GtkWidget * widget,GdkEventKey * event,gpointer user_data )
{
 switch ( event->keyval )
  {
   case GDK_Shift_L:
   case GDK_Shift_R:
        fsShift=True;
        break;
  }
 return FALSE;
}

GtkWidget * create_FileSelect( void )
{
 GtkWidget     * FSFrame;
 GtkWidget     * frame2;
 GtkWidget     * frame3;
 GtkWidget     * frame4;
 GtkWidget     * vbox4;
 GtkWidget     * hbox4;
 GtkWidget     * vseparator1;
 GtkWidget     * hseparator1;
 GtkWidget     * hbox6;
 GtkWidget     * fsFNameListWindow;
 GtkWidget     * label1;
 GtkWidget     * hseparator2;
 GtkWidget     * List;
 GtkWidget     * combo_entry1;
 GtkWidget     * hseparator3;
 GtkWidget     * hbuttonbox3;
 int             i;

// GtkWidget     * okpixmapwid,*uppixmapwid,*cancelpixmapwid;
// GdkPixmap     * okpixmap,*uppixmap,*cancelpixmap;
// GdkBitmap     * okmask,*upmask,*cancelmask;
// GtkStyle      * okstyle,*upstyle,*cancelstyle;

 GtkWidget     * uppixmapwid;
 GdkPixmap     * uppixmap;
 GdkBitmap     * upmask;
 GtkStyle      * upstyle;

 if( (  fsFilter=(unsigned char *)malloc( 3 ) ) == NULL )
  {
   dbprintf( 0,"[gtk] not enough memory.\n" );
   exit( 0 );
  }
 strcpy( fsFilter,"*" );

 fsFileSelect=gtk_window_new( GTK_WINDOW_DIALOG );
 gtk_widget_set_name( fsFileSelect,"fsFileSelect" );
 gtk_object_set_data( GTK_OBJECT( fsFileSelect ),"fsFileSelect",fsFileSelect );
 gtk_widget_set_usize( fsFileSelect,416,256 );
 GTK_WIDGET_SET_FLAGS( fsFileSelect,GTK_CAN_FOCUS );
 GTK_WIDGET_SET_FLAGS( fsFileSelect,GTK_CAN_DEFAULT );
 gtk_widget_set_events( fsFileSelect,GDK_EXPOSURE_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK | GDK_FOCUS_CHANGE_MASK | GDK_STRUCTURE_MASK | GDK_PROPERTY_CHANGE_MASK | GDK_VISIBILITY_NOTIFY_MASK );
 gtk_window_set_title( GTK_WINDOW( fsFileSelect ),langFileSelect );
 gtk_window_set_position( GTK_WINDOW( fsFileSelect ),GTK_WIN_POS_CENTER );
 gtk_window_set_policy( GTK_WINDOW( fsFileSelect ),FALSE,FALSE,TRUE );
 fsColorMap=gdk_colormap_get_system();

 FSFrame=gtk_frame_new( NULL );
 gtk_widget_set_name( FSFrame,"FSFrame" );
 gtk_widget_ref( FSFrame );
 gtk_object_set_data_full( GTK_OBJECT( fsFileSelect ),"FSFrame",FSFrame,
                          ( GtkDestroyNotify ) gtk_widget_unref );
 gtk_widget_show( FSFrame );
 gtk_container_add( GTK_CONTAINER( fsFileSelect ),FSFrame );
 gtk_container_set_border_width( GTK_CONTAINER( FSFrame ),1 );
 gtk_frame_set_shadow_type( GTK_FRAME( FSFrame ),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( fsFileSelect ),"frame2",frame2,
                          ( GtkDestroyNotify ) gtk_widget_unref );
 gtk_widget_show( frame2 );
 gtk_container_add( GTK_CONTAINER( FSFrame ),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( fsFileSelect ),"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 );

 frame4=gtk_frame_new( NULL );
 gtk_widget_set_name( frame4,"frame4" );
 gtk_widget_ref( frame4 );
 gtk_object_set_data_full( GTK_OBJECT( fsFileSelect ),"frame4",frame4,
                          ( GtkDestroyNotify ) gtk_widget_unref );
 gtk_widget_show( frame4 );
 gtk_container_add( GTK_CONTAINER( frame3 ),frame4 );
 gtk_container_set_border_width( GTK_CONTAINER( frame4 ),1 );
 gtk_frame_set_shadow_type( GTK_FRAME( frame4 ),GTK_SHADOW_NONE );

 vbox4=gtk_vbox_new( FALSE,0 );
 gtk_widget_set_name( vbox4,"vbox4" );
 gtk_widget_ref( vbox4 );
 gtk_object_set_data_full( GTK_OBJECT( fsFileSelect ),"vbox4",vbox4,
                          ( GtkDestroyNotify ) gtk_widget_unref );
 gtk_widget_show( vbox4 );
 gtk_container_add( GTK_CONTAINER( frame4 ),vbox4 );

 hbox4=gtk_hbox_new( FALSE,0 );
 gtk_widget_set_name( hbox4,"hbox4" );
 gtk_widget_ref( hbox4 );
 gtk_object_set_data_full( GTK_OBJECT( fsFileSelect ),"hbox4",hbox4,
                          ( GtkDestroyNotify ) gtk_widget_unref );
 gtk_widget_show( hbox4 );
 gtk_box_pack_start( GTK_BOX( vbox4 ),hbox4,TRUE,TRUE,0 );

 fsCombo4=gtk_combo_new();
 gtk_widget_set_name( fsCombo4,"fsCombo4" );
 gtk_widget_ref( fsCombo4 );
 gtk_object_set_data_full( GTK_OBJECT( fsFileSelect ),"fsCombo4",fsCombo4,
                          ( GtkDestroyNotify ) gtk_widget_unref );
 gtk_widget_show( fsCombo4 );
 gtk_box_pack_start( GTK_BOX( hbox4 ),fsCombo4,TRUE,TRUE,0 );
 gtk_widget_set_usize( fsCombo4,-2,20 );

 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 );

 fsComboEntry2=GTK_COMBO( fsCombo4 )->entry;
 gtk_widget_set_name( fsComboEntry2,"fsComboEntry2" );
 gtk_widget_ref( fsComboEntry2 );
 gtk_object_set_data_full( GTK_OBJECT( fsFileSelect ),"fsComboEntry2",fsComboEntry2,( GtkDestroyNotify ) gtk_widget_unref );
 gtk_widget_show( fsComboEntry2 );
 gtk_widget_set_usize( fsComboEntry2,-2,20 );

 vseparator1=gtk_vseparator_new();
 gtk_widget_set_name( vseparator1,"vseparator1" );
 gtk_widget_ref( vseparator1 );
 gtk_object_set_data_full( GTK_OBJECT( fsFileSelect ),"vseparator1",vseparator1,
                          ( GtkDestroyNotify ) gtk_widget_unref );
 gtk_widget_show( vseparator1 );
 gtk_box_pack_start( GTK_BOX( hbox4 ),vseparator1,FALSE,TRUE,0 );
 gtk_widget_set_usize( vseparator1,7,20 );

 upstyle=gtk_widget_get_style( fsFileSelect );
 uppixmap=gdk_pixmap_colormap_create_from_xpm_d( fsFileSelect->window,fsColorMap,&upmask,&upstyle->bg[GTK_STATE_NORMAL],(gchar **)up_xpm );
 uppixmapwid=gtk_pixmap_new( uppixmap,upmask );
 gtk_widget_show( uppixmapwid );

 fsUp=gtk_button_new();
 gtk_container_add( GTK_CONTAINER(fsUp ),uppixmapwid );
 gtk_widget_show( fsUp );
 gtk_box_pack_start( GTK_BOX( hbox4 ),fsUp,FALSE,FALSE,0 );
 gtk_widget_set_usize( fsUp,65,15 );

 hseparator1=gtk_hseparator_new();
 gtk_widget_set_name( hseparator1,"hseparator1" );
 gtk_widget_ref( hseparator1 );
 gtk_object_set_data_full( GTK_OBJECT( fsFileSelect ),"hseparator1",hseparator1,
                          ( GtkDestroyNotify ) gtk_widget_unref );
 gtk_widget_show( hseparator1 );
 gtk_box_pack_start( GTK_BOX( vbox4 ),hseparator1,FALSE,TRUE,0 );
 gtk_widget_set_usize( hseparator1,-2,8 );

 hbox6=gtk_hbox_new( FALSE,0 );
 gtk_widget_set_name( hbox6,"hbox6" );
 gtk_widget_ref( hbox6 );
 gtk_object_set_data_full( GTK_OBJECT( fsFileSelect ),"hbox6",hbox6,
                          ( GtkDestroyNotify ) gtk_widget_unref );
 gtk_widget_show( hbox6 );
 gtk_box_pack_start( GTK_BOX( vbox4 ),hbox6,TRUE,TRUE,0 );

 fsFNameListWindow=gtk_scrolled_window_new( NULL,NULL );
 gtk_widget_set_name( fsFNameListWindow,"fsFNameListWindow" );
 gtk_widget_ref( fsFNameListWindow );
 gtk_object_set_data_full( GTK_OBJECT( fsFileSelect ),"fsFNameListWindow",fsFNameListWindow,
                          ( GtkDestroyNotify ) gtk_widget_unref );
 gtk_widget_show( fsFNameListWindow );
 gtk_box_pack_start( GTK_BOX( hbox6 ),fsFNameListWindow,TRUE,TRUE,0 );
 gtk_widget_set_usize( fsFNameListWindow,-2,145 );
 gtk_scrolled_window_set_policy( GTK_SCROLLED_WINDOW( fsFNameListWindow ),GTK_POLICY_NEVER,GTK_POLICY_AUTOMATIC );

 fsFNameList=gtk_clist_new( 2 );
 gtk_widget_set_name( fsFNameList,"fsFNameList" );
 gtk_widget_ref( fsFNameList );
 gtk_object_set_data_full( GTK_OBJECT( fsFileSelect ),"fsFNameList",fsFNameList,
                          ( GtkDestroyNotify ) gtk_widget_unref );
 gtk_container_add( GTK_CONTAINER( fsFNameListWindow ),fsFNameList );
 gtk_clist_set_column_width( GTK_CLIST( fsFNameList ),0,80 );
 gtk_clist_set_selection_mode( GTK_CLIST( fsFNameList ),GTK_SELECTION_BROWSE );
 gtk_clist_column_titles_hide( GTK_CLIST( fsFNameList ) );
 gtk_clist_set_shadow_type( GTK_CLIST( fsFNameList ),GTK_SHADOW_ETCHED_OUT );
 CheckDir( fsFNameList,(unsigned char *)get_current_dir_name() );

 label1=gtk_label_new( "label1" );
 gtk_widget_set_name( label1,"label1" );
 gtk_widget_ref( label1 );
 gtk_object_set_data_full( GTK_OBJECT( fsFileSelect ),"label1",label1,
                          ( GtkDestroyNotify ) gtk_widget_unref );
 gtk_widget_show( label1 );
 gtk_clist_set_column_widget( GTK_CLIST( fsFNameList ),0,label1 );

 hseparator2=gtk_hseparator_new();
 gtk_widget_set_name( hseparator2,"hseparator2" );
 gtk_widget_ref( hseparator2 );
 gtk_object_set_data_full( GTK_OBJECT( fsFileSelect ),"hseparator2",hseparator2,
                          ( GtkDestroyNotify ) gtk_widget_unref );
 gtk_widget_show( hseparator2 );
 gtk_box_pack_start( GTK_BOX( vbox4 ),hseparator2,FALSE,TRUE,0 );
 gtk_widget_set_usize( hseparator2,-2,9 );

 List=gtk_combo_new();
 gtk_widget_set_name( List,"List" );
 gtk_widget_ref( List );
 gtk_object_set_data_full( GTK_OBJECT( fsFileSelect ),"List",List,
                          ( GtkDestroyNotify ) gtk_widget_unref );
 gtk_widget_show( List );
 gtk_box_pack_start( GTK_BOX( vbox4 ),List,FALSE,FALSE,0 );
 gtk_widget_set_usize( List,-2,20 );
 fsList_items=NULL;
 for( i=0;i<fsLastFilterNames + 1;i++ )
   fsList_items=g_list_append( fsList_items,fsFilterNames[i][0] );
 gtk_combo_set_popdown_strings( GTK_COMBO( List ),fsList_items );
 g_list_free( fsList_items );

 combo_entry1=GTK_COMBO( List )->entry;
 gtk_widget_set_name( combo_entry1,"combo_entry1" );
 gtk_widget_ref( combo_entry1 );
 gtk_object_set_data_full( GTK_OBJECT( fsFileSelect ),"combo_entry1",combo_entry1,
                          ( GtkDestroyNotify ) gtk_widget_unref );
 gtk_widget_show( combo_entry1 );
 gtk_entry_set_text( GTK_ENTRY( combo_entry1 ),fsFilterNames[fsLastFilterNames][0] );

 hseparator3=gtk_hseparator_new();
 gtk_widget_set_name( hseparator3,"hseparator3" );
 gtk_widget_ref( hseparator3 );
 gtk_object_set_data_full( GTK_OBJECT( fsFileSelect ),"hseparator3",hseparator3,
                          ( GtkDestroyNotify ) gtk_widget_unref );
 gtk_widget_show( hseparator3 );
 gtk_box_pack_start( GTK_BOX( vbox4 ),hseparator3,FALSE,TRUE,0 );
 gtk_widget_set_usize( hseparator3,-2,7 );

 hbuttonbox3=gtk_hbutton_box_new();
 gtk_widget_set_name( hbuttonbox3,"hbuttonbox3" );
 gtk_widget_ref( hbuttonbox3 );
 gtk_object_set_data_full( GTK_OBJECT( fsFileSelect ),"hbuttonbox3",hbuttonbox3,
                          ( GtkDestroyNotify ) gtk_widget_unref );
 gtk_widget_show( hbuttonbox3 );
 gtk_box_pack_start( GTK_BOX( vbox4 ),hbuttonbox3,FALSE,TRUE,0 );
 gtk_button_box_set_layout( GTK_BUTTON_BOX( hbuttonbox3 ),GTK_BUTTONBOX_END );
 gtk_button_box_set_spacing( GTK_BUTTON_BOX( hbuttonbox3 ),10 );
 gtk_button_box_set_child_size( GTK_BUTTON_BOX( hbuttonbox3 ),85,20 );
 gtk_button_box_set_child_ipadding( GTK_BUTTON_BOX( hbuttonbox3 ),0,0 );

// okstyle=gtk_widget_get_style( fsFileSelect );
// okpixmap=gdk_pixmap_colormap_create_from_xpm_d( fsFileSelect->window,fsColorMap,&okmask,&okstyle->bg[GTK_STATE_NORMAL],(gchar **)ok_xpm );
// okpixmapwid=gtk_pixmap_new( okpixmap,okmask );
// gtk_widget_show( okpixmapwid );
// fsOk=gtk_button_new();
// gtk_container_add( GTK_CONTAINER(fsOk ),okpixmapwid );
// gtk_container_add( GTK_CONTAINER( hbuttonbox3 ),fsOk );
// gtk_widget_show( fsOk );

 fsOk=gtk_button_new_with_label( langOk );
 gtk_widget_set_name( fsOk,langOk );
 gtk_widget_ref( fsOk );
 gtk_object_set_data_full( GTK_OBJECT( fsFileSelect ),langOk,fsOk,( GtkDestroyNotify )gtk_widget_unref );
 gtk_container_add( GTK_CONTAINER( hbuttonbox3 ),fsOk );
 gtk_widget_show( fsOk );

// cancelstyle=gtk_widget_get_style( fsFileSelect );
// cancelpixmap=gdk_pixmap_colormap_create_from_xpm_d( fsFileSelect->window,fsColorMap,&cancelmask,&cancelstyle->bg[GTK_STATE_NORMAL],(gchar **)cancel_xpm );
// cancelpixmapwid=gtk_pixmap_new( cancelpixmap,cancelmask );
// gtk_widget_show( cancelpixmapwid );
// fsCancel=gtk_button_new();
// gtk_widget_show( fsCancel );
// gtk_container_add( GTK_CONTAINER( fsCancel ),cancelpixmapwid );
// gtk_container_add( GTK_CONTAINER( hbuttonbox3 ),fsCancel );
// gtk_widget_show( fsCancel );

 fsCancel=gtk_button_new_with_label( langCancel );
 gtk_widget_set_name( fsCancel,langCancel );
 gtk_widget_ref( fsCancel );
 gtk_object_set_data_full( GTK_OBJECT( fsFileSelect ),langCancel,fsCancel,( GtkDestroyNotify )gtk_widget_unref );
 gtk_container_add( GTK_CONTAINER( hbuttonbox3 ),fsCancel );
 gtk_widget_show( fsCancel );

 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 ),"key_press_event",
                     GTK_SIGNAL_FUNC( on_FileSelect_key_press_event ),
                     NULL );
 gtk_signal_connect( GTK_OBJECT( combo_entry1 ),"changed",
                     GTK_SIGNAL_FUNC( fs_combo_entry1_changed ),
                     combo_entry1 );
 gtk_signal_connect( GTK_OBJECT( combo_entry1 ),"activate",
                     GTK_SIGNAL_FUNC( fs_combo_entry1_activate ),
                     combo_entry1 );
 gtk_signal_connect( GTK_OBJECT( fsComboEntry2 ),"changed",
                     GTK_SIGNAL_FUNC( fs_fsComboEntry2_changed ),
                     fsComboEntry2 );
 gtk_signal_connect( GTK_OBJECT( fsComboEntry2 ),"activate",
                     GTK_SIGNAL_FUNC( fs_fsComboEntry2_activate ),
                     fsComboEntry2 );
 gtk_signal_connect( GTK_OBJECT( fsUp ),"released",
                     GTK_SIGNAL_FUNC( fs_Up_released ),
                     fsFNameList );
 gtk_signal_connect( GTK_OBJECT( fsOk ),"released",
                     GTK_SIGNAL_FUNC( fs_Ok_released ),
                     fsCombo4 );
 gtk_signal_connect( GTK_OBJECT( fsCancel ),"released",
                     GTK_SIGNAL_FUNC( fs_Cancel_released ),
                     NULL );

 gtk_signal_connect( GTK_OBJECT( fsFNameList ),"select_row",
                    ( GtkSignalFunc ) fs_fsFNameList_select_row,
                     NULL );

 gtk_widget_grab_focus( fsFNameList );

 fsItemList[0]=fsFNameList;
 fsItemList[1]=combo_entry1;
 fsItemList[2]=fsOk;
 fsItemList[3]=fsCancel;
 fsItemList[4]=fsUp;
 fsItemList[5]=fsComboEntry2;

 return fsFileSelect;
}

#endif
--- NEW FILE ---

#ifndef __MY_MESSAGEBOX
#define __MY_MESSAGEBOX

#include "../../language.h"

GtkWidget * gtkMessageBoxText;

void on_MessageBox_destroy( GtkObject * object,gpointer user_data )
{
 gtk_widget_hide( MessageBox );
 gtkVisibleMessageBox=0;
}

void on_Ok_released( GtkButton * button,gpointer user_data )
{
 gtk_widget_hide( MessageBox );
 gtkVisibleMessageBox=0;
 gtkSendMessage( evMessageBox );
}

GtkWidget * create_MessageBox( void )
{
  GtkWidget *MessageBox;
  GtkWidget *frame1;
  GtkWidget *frame2;
  GtkWidget *frame3;
  GtkWidget *frame4;
  GtkWidget *vbox1;
  GtkWidget *vbox2;
  GtkWidget *hseparator1;
  GtkWidget *hbuttonbox1;
  GtkWidget *Ok;
  GtkAccelGroup *accel_group;

  accel_group=gtk_accel_group_new();

  MessageBox=gtk_window_new( GTK_WINDOW_DIALOG );
  gtk_widget_set_name( MessageBox,langMessageBox );
  gtk_object_set_data( GTK_OBJECT( MessageBox ),langMessageBox,MessageBox );
  gtk_widget_set_usize( MessageBox,420,128 );
  GTK_WIDGET_SET_FLAGS( MessageBox,GTK_CAN_FOCUS );
  GTK_WIDGET_SET_FLAGS( MessageBox,GTK_CAN_DEFAULT );
  gtk_widget_set_events( MessageBox,GDK_EXPOSURE_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK | GDK_FOCUS_CHANGE_MASK | GDK_STRUCTURE_MASK );
  gtk_window_set_title( GTK_WINDOW( MessageBox ),langMessageBox );
  gtk_window_set_position( GTK_WINDOW( MessageBox ),GTK_WIN_POS_CENTER );
  gtk_window_set_modal( GTK_WINDOW( MessageBox ),TRUE );
  gtk_window_set_policy( GTK_WINDOW( MessageBox ),FALSE,FALSE,FALSE );
  gtk_window_set_wmclass( GTK_WINDOW( MessageBox ),langMessageBox,langMessageBox );

  frame1=gtk_frame_new( NULL );
  gtk_widget_set_name( frame1,"frame1" );
  gtk_widget_ref( frame1 );
  gtk_object_set_data_full( GTK_OBJECT( MessageBox ),"frame1",frame1,
                           ( GtkDestroyNotify ) gtk_widget_unref );
  gtk_widget_show( frame1 );
  gtk_container_add( GTK_CONTAINER( MessageBox ),frame1 );
  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( MessageBox ),"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( MessageBox ),"frame3",frame3,
                           ( GtkDestroyNotify ) gtk_widget_unref );
  gtk_widget_show( frame3 );
  gtk_container_add( GTK_CONTAINER( frame2 ),frame3 );

  frame4=gtk_frame_new( NULL );
  gtk_widget_set_name( frame4,"frame4" );
  gtk_widget_ref( frame4 );
  gtk_object_set_data_full( GTK_OBJECT( MessageBox ),"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( MessageBox ),"vbox1",vbox1,
                           ( GtkDestroyNotify ) gtk_widget_unref );
  gtk_widget_show( vbox1 );
  gtk_container_add( GTK_CONTAINER( frame4 ),vbox1 );

  vbox2=gtk_vbox_new( FALSE,0 );
  gtk_widget_set_name( vbox2,"vbox2" );
  gtk_widget_ref( vbox2 );
  gtk_object_set_data_full( GTK_OBJECT( MessageBox ),"vbox2",vbox2,
                           ( GtkDestroyNotify ) gtk_widget_unref );
  gtk_widget_show( vbox2 );
  gtk_box_pack_start( GTK_BOX( vbox1 ),vbox2,TRUE,FALSE,0 );

  gtkMessageBoxText=gtk_label_new( "Ez." );
  gtk_widget_set_name( gtkMessageBoxText,"gtkMessageBoxText" );
  gtk_widget_ref( gtkMessageBoxText );
  gtk_object_set_data_full( GTK_OBJECT( MessageBox ),"gtkMessageBoxText",gtkMessageBoxText,
                           ( GtkDestroyNotify ) gtk_widget_unref );
  gtk_widget_show( gtkMessageBoxText );
  gtk_box_pack_start( GTK_BOX( vbox2 ),gtkMessageBoxText,FALSE,FALSE,0 );
//  gtk_widget_set_usize( gtkMessageBoxText,-2,77 );
  gtk_widget_set_usize( gtkMessageBoxText,384,77 );
  gtk_label_set_justify( GTK_LABEL( gtkMessageBoxText ),GTK_JUSTIFY_FILL );
  gtk_label_set_line_wrap( GTK_LABEL( gtkMessageBoxText ),TRUE );

  hseparator1=gtk_hseparator_new();
  gtk_widget_set_name( hseparator1,"hseparator1" );
  gtk_widget_ref( hseparator1 );
  gtk_object_set_data_full( GTK_OBJECT( MessageBox ),"hseparator1",hseparator1,
                           ( GtkDestroyNotify ) gtk_widget_unref );
  gtk_widget_show( hseparator1 );
  gtk_box_pack_start( GTK_BOX( vbox2 ),hseparator1,TRUE,TRUE,0 );

  hbuttonbox1=gtk_hbutton_box_new();
  gtk_widget_set_name( hbuttonbox1,"hbuttonbox1" );
  gtk_widget_ref( hbuttonbox1 );
  gtk_object_set_data_full( GTK_OBJECT( MessageBox ),"hbuttonbox1",hbuttonbox1,
                           ( GtkDestroyNotify ) gtk_widget_unref );
  gtk_widget_show( hbuttonbox1 );
  gtk_box_pack_start( GTK_BOX( vbox1 ),hbuttonbox1,FALSE,FALSE,0 );
  GTK_WIDGET_SET_FLAGS( hbuttonbox1,GTK_CAN_FOCUS );
  GTK_WIDGET_SET_FLAGS( hbuttonbox1,GTK_CAN_DEFAULT );
  gtk_button_box_set_spacing( GTK_BUTTON_BOX( hbuttonbox1 ),0 );
  gtk_button_box_set_child_size( GTK_BUTTON_BOX( hbuttonbox1 ),60,0 );
  gtk_button_box_set_child_ipadding( GTK_BUTTON_BOX( hbuttonbox1 ),10,0 );

  Ok=gtk_button_new_with_label( langOk );
  gtk_widget_set_name( Ok,langOk );
  gtk_widget_ref( Ok );
  gtk_object_set_data_full( GTK_OBJECT( MessageBox ),langOk,Ok,
                           ( GtkDestroyNotify ) gtk_widget_unref );
  gtk_widget_show( Ok );
  gtk_container_add( GTK_CONTAINER( hbuttonbox1 ),Ok );
  gtk_widget_set_usize( Ok,100,-2 );
  GTK_WIDGET_SET_FLAGS( Ok,GTK_CAN_DEFAULT );
  gtk_widget_add_accelerator( Ok,"released",accel_group,
                              GDK_Return,0,
                              GTK_ACCEL_VISIBLE );

  gtk_signal_connect( GTK_OBJECT( MessageBox ),"destroy",
                      GTK_SIGNAL_FUNC( on_MessageBox_destroy ),
                      NULL );
  gtk_signal_connect( GTK_OBJECT( Ok ),"released",
                      GTK_SIGNAL_FUNC( on_Ok_released ),
                      NULL );

  gtk_window_add_accel_group( GTK_WINDOW( MessageBox ),accel_group );

  return MessageBox;
}

#endif
--- NEW FILE ---

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;

int opShift = False;

void HideOptions( void )
{
 gtk_widget_hide( Options );
 gtkVisibleOptions=0;
 gtkShMem->vs.window=evPreferences;
 gtkSendMessage( evHideWindow );
}

gboolean on_window2_key_press_event( GtkWidget * widget,GdkEventKey * event,gpointer user_data )
{
 switch ( event->keyval )
  {
   case GDK_Shift_L:
   case GDK_Shift_R:
        opShift=True;
        break;
  }
 return FALSE;
}

gboolean on_window2_key_release_event( GtkWidget * widget,GdkEventKey * event,gpointer user_data )
{
 switch ( event->keyval )
  {
   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=False;
        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 )
{
}

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 )
{
}

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 )
{
  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 )
{
}

GtkWidget * create_Options( 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;

 tooltips = gtk_tooltips_new ();

 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 (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);

 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);

 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);

 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);

 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);

 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);

 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);

 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);

 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);

 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);

 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);

 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);

 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);

 #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

 gtk_option_menu_set_menu (GTK_OPTION_MENU (opAudioDriverMenu), opAudioDriverMenu_menu);

 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);

 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);

 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);

 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);

 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);

 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);

 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);

 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);

 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);

 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);

 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);

 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);

 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);

 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);

 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);

 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);

 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);

 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);

 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);

 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);

 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);

 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);

 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);

 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);

 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);

 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);

 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);

 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);

 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);

 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);

 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);

 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);

 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);

 gtk_object_set_data (GTK_OBJECT (Options), "tooltips", tooltips);

 return Options;
}

--- NEW FILE ---

// play list

#ifndef __MY_PLAYLIST
#define __MY_PLAYLIST

#include "../../language.h"

void HidePlayList( void )
{
 gtk_widget_hide( PlayList );
 gtkVisiblePlayList=0;
 gtkShMem->vs.window=evPlayList;
 gtkSendMessage( evHideWindow );
}

void pl_PlayList_destroy( GtkObject * object,gpointer user_data )
{ HidePlayList(); }

void pl_Add_released( GtkButton * button,gpointer user_data )
{
}

void pl_Remove_released( GtkButton * button,gpointer user_data )
{
}

void pl_Ok_released( GtkButton * button,gpointer user_data )
{ HidePlayList(); }

void pl_Cancel_released( GtkButton * button,gpointer user_data )
{ HidePlayList(); }

void pl_DirTree_select_child( GtkTree * tree,GtkWidget * widget,gpointer user_data )
{
}

void pl_DirTree_selection_changed( GtkTree * tree,gpointer user_data )
{
}

void pl_DirTree_unselect_child( GtkTree * tree,GtkWidget * widget,gpointer user_data )
{
}

void pl_FNameList_select_child( GtkList * list,GtkWidget * widget,gpointer user_data )
{
}

void pl_FNameList_selection_changed( GtkList * list,gpointer user_data )
{
}

void pl_FNameList_unselect_child( GtkList * list,GtkWidget * widget,gpointer user_data )
{
}

void pl_SelectedList_select_child( GtkList * list,GtkWidget * widget,gpointer user_data )
{
}

void pl_SelectedList_selection_changed( GtkList * list,gpointer user_data )
{
}

void pl_SelectedList_unselect_child( GtkList * list,GtkWidget * widget,gpointer user_data )
{
}

GtkWidget* create_PlayList( void )
{
  GtkWidget *PlayList;
  GtkWidget *frame9;
  GtkWidget *frame10;
  GtkWidget *frame11;
  GtkWidget *frame12;
  GtkWidget *hbox5;
  GtkWidget *frame13;
  GtkWidget *frame14;
  GtkWidget *DirTree;
  GtkWidget *vbox6;
  GtkWidget *frame15;
  GtkWidget *FNameList;
  GtkWidget *frame16;
  GtkWidget *SelectedList;
  GtkWidget *hseparator6;
  GtkWidget *hbuttonbox5;
  GtkWidget *Add;
  GtkWidget *Remove;
  GtkWidget *Ok;
  GtkWidget *Cancel;

  PlayList = gtk_window_new( GTK_WINDOW_DIALOG );
  gtk_object_set_data( GTK_OBJECT( PlayList ),langPlayList,PlayList );
  gtk_widget_set_usize( PlayList,512,256 );
  GTK_WIDGET_SET_FLAGS( PlayList,GTK_CAN_FOCUS );
  GTK_WIDGET_SET_FLAGS( PlayList,GTK_CAN_DEFAULT );
  gtk_widget_set_events( PlayList,GDK_EXPOSURE_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK | GDK_FOCUS_CHANGE_MASK | GDK_STRUCTURE_MASK | GDK_PROPERTY_CHANGE_MASK | GDK_VISIBILITY_NOTIFY_MASK );
  gtk_window_set_title( GTK_WINDOW( PlayList ),langPlayList );
  gtk_window_set_position( GTK_WINDOW( PlayList ),GTK_WIN_POS_CENTER );
  gtk_window_set_policy( GTK_WINDOW( PlayList ),FALSE,FALSE,TRUE );

  frame9 = gtk_frame_new( NULL );
  gtk_widget_ref( frame9 );
  gtk_object_set_data_full( GTK_OBJECT( PlayList ),"frame9",frame9,
                           ( GtkDestroyNotify ) gtk_widget_unref );
  gtk_widget_show( frame9 );
  gtk_container_add( GTK_CONTAINER( PlayList ),frame9 );
  gtk_container_set_border_width( GTK_CONTAINER( frame9 ),1 );
  gtk_frame_set_shadow_type( GTK_FRAME( frame9 ),GTK_SHADOW_IN );

  frame10 = gtk_frame_new( NULL );
  gtk_widget_ref( frame10 );
  gtk_object_set_data_full( GTK_OBJECT( PlayList ),"frame10",frame10,
                           ( GtkDestroyNotify ) gtk_widget_unref );
  gtk_widget_show( frame10 );
  gtk_container_add( GTK_CONTAINER( frame9 ),frame10 );
  gtk_frame_set_shadow_type( GTK_FRAME( frame10 ),GTK_SHADOW_NONE );

  frame11 = gtk_frame_new( NULL );
  gtk_widget_ref( frame11 );
  gtk_object_set_data_full( GTK_OBJECT( PlayList ),"frame11",frame11,
                           ( GtkDestroyNotify ) gtk_widget_unref );
  gtk_widget_show( frame11 );
  gtk_container_add( GTK_CONTAINER( frame10 ),frame11 );
  gtk_frame_set_shadow_type( GTK_FRAME( frame11 ),GTK_SHADOW_ETCHED_OUT );

  frame12 = gtk_frame_new( NULL );
  gtk_widget_ref( frame12 );
  gtk_object_set_data_full( GTK_OBJECT( PlayList ),"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 );

  hbox5 = gtk_hbox_new( FALSE,0 );
  gtk_widget_ref( hbox5 );
  gtk_object_set_data_full( GTK_OBJECT( PlayList ),"hbox5",hbox5,
                           ( GtkDestroyNotify ) gtk_widget_unref );
  gtk_widget_show( hbox5 );
  gtk_container_add( GTK_CONTAINER( frame12 ),hbox5 );

  frame13 = gtk_frame_new( NULL );
  gtk_widget_ref( frame13 );
  gtk_object_set_data_full( GTK_OBJECT( PlayList ),"frame13",frame13,
                           ( GtkDestroyNotify ) gtk_widget_unref );
  gtk_widget_show( frame13 );
  gtk_box_pack_start( GTK_BOX( hbox5 ),frame13,TRUE,TRUE,0 );
  gtk_frame_set_shadow_type( GTK_FRAME( frame13 ),GTK_SHADOW_ETCHED_OUT );

  frame14 = gtk_frame_new( NULL );
  gtk_widget_ref( frame14 );
  gtk_object_set_data_full( GTK_OBJECT( PlayList ),"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 );

  DirTree = gtk_tree_new();
  gtk_widget_ref( DirTree );
  gtk_object_set_data_full( GTK_OBJECT( PlayList ),"DirTree",DirTree,
                           ( GtkDestroyNotify ) gtk_widget_unref );
  gtk_widget_show( DirTree );
  gtk_container_add( GTK_CONTAINER( frame14 ),DirTree );
  gtk_widget_set_usize( DirTree,217,-2 );

  vbox6 = gtk_vbox_new( FALSE,0 );
  gtk_widget_ref( vbox6 );
  gtk_object_set_data_full( GTK_OBJECT( PlayList ),"vbox6",vbox6,
                           ( GtkDestroyNotify ) gtk_widget_unref );
  gtk_widget_show( vbox6 );
  gtk_box_pack_start( GTK_BOX( hbox5 ),vbox6,TRUE,TRUE,0 );

  frame15 = gtk_frame_new( NULL );
  gtk_widget_ref( frame15 );
  gtk_object_set_data_full( GTK_OBJECT( PlayList ),"frame15",frame15,
                           ( GtkDestroyNotify ) gtk_widget_unref );
  gtk_widget_show( frame15 );
  gtk_box_pack_start( GTK_BOX( vbox6 ),frame15,TRUE,TRUE,0 );
  gtk_frame_set_shadow_type( GTK_FRAME( frame15 ),GTK_SHADOW_ETCHED_OUT );

  FNameList = gtk_list_new();
  gtk_widget_ref( FNameList );
  gtk_object_set_data_full( GTK_OBJECT( PlayList ),"FNameList",FNameList,
                           ( GtkDestroyNotify ) gtk_widget_unref );
  gtk_widget_show( FNameList );
  gtk_container_add( GTK_CONTAINER( frame15 ),FNameList );

  frame16 = gtk_frame_new( NULL );
  gtk_widget_ref( frame16 );
  gtk_object_set_data_full( GTK_OBJECT( PlayList ),"frame16",frame16,
                           ( GtkDestroyNotify ) gtk_widget_unref );
  gtk_widget_show( frame16 );
  gtk_box_pack_start( GTK_BOX( vbox6 ),frame16,TRUE,TRUE,0 );
  gtk_frame_set_shadow_type( GTK_FRAME( frame16 ),GTK_SHADOW_ETCHED_OUT );

  SelectedList = gtk_list_new();
  gtk_widget_ref( SelectedList );
  gtk_object_set_data_full( GTK_OBJECT( PlayList ),"SelectedList",SelectedList,
                           ( GtkDestroyNotify ) gtk_widget_unref );
  gtk_widget_show( SelectedList );
  gtk_container_add( GTK_CONTAINER( frame16 ),SelectedList );

  hseparator6 = gtk_hseparator_new();
  gtk_widget_ref( hseparator6 );
  gtk_object_set_data_full( GTK_OBJECT( PlayList ),"hseparator6",hseparator6,
                           ( GtkDestroyNotify ) gtk_widget_unref );
  gtk_widget_show( hseparator6 );
  gtk_box_pack_start( GTK_BOX( vbox6 ),hseparator6,FALSE,TRUE,0 );
  gtk_widget_set_usize( hseparator6,-2,11 );

  hbuttonbox5 = gtk_hbutton_box_new();
  gtk_widget_ref( hbuttonbox5 );
  gtk_object_set_data_full( GTK_OBJECT( PlayList ),"hbuttonbox5",hbuttonbox5,
                           ( GtkDestroyNotify ) gtk_widget_unref );
  gtk_widget_show( hbuttonbox5 );
  gtk_box_pack_start( GTK_BOX( vbox6 ),hbuttonbox5,FALSE,FALSE,0 );
  gtk_button_box_set_layout( GTK_BUTTON_BOX( hbuttonbox5 ),GTK_BUTTONBOX_END );
  gtk_button_box_set_spacing( GTK_BUTTON_BOX( hbuttonbox5 ),0 );
  gtk_button_box_set_child_size( GTK_BUTTON_BOX( hbuttonbox5 ),65,27 );
  gtk_button_box_set_child_ipadding( GTK_BUTTON_BOX( hbuttonbox5 ),2,0 );

  Add = gtk_button_new_with_label( langAdd );
  gtk_widget_ref( Add );
  gtk_object_set_data_full( GTK_OBJECT( PlayList ),langAdd,Add,
                           ( GtkDestroyNotify ) gtk_widget_unref );
  gtk_widget_show( Add );
  gtk_container_add( GTK_CONTAINER( hbuttonbox5 ),Add );
  gtk_widget_set_usize( Add,45,-2 );
  GTK_WIDGET_SET_FLAGS( Add,GTK_CAN_DEFAULT );

  Remove = gtk_button_new_with_label( langRemove );
  gtk_widget_ref( Remove );
  gtk_object_set_data_full( GTK_OBJECT( PlayList ),langRemove,Remove,
                           ( GtkDestroyNotify ) gtk_widget_unref );
  gtk_widget_show( Remove );
  gtk_container_add( GTK_CONTAINER( hbuttonbox5 ),Remove );
  gtk_widget_set_usize( Remove,45,-2 );
  GTK_WIDGET_SET_FLAGS( Remove,GTK_CAN_DEFAULT );

  Ok = gtk_button_new_with_label( langOk );
  gtk_widget_ref( Ok );
  gtk_object_set_data_full( GTK_OBJECT( PlayList ),langOk,Ok,
                           ( GtkDestroyNotify ) gtk_widget_unref );
  gtk_widget_show( Ok );
  gtk_container_add( GTK_CONTAINER( hbuttonbox5 ),Ok );
  gtk_widget_set_usize( Ok,45,-2 );
  GTK_WIDGET_SET_FLAGS( Ok,GTK_CAN_DEFAULT );

  Cancel = gtk_button_new_with_label( langCancel );
  gtk_widget_ref( Cancel );
  gtk_object_set_data_full( GTK_OBJECT( PlayList ),langCancel,Cancel,
                           ( GtkDestroyNotify ) gtk_widget_unref );
  gtk_widget_show( Cancel );
  gtk_container_add( GTK_CONTAINER( hbuttonbox5 ),Cancel );
  gtk_widget_set_usize( Cancel,45,-2 );
  GTK_WIDGET_SET_FLAGS( Cancel,GTK_CAN_DEFAULT );

  gtk_signal_connect( GTK_OBJECT( PlayList ),"destroy",
                      GTK_SIGNAL_FUNC( pl_PlayList_destroy ),
                      NULL );
  gtk_signal_connect( GTK_OBJECT( DirTree ),"select_child",
                      GTK_SIGNAL_FUNC( pl_DirTree_select_child ),
                      NULL );
  gtk_signal_connect( GTK_OBJECT( DirTree ),"selection_changed",
                      GTK_SIGNAL_FUNC( pl_DirTree_selection_changed ),
                      NULL );
  gtk_signal_connect( GTK_OBJECT( DirTree ),"unselect_child",
                      GTK_SIGNAL_FUNC( pl_DirTree_unselect_child ),
                      NULL );
  gtk_signal_connect( GTK_OBJECT( FNameList ),"select_child",
                      GTK_SIGNAL_FUNC( pl_FNameList_select_child ),
                      NULL );
  gtk_signal_connect( GTK_OBJECT( FNameList ),"selection_changed",
                      GTK_SIGNAL_FUNC( pl_FNameList_selection_changed ),
                      NULL );
  gtk_signal_connect( GTK_OBJECT( FNameList ),"unselect_child",
                      GTK_SIGNAL_FUNC( pl_FNameList_unselect_child ),
                      NULL );
  gtk_signal_connect( GTK_OBJECT( SelectedList ),"select_child",
                      GTK_SIGNAL_FUNC( pl_SelectedList_select_child ),
                      NULL );
  gtk_signal_connect( GTK_OBJECT( SelectedList ),"selection_changed",
                      GTK_SIGNAL_FUNC( pl_SelectedList_selection_changed ),
                      NULL );
  gtk_signal_connect( GTK_OBJECT( SelectedList ),"unselect_child",
                      GTK_SIGNAL_FUNC( pl_SelectedList_unselect_child ),
                      NULL );
  gtk_signal_connect( GTK_OBJECT( Add ),"released",
                      GTK_SIGNAL_FUNC( pl_Add_released ),
                      NULL );
  gtk_signal_connect( GTK_OBJECT( Remove ),"released",
                      GTK_SIGNAL_FUNC( pl_Remove_released ),
                      NULL );
  gtk_signal_connect( GTK_OBJECT( Ok ),"released",
                      GTK_SIGNAL_FUNC( pl_Ok_released ),
                      NULL );
  gtk_signal_connect( GTK_OBJECT( Cancel ),"released",
                      GTK_SIGNAL_FUNC( pl_Cancel_released ),
                      NULL );

  return PlayList;
}

#endif
--- NEW FILE ---

// skin browser

#ifndef __MYSKINBROWSER
#define __MYSKINBROWSER

#include <sys/stat.h>
#include <glob.h>
#include <unistd.h>

#include "../app.h"
#include "../../language.h"

GtkWidget * SkinList;
GtkWidget * sbOk;
char      * sbSelectedSkin=NULL;
char      * sbNotEnoughMemory="SkinBrowser: not enough memory.";
char      * sbMPlayerDirInHome=NULL;
char      * sbMPlayerPrefixDir=NULL;

GtkWidget * sbItemsList[3];
int         sbItemsListCounter = 0;

void HideSkinBrowser( void )
{
 gtk_widget_hide( SkinBrowser );
 gtkVisibleSkinBrowser=0;
 gtkShMem->vs.window=evSkinBrowser;
 gtkSendMessage( evHideWindow );
}

int gtkFillSkinList( gchar * mdir )
{
 gchar         * str[2];
 gchar         * tmp;
 int             i;
 glob_t          gg;
 struct stat     fs;

 if ( ( str[0]=(char *)calloc( 1,7 ) ) == NULL )
  {
   gtkMessageBox( sbNotEnoughMemory );
   return 0;
  }
 str[1]="";
 strcpy( str[0],"default" );
 if ( gtkFindCList( SkinList,str[0] ) == -1 ) gtk_clist_append( GTK_CLIST( SkinList ),str );
 free( str[0] );

 glob( mdir,GLOB_NOSORT,NULL,&gg );
 for( i=0;i<gg.gl_pathc;i++ )
  {
   if ( !strcmp( gg.gl_pathv[i],"." ) || !strcmp( gg.gl_pathv[i],".." ) ) continue;
   stat( gg.gl_pathv[i],&fs );
   if ( S_ISDIR( fs.st_mode ) )
    {
     tmp=strrchr( gg.gl_pathv[i],'/' ); tmp++;
     if ( !strcmp( tmp,"default" ) ) continue;
     if ( ( str[0]=(char *)malloc( strlen( tmp ) + 1 ) ) == NULL ) { gtkMessageBox( sbNotEnoughMemory ); return 0; }
     strcpy( str[0],tmp );
     if ( gtkFindCList( SkinList,str[0] ) == -1 ) gtk_clist_append( GTK_CLIST( SkinList ),str );
     free( str[0] );
    }
  }
 globfree( &gg );
 return 1;
}

void on_SkinBrowser_destroy( GtkObject * object,gpointer user_data )
{ HideSkinBrowser(); }

void on_SkinList_select_row( GtkCList * clist,gint row,gint column,GdkEvent * bevent,gpointer user_data )
{
 gtk_clist_get_text( clist,row,0,&sbSelectedSkin );
 strcpy( gtkShMem->sb.name,sbSelectedSkin );
 gtkSendMessage( evSkinBrowser );
 if( !bevent ) return;
 if( bevent->type == GDK_2BUTTON_PRESS ) HideSkinBrowser();
}

int sbShift = False;

gboolean on_SkinBrowser_key_release_event( GtkWidget * widget,GdkEventKey * event,gpointer user_data )
{
 switch ( event->keyval )
  {
   case GDK_Escape:
   case GDK_Return:
        if ( !sbShift ) HideSkinBrowser();
        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:
        sbShift=False;
        break;
  }
// if ( ( event->keyval == GDK_Escape )|| ( event->keyval == GDK_Return ) ) HideSkinBrowser();
 return FALSE;
}

gboolean on_SkinBrowser_key_press_event( GtkWidget * widget,GdkEventKey * event,gpointer user_data )
{
 switch ( event->keyval )
  {
   case GDK_Shift_L:
   case GDK_Shift_R:
        sbShift=True;
        break;
  }
 return FALSE;
}

GtkWidget * create_SkinBrowser( void )
{
 GtkWidget     * SkinBrowser;
 GtkWidget     * frame5;
 GtkWidget     * frame6;
 GtkWidget     * frame7;
 GtkWidget     * frame8;
 GtkWidget     * vbox5;
 GtkWidget     * label;
 GtkWidget     * hseparator4;
 GtkWidget     * scrolledwindow1;
 GtkWidget     * label2;
 GtkWidget     * hseparator5;
 GtkWidget     * hbuttonbox4;
 GtkWidget     * Cancel;

 SkinBrowser=gtk_window_new( GTK_WINDOW_DIALOG );
 gtk_widget_set_name( SkinBrowser,langSkinBrowser );
 gtk_object_set_data( GTK_OBJECT( SkinBrowser ),langSkinBrowser,SkinBrowser );
 gtk_widget_set_usize( SkinBrowser,256,320 );
 gtk_container_set_border_width( GTK_CONTAINER( SkinBrowser ),1 );
 GTK_WIDGET_SET_FLAGS( SkinBrowser,GTK_CAN_FOCUS );
 GTK_WIDGET_SET_FLAGS( SkinBrowser,GTK_CAN_DEFAULT );
 gtk_widget_set_events( SkinBrowser,GDK_EXPOSURE_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK | GDK_FOCUS_CHANGE_MASK | GDK_STRUCTURE_MASK | GDK_PROPERTY_CHANGE_MASK | GDK_VISIBILITY_NOTIFY_MASK );
 gtk_window_set_title( GTK_WINDOW( SkinBrowser ),langSkinBrowser );
 gtk_window_set_position( GTK_WINDOW( SkinBrowser ),GTK_WIN_POS_CENTER );
 gtk_window_set_policy( GTK_WINDOW( SkinBrowser ),FALSE,FALSE,TRUE );

 frame5=gtk_frame_new( NULL );
 gtk_widget_set_name( frame5,"frame5" );
 gtk_widget_ref( frame5 );
 gtk_object_set_data_full( GTK_OBJECT( SkinBrowser ),"frame5",frame5,
                          ( GtkDestroyNotify ) gtk_widget_unref );
 gtk_widget_show( frame5 );
 gtk_container_add( GTK_CONTAINER( SkinBrowser ),frame5 );
 gtk_frame_set_shadow_type( GTK_FRAME( frame5 ),GTK_SHADOW_IN );

 frame6=gtk_frame_new( NULL );
 gtk_widget_set_name( frame6,"frame6" );
 gtk_widget_ref( frame6 );
 gtk_object_set_data_full( GTK_OBJECT( SkinBrowser ),"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 );

 frame7=gtk_frame_new( NULL );
 gtk_widget_set_name( frame7,"frame7" );
 gtk_widget_ref( frame7 );
 gtk_object_set_data_full( GTK_OBJECT( SkinBrowser ),"frame7",frame7,
                          ( GtkDestroyNotify ) gtk_widget_unref );
 gtk_widget_show( frame7 );
 gtk_container_add( GTK_CONTAINER( frame6 ),frame7 );
 gtk_frame_set_shadow_type( GTK_FRAME( frame7 ),GTK_SHADOW_ETCHED_OUT );

 frame8=gtk_frame_new( NULL );
 gtk_widget_set_name( frame8,"frame8" );
 gtk_widget_ref( frame8 );
 gtk_object_set_data_full( GTK_OBJECT( SkinBrowser ),"frame8",frame8,
                          ( GtkDestroyNotify ) gtk_widget_unref );
 gtk_widget_show( frame8 );
 gtk_container_add( GTK_CONTAINER( frame7 ),frame8 );
 gtk_frame_set_shadow_type( GTK_FRAME( frame8 ),GTK_SHADOW_NONE );

 vbox5=gtk_vbox_new( FALSE,0 );
 gtk_widget_set_name( vbox5,"vbox5" );
 gtk_widget_ref( vbox5 );
 gtk_object_set_data_full( GTK_OBJECT( SkinBrowser ),"vbox5",vbox5,
                          ( GtkDestroyNotify ) gtk_widget_unref );
 gtk_widget_show( vbox5 );
 gtk_container_add( GTK_CONTAINER( frame8 ),vbox5 );

 label=gtk_label_new( "Skins:" );
 gtk_widget_set_name( label,"label" );
 gtk_widget_ref( label );
 gtk_object_set_data_full( GTK_OBJECT( SkinBrowser ),"label",label,
                          ( GtkDestroyNotify ) gtk_widget_unref );
 gtk_widget_show( label );
 gtk_box_pack_start( GTK_BOX( vbox5 ),label,FALSE,FALSE,0 );
 gtk_label_set_justify( GTK_LABEL( label ),GTK_JUSTIFY_RIGHT );
 gtk_misc_set_alignment( GTK_MISC( label ),7.45058e-09,7.45058e-09 );

 hseparator4=gtk_hseparator_new();
 gtk_widget_set_name( hseparator4,"hseparator4" );
 gtk_widget_ref( hseparator4 );
 gtk_object_set_data_full( GTK_OBJECT( SkinBrowser ),"hseparator4",hseparator4,
                          ( GtkDestroyNotify ) gtk_widget_unref );
 gtk_widget_show( hseparator4 );
 gtk_box_pack_start( GTK_BOX( vbox5 ),hseparator4,FALSE,TRUE,0 );
 gtk_widget_set_usize( hseparator4,-2,5 );

 scrolledwindow1=gtk_scrolled_window_new( NULL,NULL );
 gtk_widget_set_name( scrolledwindow1,"scrolledwindow1" );
 gtk_widget_ref( scrolledwindow1 );
 gtk_object_set_data_full( GTK_OBJECT( SkinBrowser ),"scrolledwindow1",scrolledwindow1,
                          ( GtkDestroyNotify ) gtk_widget_unref );
 gtk_widget_show( scrolledwindow1 );
 gtk_box_pack_start( GTK_BOX( vbox5 ),scrolledwindow1,TRUE,TRUE,0 );
 gtk_container_set_border_width( GTK_CONTAINER( scrolledwindow1 ),2 );
 gtk_scrolled_window_set_policy( GTK_SCROLLED_WINDOW( scrolledwindow1 ),GTK_POLICY_NEVER,GTK_POLICY_AUTOMATIC );

 SkinList=gtk_clist_new( 1 );
 gtk_widget_set_name( SkinList,"SkinList" );
 gtk_widget_ref( SkinList );
 gtk_object_set_data_full( GTK_OBJECT( SkinBrowser ),"SkinList",SkinList,
                          ( GtkDestroyNotify ) gtk_widget_unref );
 gtk_widget_show( SkinList );
 gtk_container_add( GTK_CONTAINER( scrolledwindow1 ),SkinList );
 gtk_clist_set_column_width( GTK_CLIST( SkinList ),0,80 );
 gtk_clist_set_selection_mode( GTK_CLIST( SkinList ),GTK_SELECTION_SINGLE );
 gtk_clist_column_titles_hide( GTK_CLIST( SkinList ) );
 gtk_clist_set_shadow_type( GTK_CLIST( SkinList ),GTK_SHADOW_ETCHED_OUT );

 label2=gtk_label_new( "label2" );
 gtk_widget_set_name( label2,"label2" );
 gtk_widget_ref( label2 );
 gtk_object_set_data_full( GTK_OBJECT( SkinBrowser ),"label2",label2,
                          ( GtkDestroyNotify ) gtk_widget_unref );
 gtk_widget_show( label2 );
 gtk_clist_set_column_widget( GTK_CLIST( SkinList ),0,label2 );

 hseparator5=gtk_hseparator_new();
 gtk_widget_set_name( hseparator5,"hseparator5" );
 gtk_widget_ref( hseparator5 );
 gtk_object_set_data_full( GTK_OBJECT( SkinBrowser ),"hseparator5",hseparator5,
                          ( GtkDestroyNotify ) gtk_widget_unref );
 gtk_widget_show( hseparator5 );
 gtk_box_pack_start( GTK_BOX( vbox5 ),hseparator5,FALSE,TRUE,0 );
 gtk_widget_set_usize( hseparator5,-2,9 );

 hbuttonbox4=gtk_hbutton_box_new();
 gtk_widget_set_name( hbuttonbox4,"hbuttonbox4" );
 gtk_widget_ref( hbuttonbox4 );
 gtk_object_set_data_full( GTK_OBJECT( SkinBrowser ),"hbuttonbox4",hbuttonbox4,
                          ( GtkDestroyNotify ) gtk_widget_unref );
 gtk_widget_show( hbuttonbox4 );
 gtk_box_pack_start( GTK_BOX( vbox5 ),hbuttonbox4,FALSE,TRUE,0 );
 gtk_button_box_set_layout( GTK_BUTTON_BOX( hbuttonbox4 ),GTK_BUTTONBOX_END );
 gtk_button_box_set_spacing( GTK_BUTTON_BOX( hbuttonbox4 ),0 );
 gtk_button_box_set_child_size( GTK_BUTTON_BOX( hbuttonbox4 ),80,0 );

 sbOk=gtk_button_new_with_label( langOk );
 gtk_widget_set_name( sbOk,langOk );
 gtk_widget_ref( sbOk );
 gtk_object_set_data_full( GTK_OBJECT( SkinBrowser ),langOk,sbOk,
                          ( GtkDestroyNotify ) gtk_widget_unref );
 gtk_widget_show( sbOk );
 gtk_container_add( GTK_CONTAINER( hbuttonbox4 ),sbOk );
 gtk_widget_set_usize( sbOk,-2,33 );
 GTK_WIDGET_SET_FLAGS( sbOk,GTK_CAN_DEFAULT );

 Cancel=gtk_button_new_with_label( langCancel );
 gtk_widget_set_name( Cancel,langCancel );
 gtk_widget_ref( Cancel );
 gtk_object_set_data_full( GTK_OBJECT( SkinBrowser ),langCancel,Cancel,
                          ( GtkDestroyNotify ) gtk_widget_unref );
 gtk_widget_show( Cancel );
 gtk_container_add( GTK_CONTAINER( hbuttonbox4 ),Cancel );
 gtk_widget_set_usize( Cancel,-2,33 );
 GTK_WIDGET_SET_FLAGS( Cancel,GTK_CAN_DEFAULT );

 gtk_signal_connect( GTK_OBJECT( SkinBrowser ),"destroy",
                     GTK_SIGNAL_FUNC( on_SkinBrowser_destroy ),
                     NULL );
 gtk_signal_connect( GTK_OBJECT( SkinBrowser ),"key_release_event",
                     GTK_SIGNAL_FUNC( on_SkinBrowser_key_release_event ),
                     NULL );
 gtk_signal_connect( GTK_OBJECT( SkinBrowser ),"key_press_event",
                     GTK_SIGNAL_FUNC( on_SkinBrowser_key_press_event ),
                     NULL );
 gtk_signal_connect( GTK_OBJECT( SkinList ),"select_row",
                     GTK_SIGNAL_FUNC( on_SkinList_select_row ),
                     NULL );
 gtk_signal_connect( GTK_OBJECT( sbOk ),"released",
                     GTK_SIGNAL_FUNC( on_SkinBrowser_destroy ),
                     NULL );
 gtk_signal_connect( GTK_OBJECT( Cancel ),"released",
                     GTK_SIGNAL_FUNC( on_SkinBrowser_destroy ),
                     NULL );

 if ( ( sbMPlayerDirInHome=(char *)calloc( 1,strlen( skinDirInHome ) + 2 ) ) != NULL )
  { strcpy( sbMPlayerDirInHome,skinDirInHome ); strcat( sbMPlayerDirInHome,"/*" ); }
 if ( ( sbMPlayerPrefixDir=(char *)calloc( 1,strlen( skinMPlayerDir ) + 2 ) ) != NULL )
  { strcpy( sbMPlayerPrefixDir,skinMPlayerDir ); strcat( sbMPlayerPrefixDir,"/*" ); }

 gtk_widget_grab_focus( SkinList );

 sbItemsList[0]=SkinList;
 sbItemsList[1]=sbOk;
 sbItemsList[2]=Cancel;

 return SkinBrowser;
}

#endif



More information about the MPlayer-cvslog mailing list