[Mplayer-cvslog] CVS: main/Gui/mplayer mplayer.c,1.7,1.8 play.h,1.5,1.6 psignal.c,1.5,1.6

Zoltan Ponekker pontscho at mplayer.dev.hu
Fri Aug 31 15:05:40 CEST 2001


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

Modified Files:
	mplayer.c play.h psignal.c 
Log Message:
fix skin change

Index: mplayer.c
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/mplayer/mplayer.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- mplayer.c	30 Aug 2001 22:07:19 -0000	1.7
+++ mplayer.c	31 Aug 2001 13:05:37 -0000	1.8
@@ -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 @@
 #include "menu.h"
 #include "mw.h"
 #include "sw.h"
-#include "widget.h"
+#include "widgets.h"
 
 void mplTimerHandler( int signum )
 {
@@ -56,6 +57,7 @@
  // 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

Index: play.h
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/mplayer/play.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- play.h	31 Aug 2001 10:08:03 -0000	1.5
+++ play.h	31 Aug 2001 13:05:37 -0000	1.6
@@ -81,4 +81,6 @@
 extern void mplSendMessage( int msg );
 extern void mplPlayerThread( void );
 
-#endif
\ No newline at end of file
+extern void ChangeSkin( void );
+
+#endif

Index: psignal.c
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/mplayer/psignal.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- psignal.c	30 Aug 2001 21:39:31 -0000	1.5
+++ psignal.c	31 Aug 2001 13:05:37 -0000	1.6
@@ -163,16 +163,14 @@
  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 @@
          }
         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 );




More information about the MPlayer-cvslog mailing list