diff options
author | pontscho <pontscho@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-02-23 15:12:55 +0000 |
---|---|---|
committer | pontscho <pontscho@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-02-23 15:12:55 +0000 |
commit | c090d0da98cfc613b7b9b7227dd505735df224a6 (patch) | |
tree | 0e27f5b57f9efcde040f3b8381544468612f47d6 /Gui/mplayer/gtk | |
parent | 469f2d1b7e6c2251cbc9418b111f5bc700c7a262 (diff) |
new gui interface, and gtk moved into mplayer process. fork ... bleh :)
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@4819 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'Gui/mplayer/gtk')
-rw-r--r-- | Gui/mplayer/gtk/about.c | 3 | ||||
-rw-r--r-- | Gui/mplayer/gtk/fs.c | 114 | ||||
-rw-r--r-- | Gui/mplayer/gtk/mb.c | 3 | ||||
-rw-r--r-- | Gui/mplayer/gtk/menu.c | 40 | ||||
-rw-r--r-- | Gui/mplayer/gtk/opts.c | 16 | ||||
-rw-r--r-- | Gui/mplayer/gtk/pl.c | 3 | ||||
-rw-r--r-- | Gui/mplayer/gtk/sb.c | 35 |
7 files changed, 91 insertions, 123 deletions
diff --git a/Gui/mplayer/gtk/about.c b/Gui/mplayer/gtk/about.c index 9a09fae2ce..3f881aee2d 100644 --- a/Gui/mplayer/gtk/about.c +++ b/Gui/mplayer/gtk/about.c @@ -10,7 +10,6 @@ void ab_Ok_released( GtkButton * button,gpointer user_data ) { gtk_widget_hide( AboutBox ); - gtkVisibleAboutBox=0; } GtkWidget * create_About( void ) @@ -157,7 +156,7 @@ GtkWidget * create_About( void ) "Homepage:\n" \ " Design: Chass\n" \ " Contents: Gabucino\n" \ - " LGB\n\n" \ + " LGB\n\n" \ "English documentation:\n" \ " tech-*.txt: A'rpi\n" \ " all the others: Gabucino\n\n" \ diff --git a/Gui/mplayer/gtk/fs.c b/Gui/mplayer/gtk/fs.c index a40c6365f3..2cca47d75b 100644 --- a/Gui/mplayer/gtk/fs.c +++ b/Gui/mplayer/gtk/fs.c @@ -7,14 +7,13 @@ #include <unistd.h> #include "./mplayer.h" -#include "psignal.h" -#include "../error.h" #include "pixmaps/up.xpm" #include "pixmaps/dir.xpm" #include "pixmaps/file.xpm" #include "../../events.h" +#include "../../interface.h" #include "../../../config.h" #include "../../../help_mp.h" @@ -35,30 +34,30 @@ unsigned char * fsThatDir = "."; gchar fsFilter[8] = "*"; int fsPressed = 0; -int fsMessage = -1; -int fsType = 0; +int fsMessage = -1; +int fsType = 0; #define fsNumberOfVideoFilterNames 6 -char * fsVideoFilterNames[fsNumberOfVideoFilterNames+1][2] = +char * fsVideoFilterNames[fsNumberOfVideoFilterNames+1][2] = { { "MPEG files ( *.mpg )", "*.mpg" }, - { "VOB files ( *.vob )", "*.vob" }, + { "VOB files ( *.vob )", "*.vob" }, { "AVI files ( *.avi )", "*.avi" }, - { "QT files ( *.mov )", "*.mov" }, - { "ASF files ( *.asf )", "*.asf" }, - { "VIVO files ( *.viv )", "*.viv" }, + { "QT files ( *.mov )", "*.mov" }, + { "ASF files ( *.asf )", "*.asf" }, + { "VIVO files ( *.viv )", "*.viv" }, { "All files ( * )", "*" } }; - + #define fsNumberOfSubtitleFilterNames 8 char * fsSubtitleFilterNames[fsNumberOfSubtitleFilterNames+1][2] = { { "UTF ( *.utf )", "*.utf" }, - { "SUB ( *.sub )", "*.sub" }, - { "SRT ( *.srt )", "*.str" }, + { "SUB ( *.sub )", "*.sub" }, + { "SRT ( *.srt )", "*.str" }, { "SMI ( *.smi )", "*.smi" }, { "RT ( *.rt )", "*.rt" }, { "TXT ( *.txt )", "*.txt" }, { "SSA ( *.ssa )", "*.ssa" }, { "AQT ( *.aqt )", "*.aqt" }, - { "All files ( * )", "*" } }; + { "All files ( * )", "*" } }; #define fsNumberOfOtherFilterNames 0 char * fsOtherFilterNames[fsNumberOfOtherFilterNames+1][2] = @@ -99,7 +98,7 @@ void CheckDir( GtkWidget * list,char * directory ) gtk_widget_hide( list ); gtk_clist_clear( GTK_CLIST( list ) ); str[0][0]=NULL; - + 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 ); @@ -121,9 +120,9 @@ void CheckDir( GtkWidget * list,char * directory ) free( str[0][1] ); } globfree( &gg ); - + glob( fsFilter,0,NULL,&gg ); - + #if 0 if ( !strcmp( fsFilter,"*" ) ) { @@ -132,7 +131,7 @@ void CheckDir( GtkWidget * list,char * directory ) for( i=0;i<strlen( f );i++ ) if ( ( f[i] >= 'A' )&&( f[i] <= 'Z' ) ) f[i]+=32; glob( f,GLOB_APPEND,NULL,&gg ); - + for( i=0;i<strlen( f );i++ ) if ( ( f[i] >= 'a' )&&( f[i] <= 'z' ) ) f[i]-=32; glob( f,GLOB_APPEND,NULL,&gg ); @@ -163,13 +162,13 @@ void CheckDir( GtkWidget * list,char * directory ) void ShowFileSelect( int type ) { int i; - if ( gtkVisibleFileSelect ) gtk_widget_hide( FileSelect ); + gtk_widget_hide( FileSelect ); fsType=type; switch ( type ) { case fsVideoSelector: fsMessage=evFileLoaded; - gtk_window_set_title( GTK_WINDOW( fsFileSelect ),MSGTR_FileSelect ); + gtk_window_set_title( GTK_WINDOW( fsFileSelect ),MSGTR_FileSelect ); fsList_items=NULL; for( i=0;i<fsNumberOfVideoFilterNames + 1;i++ ) fsList_items=g_list_append( fsList_items,fsVideoFilterNames[i][0] ); @@ -178,7 +177,7 @@ void ShowFileSelect( int type ) gtk_entry_set_text( GTK_ENTRY( fsFilterCombo ),fsVideoFilterNames[fsNumberOfVideoFilterNames][0] ); break; case fsSubtitleSelector: - gtk_window_set_title( GTK_WINDOW( fsFileSelect ),MSGTR_SubtitleSelect ); + gtk_window_set_title( GTK_WINDOW( fsFileSelect ),MSGTR_SubtitleSelect ); fsList_items=NULL; for( i=0;i<fsNumberOfSubtitleFilterNames + 1;i++ ) fsList_items=g_list_append( fsList_items,fsSubtitleFilterNames[i][0] ); @@ -187,7 +186,7 @@ void ShowFileSelect( int type ) gtk_entry_set_text( GTK_ENTRY( fsFilterCombo ),fsSubtitleFilterNames[fsNumberOfSubtitleFilterNames][0] ); break; case fsOtherSelector: - gtk_window_set_title( GTK_WINDOW( fsFileSelect ),MSGTR_OtherSelect ); + gtk_window_set_title( GTK_WINDOW( fsFileSelect ),MSGTR_OtherSelect ); fsList_items=NULL; for( i=0;i<fsNumberOfSubtitleFilterNames + 1;i++ ) fsList_items=g_list_append( fsList_items,fsOtherFilterNames[i][0] ); @@ -197,15 +196,11 @@ void ShowFileSelect( int type ) break; } gtk_widget_show( FileSelect ); - gtkVisibleFileSelect=1; } void HideFileSelect( void ) { gtk_widget_hide( fsFileSelect ); - gtkVisibleFileSelect=0; - gtkShMem->vs.window=evLoad; - gtkSendMessage( evHideWindow ); } void fs_fsFileSelect_destroy( GtkObject * object,gpointer user_data ) @@ -223,35 +218,35 @@ void fs_fsFilterCombo_changed( GtkEditable * editable,gpointer user_data ) int i; str=gtk_entry_get_text( GTK_ENTRY(user_data ) ); - + switch ( fsType ) { case fsVideoSelector: for( i=0;i<fsNumberOfVideoFilterNames+1;i++ ) - if( !strcmp( str,fsVideoFilterNames[i][0] ) ) + if( !strcmp( str,fsVideoFilterNames[i][0] ) ) { - strcpy( fsFilter,fsVideoFilterNames[i][1] ); - CheckDir( fsFNameList,get_current_dir_name() ); - break; - } - break; + strcpy( fsFilter,fsVideoFilterNames[i][1] ); + CheckDir( fsFNameList,get_current_dir_name() ); + break; + } + break; case fsSubtitleSelector: for( i=0;i<fsNumberOfSubtitleFilterNames+1;i++ ) - if( !strcmp( str,fsSubtitleFilterNames[i][0] ) ) + if( !strcmp( str,fsSubtitleFilterNames[i][0] ) ) { - strcpy( fsFilter,fsSubtitleFilterNames[i][1] ); - CheckDir( fsFNameList,get_current_dir_name() ); - break; - } + strcpy( fsFilter,fsSubtitleFilterNames[i][1] ); + CheckDir( fsFNameList,get_current_dir_name() ); + break; + } break; case fsOtherSelector: for( i=0;i<fsNumberOfOtherFilterNames+1;i++ ) - if( !strcmp( str,fsOtherFilterNames[i][0] ) ) + if( !strcmp( str,fsOtherFilterNames[i][0] ) ) { - strcpy( fsFilter,fsOtherFilterNames[i][1] ); - CheckDir( fsFNameList,get_current_dir_name() ); - break; - } + strcpy( fsFilter,fsOtherFilterNames[i][1] ); + CheckDir( fsFNameList,get_current_dir_name() ); + break; + } break; } } @@ -313,18 +308,10 @@ void fs_Ok_released( GtkButton * button,gpointer user_data ) { case 1: fsSelectedDirectory=(unsigned char *)get_current_dir_name(); -// printf("[gtk-fs] 1-fsSelectedFile: %s\n",fsSelectedFile); -// #ifdef DEBUG -// dbprintf( 1,"[gtk-fs] fsSelectedFile: %s\n",fsSelectedFile ); -// #endif break; case 2: str=gtk_entry_get_text( GTK_ENTRY( fsPathCombo ) ); fsSelectedFile=str; -// printf("[gtk-fs] 2-fsSelectedFile: '%s' \n",fsSelectedFile); -// #ifdef DEBUG -// dbprintf( 1,"[gtk-fs] fsSelectedFile: %s\n",fsSelectedFile ); -// #endif if ( !fsFileExist( fsSelectedFile ) ) return; fsSelectedDirectory=fsSelectedFile; size=strlen( fsSelectedDirectory ); @@ -337,31 +324,21 @@ void fs_Ok_released( GtkButton * button,gpointer user_data ) break; } } -// printf("[gtk-fs-xxx] fsSelectedFile: '%s' \n",fsSelectedFile); -// printf("[gtk-fs-xxx] fsSelectedDirectory: '%s' \n",fsSelectedDirectory); break; } -// printf( "----gtk---> directory: %s\n",fsSelectedDirectory ); -// printf( "----gtk---> filename: %s\n",fsSelectedFile ); switch ( fsType ) { case fsVideoSelector: - strcpy( gtkShMem->fs.dir,fsSelectedDirectory ); - strcpy( gtkShMem->fs.filename,fsSelectedFile ); -// printf( "----gtksm-> directory: %s\n",gtkShMem->fs.dir ); -// printf( "----gtksm-> filename: %s\n",gtkShMem->fs.filename ); - gtkSendMessage( evFileLoaded ); - break; + guiSetDF( guiIntfStruct.Filename,fsSelectedDirectory,fsSelectedFile ); + guiIntfStruct.StreamType=STREAMTYPE_FILE; + guiIntfStruct.FilenameChanged=1; + break; case fsSubtitleSelector: - strcpy( gtkShMem->fs.subtitlename,fsSelectedDirectory ); - strcat( gtkShMem->fs.subtitlename,"/" ); - strcat( gtkShMem->fs.subtitlename,fsSelectedFile ); - gtkSendMessage( evSubtitleLoaded ); + guiSetDF( guiIntfStruct.Subtitlename,fsSelectedDirectory,fsSelectedFile ); + guiIntfStruct.SubtitleChanged=1; break; case fsOtherSelector: - strcpy( gtkShMem->fs.otherfilename,fsSelectedDirectory ); - strcat( gtkShMem->fs.subtitlename,"/" ); - strcat( gtkShMem->fs.otherfilename,fsSelectedFile ); + guiSetDF( guiIntfStruct.Othername,fsSelectedDirectory,fsSelectedFile ); break; } item=fsTopList_items; @@ -375,6 +352,7 @@ void fs_Ok_released( GtkButton * button,gpointer user_data ) fsTopList_items=g_list_prepend( fsTopList_items,(gchar *)get_current_dir_name() ); gtk_combo_set_popdown_strings( GTK_COMBO( user_data ),fsTopList_items ); } + if ( mplMainAutoPlay ) mplEventHandling( evPlay,0 ); } void fs_Cancel_released( GtkButton * button,gpointer user_data ) @@ -382,7 +360,7 @@ void fs_Cancel_released( GtkButton * button,gpointer user_data ) 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 ); + gtk_clist_get_text( GTK_CLIST(widget ),row,1,&fsSelectedFile ); fsPressed=1; if( !bevent ) return; if( bevent->type == GDK_2BUTTON_PRESS ) gtk_button_released( GTK_BUTTON( fsOk ) ); diff --git a/Gui/mplayer/gtk/mb.c b/Gui/mplayer/gtk/mb.c index 9382ea4e6c..31ae2f1ea8 100644 --- a/Gui/mplayer/gtk/mb.c +++ b/Gui/mplayer/gtk/mb.c @@ -21,14 +21,11 @@ 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( int type ) diff --git a/Gui/mplayer/gtk/menu.c b/Gui/mplayer/gtk/menu.c index 82688d0013..58b8e8ce53 100644 --- a/Gui/mplayer/gtk/menu.c +++ b/Gui/mplayer/gtk/menu.c @@ -14,10 +14,9 @@ void ActivateMenuItem( int Item ) { // fprintf( stderr,"[menu] item: %d.%d\n",Item&0xffff,Item>>16 ); - gtkShMem->popupmenu=Item & 0x0000ffff; - gtkShMem->popupmenuparam=Item >> 16; - gtkShMem->visiblepopupmenu=0; - gtkSendMessage( evShowPopUpMenu ); + gtkPopupMenu=Item & 0x0000ffff; + gtkPopupMenuParam=Item >> 16; + mplEventHandling( Item & 0x0000ffff,Item >> 16 ); } GtkWidget * AddMenuItem( GtkWidget * Menu,char * label,int Number ) @@ -246,6 +245,7 @@ char * GetLanguage( int language ) int i; for ( i=0;i<sizeof( Languages ) / sizeof( Languages_t );i++ ) if ( Languages[i].id == language ) return Languages[i].name; + return NULL; } GtkWidget * DVDSubMenu; @@ -293,61 +293,61 @@ GtkWidget * create_PopUpMenu( void ) AddMenuItem( DVDSubMenu,MSGTR_MENU_ShowDVDMenu, evNone ); AddSeparator( DVDSubMenu ); DVDTitleMenu=AddSubMenu( DVDSubMenu,MSGTR_MENU_Titles ); - if ( gtkShMem->DVD.titles ) + if ( guiIntfStruct.DVD.titles ) { char tmp[32]; int i; - for ( i=0;i<gtkShMem->DVD.titles;i++ ) + for ( i=0;i < guiIntfStruct.DVD.titles;i++ ) { sprintf( tmp,MSGTR_MENU_Title,i+1 ); AddMenuItem( DVDTitleMenu,tmp,( (i+1) << 16 ) + evSetDVDTitle ); } } - else + else { MenuItem=AddMenuItem( DVDTitleMenu,MSGTR_MENU_None,evNone ); gtk_widget_set_sensitive( MenuItem,FALSE ); } DVDChapterMenu=AddSubMenu( DVDSubMenu,MSGTR_MENU_Chapters ); - if ( gtkShMem->DVD.chapters ) + if ( guiIntfStruct.DVD.chapters ) { char tmp[32]; int i; - for ( i=0;i<gtkShMem->DVD.chapters;i++ ) + for ( i=0;i < guiIntfStruct.DVD.chapters;i++ ) { sprintf( tmp,MSGTR_MENU_Chapter,i+1 ); AddMenuItem( DVDChapterMenu,tmp,( (i+1) << 16 ) + evSetDVDChapter ); } } - else + else { MenuItem=AddMenuItem( DVDChapterMenu,MSGTR_MENU_None,evNone ); gtk_widget_set_sensitive( MenuItem,FALSE ); } DVDAudioLanguageMenu=AddSubMenu( DVDSubMenu,MSGTR_MENU_AudioLanguages ); - if ( gtkShMem->DVD.nr_of_audio_channels ) + if ( guiIntfStruct.DVD.nr_of_audio_channels ) { char tmp[64]; int i; - for ( i=0;i<gtkShMem->DVD.nr_of_audio_channels;i++ ) + for ( i=0;i < guiIntfStruct.DVD.nr_of_audio_channels;i++ ) { - strcpy( tmp,GetLanguage( gtkShMem->DVD.audio_streams[i].language ) ); - AddMenuItem( DVDAudioLanguageMenu,tmp,( gtkShMem->DVD.audio_streams[i].id << 16 ) + evSetDVDAudio ); + strcpy( tmp,GetLanguage( guiIntfStruct.DVD.audio_streams[i].language ) ); + AddMenuItem( DVDAudioLanguageMenu,tmp,( guiIntfStruct.DVD.audio_streams[i].id << 16 ) + evSetDVDAudio ); } } - else + else { MenuItem=AddMenuItem( DVDAudioLanguageMenu,MSGTR_MENU_None,evNone ); gtk_widget_set_sensitive( MenuItem,FALSE ); } DVDSubtitleLanguageMenu=AddSubMenu( DVDSubMenu,MSGTR_MENU_SubtitleLanguages ); - if ( gtkShMem->DVD.nr_of_subtitles ) + if ( guiIntfStruct.DVD.nr_of_subtitles ) { char tmp[64]; int i; - for ( i=0;i<gtkShMem->DVD.nr_of_subtitles;i++ ) + for ( i=0;i < guiIntfStruct.DVD.nr_of_subtitles;i++ ) { - strcpy( tmp,GetLanguage( gtkShMem->DVD.subtitles[i].language ) ); - AddMenuItem( DVDSubtitleLanguageMenu,tmp,( gtkShMem->DVD.subtitles[i].id << 16 ) + evSetDVDSubtitle ); + strcpy( tmp,GetLanguage( guiIntfStruct.DVD.subtitles[i].language ) ); + AddMenuItem( DVDSubtitleLanguageMenu,tmp,( guiIntfStruct.DVD.subtitles[i].id << 16 ) + evSetDVDSubtitle ); } } - else + else { MenuItem=AddMenuItem( DVDSubtitleLanguageMenu,MSGTR_MENU_None,evNone ); gtk_widget_set_sensitive( MenuItem,FALSE ); diff --git a/Gui/mplayer/gtk/opts.c b/Gui/mplayer/gtk/opts.c index adda2b963e..90981f28c9 100644 --- a/Gui/mplayer/gtk/opts.c +++ b/Gui/mplayer/gtk/opts.c @@ -1,7 +1,8 @@ +#include <stdlib.h> +#include <stdio.h> + #include "./mplayer.h" -#include "psignal.h" -#include "../error.h" #include "../../events.h" #include "../../../config.h" @@ -27,14 +28,11 @@ GtkWidget * opAutoFullscreenCheckBox; GtkWidget * opOk; GtkWidget * opCancel; -int opShift = False; +int opShift = 0; 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 ) @@ -43,10 +41,10 @@ gboolean on_window2_key_press_event( GtkWidget * widget,GdkEventKey * event,gpoi { case GDK_Shift_L: case GDK_Shift_R: - opShift=True; + opShift=1; break; } - return FALSE; + return 0; } gboolean on_window2_key_release_event( GtkWidget * widget,GdkEventKey * event,gpointer user_data ) @@ -66,7 +64,7 @@ gboolean on_window2_key_release_event( GtkWidget * widget,GdkEventKey * event,gp break; case GDK_Shift_L: case GDK_Shift_R: - opShift=False; + opShift=0; break; } return FALSE; diff --git a/Gui/mplayer/gtk/pl.c b/Gui/mplayer/gtk/pl.c index abc946889e..ecd2b86b86 100644 --- a/Gui/mplayer/gtk/pl.c +++ b/Gui/mplayer/gtk/pl.c @@ -9,9 +9,6 @@ void HidePlayList( void ) { gtk_widget_hide( PlayList ); - gtkVisiblePlayList=0; - gtkShMem->vs.window=evPlayList; - gtkSendMessage( evHideWindow ); } void pl_PlayList_destroy( GtkObject * object,gpointer user_data ) diff --git a/Gui/mplayer/gtk/sb.c b/Gui/mplayer/gtk/sb.c index fcf6b037fd..ac991eff44 100644 --- a/Gui/mplayer/gtk/sb.c +++ b/Gui/mplayer/gtk/sb.c @@ -4,6 +4,7 @@ #include <unistd.h> #include <string.h> #include <stdlib.h> +#include <stdio.h> #include "sb.h" #include "../../events.h" @@ -18,16 +19,7 @@ char * sbSelectedSkin=NULL; char * sbMPlayerDirInHome=NULL; char * sbMPlayerPrefixDir=NULL; -void HideSkinBrowser( void ) -{ - gtk_widget_hide( SkinBrowser ); - gtkVisibleSkinBrowser=0; - gtkShMem->vs.window=evSkinBrowser; - gtkSendMessage( evHideWindow ); - gtkSendMessage( evSkinBrowser ); -} - -char gtkOldSkin[128]; +char * gtkOldSkin; int gtkFillSkinList( gchar * mdir ) { @@ -37,7 +29,7 @@ int gtkFillSkinList( gchar * mdir ) glob_t gg; struct stat fs; - strcpy( gtkOldSkin,gtkShMem->sb.name ); + gtkOldSkin=strdup( skinName ); if ( ( str[0]=(char *)calloc( 1,7 ) ) == NULL ) { gtkMessageBox( GTK_MB_FATAL,MSGTR_SKINBROWSER_NotEnoughMemory ); @@ -68,21 +60,28 @@ int gtkFillSkinList( gchar * mdir ) } void on_SkinBrowser_destroy( GtkObject * object,gpointer user_data ) -{ HideSkinBrowser(); } +{ gtk_widget_hide( SkinBrowser ); } void on_SkinBrowser_Cancel( GtkObject * object,gpointer user_data ) { - strcpy( gtkShMem->sb.name,gtkOldSkin ); - HideSkinBrowser(); + ChangeSkin( skinName ); + gtk_widget_hide( SkinBrowser ); +} + +void on_SkinBrowser_Ok( GtkObject * object,gpointer user_data ) +{ + ChangeSkin( sbSelectedSkin ); + if ( skinName ) free( skinName ); + skinName=strdup( sbSelectedSkin ); + gtk_widget_hide( SkinBrowser ); } 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 ); + ChangeSkin( sbSelectedSkin ); if( !bevent ) return; - if( bevent->type == GDK_2BUTTON_PRESS ) HideSkinBrowser(); + if( bevent->type == GDK_2BUTTON_PRESS ) gtk_widget_hide( SkinBrowser ); } GtkWidget * create_SkinBrowser( void ) @@ -248,7 +247,7 @@ GtkWidget * create_SkinBrowser( void ) gtk_signal_connect( GTK_OBJECT( SkinBrowser ),"destroy",GTK_SIGNAL_FUNC( on_SkinBrowser_destroy ),NULL ); gtk_signal_connect( GTK_OBJECT( SkinList ),"select_row",GTK_SIGNAL_FUNC( on_SkinList_select_row ),NULL ); - gtk_signal_connect( GTK_OBJECT( Ok ),"released",GTK_SIGNAL_FUNC( on_SkinBrowser_destroy ),NULL ); + gtk_signal_connect( GTK_OBJECT( Ok ),"released",GTK_SIGNAL_FUNC( on_SkinBrowser_Ok ),NULL ); gtk_signal_connect( GTK_OBJECT( Cancel ),"released",GTK_SIGNAL_FUNC( on_SkinBrowser_Cancel ),NULL ); if ( ( sbMPlayerDirInHome=(char *)calloc( 1,strlen( skinDirInHome ) + 4 ) ) != NULL ) |