diff options
author | pontscho <pontscho@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2001-08-31 13:05:37 +0000 |
---|---|---|
committer | pontscho <pontscho@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2001-08-31 13:05:37 +0000 |
commit | a2023e8ff40f076748a7af1a0e1388466a0ae0c1 (patch) | |
tree | 76b94f535879c713e43763062a2db997d7f261a5 /Gui | |
parent | 72af5c15db7d2ecd9cfa1affec21b42bd91caded (diff) |
fix skin change
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@1802 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'Gui')
-rw-r--r-- | Gui/mplayer/mplayer.c | 4 | ||||
-rw-r--r-- | Gui/mplayer/play.h | 4 | ||||
-rw-r--r-- | Gui/mplayer/psignal.c | 69 |
3 files changed, 9 insertions, 68 deletions
diff --git a/Gui/mplayer/mplayer.c b/Gui/mplayer/mplayer.c index a56020ce5f..147e0e9cc2 100644 --- a/Gui/mplayer/mplayer.c +++ b/Gui/mplayer/mplayer.c @@ -15,6 +15,7 @@ #include "../timer.h" #include "../language.h" #include "../error.h" +#include "../config.h" #include "../../config.h" #include "../../libvo/x11_common.h" @@ -36,7 +37,7 @@ void mplMsgHandle( int msg,float param ); #include "menu.h" #include "mw.h" #include "sw.h" -#include "widget.h" +#include "widgets.h" void mplTimerHandler( int signum ) { @@ -56,6 +57,7 @@ void mplInit( int argc,char* argv[], char *envp[], void* disp ) // allocates shmem to gtkShMem // fork() a process which runs gtkThreadProc() [gtkPID] gtkInit( argc,argv,envp ); + strcpy( gtkShMem->sb.name,cfgSkin ); // allocates shmem to mplShMem // init fields of this struct to default values diff --git a/Gui/mplayer/play.h b/Gui/mplayer/play.h index 8fe59bb956..88ba80e904 100644 --- a/Gui/mplayer/play.h +++ b/Gui/mplayer/play.h @@ -81,4 +81,6 @@ extern void mplSigHandler( int s ); extern void mplSendMessage( int msg ); extern void mplPlayerThread( void ); -#endif
\ No newline at end of file +extern void ChangeSkin( void ); + +#endif diff --git a/Gui/mplayer/psignal.c b/Gui/mplayer/psignal.c index 0d8eb9bdf3..38912c22f0 100644 --- a/Gui/mplayer/psignal.c +++ b/Gui/mplayer/psignal.c @@ -163,16 +163,14 @@ void gtkSigHandler( int s ) gtkShMem->message=0; } -listItems tmpList; - void mplMainSigHandler( int s ) { if ( s != SIGTYPE ) return; - #ifdef DEBUG +// #ifdef DEBUG if ( gtkShMem->message ) dbprintf( 5,"[psignal] main sig handler gtk msg: %d\n",gtkShMem->message ); // if ( mplShMem->message ) dbprintf( 5,"[psignal] main sig handler mpl msg: %d\n",mplShMem->message ); - #endif +// #endif switch ( gtkShMem->message ) { @@ -202,68 +200,7 @@ void mplMainSigHandler( int s ) } break; case evSkinBrowser: - if ( strcmp( cfgSkin,gtkShMem->sb.name ) ) - { - int ret; - #ifdef DEBUG - dbprintf( 1,"[psignal] skin: %s\n",gtkShMem->sb.name ); - #endif - - mainVisible=0; - - appInitStruct( &tmpList ); - skinAppMPlayer=&tmpList; - ret=skinRead( gtkShMem->sb.name ); - - appInitStruct( &tmpList ); - skinAppMPlayer=&appMPlayer; - appInitStruct( &appMPlayer ); - if ( !ret ) strcpy( cfgSkin,gtkShMem->sb.name ); - skinRead( cfgSkin ); - - if ( ret ) - { - mainVisible=1; - break; - } - -// appCopy( &appMPlayer,&tmpList ); -// appInitStruct( &tmpList ); -// skinAppMPlayer=&appMPlayer; -// strcpy( cfgSkin,gtkShMem->sb.name ); - - if ( mplDrawBuffer ) free( mplDrawBuffer ); - if ( ( mplDrawBuffer = (unsigned char *)calloc( 1,appMPlayer.main.Bitmap.ImageSize ) ) == NULL ) - { message( False,langNEMDB ); break; } - wsResizeWindow( &appMPlayer.mainWindow,appMPlayer.main.width,appMPlayer.main.height ); - wsMoveWindow( &appMPlayer.mainWindow,appMPlayer.main.x,appMPlayer.main.y ); - wsResizeImage( &appMPlayer.mainWindow ); - wsSetShape( &appMPlayer.mainWindow,appMPlayer.main.Mask.Image ); - mainVisible=1; mplMainRender=1; wsPostRedisplay( &appMPlayer.mainWindow ); - btnModify( evSetVolume,mplShMem->Volume ); - btnModify( evSetBalance,mplShMem->Balance ); - btnModify( evSetMoviePosition,mplShMem->Position ); - - if ( appMPlayer.menuBase.Bitmap.Image ) - { - if ( mplMenuDrawBuffer ) free( mplMenuDrawBuffer ); - if ( ( mplMenuDrawBuffer = (unsigned char *)calloc( 1,appMPlayer.menuBase.Bitmap.ImageSize ) ) == NULL ) - { message( False,langNEMDB ); break; } - wsResizeWindow( &appMPlayer.menuWindow,appMPlayer.menuBase.width,appMPlayer.menuBase.height ); - wsResizeImage( &appMPlayer.menuWindow ); - } - - mplSkinChanged=1; - if ( !mplShMem->Playing ) - { - mplSkinChanged=0; - if ( appMPlayer.subWindow.isFullScreen ) wsFullScreen( &appMPlayer.subWindow ); - wsResizeWindow( &appMPlayer.subWindow,appMPlayer.sub.width,appMPlayer.sub.height ); - wsMoveWindow( &appMPlayer.subWindow,appMPlayer.sub.x,appMPlayer.sub.y ); - if ( appMPlayer.sub.Bitmap.Image ) wsResizeImage( &appMPlayer.subWindow ); - mplSubRender=1; wsPostRedisplay( &appMPlayer.subWindow ); - } - } + ChangeSkin(); break; case evFileLoaded: strcpy( mplShMem->Filename,gtkShMem->fs.dir ); strcat( mplShMem->Filename,"/" ); strcat( mplShMem->Filename,gtkShMem->fs.filename ); |