summaryrefslogtreecommitdiffstats
path: root/Gui/mplayer
diff options
context:
space:
mode:
authorpontscho <pontscho@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-09-07 21:04:14 +0000
committerpontscho <pontscho@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-09-07 21:04:14 +0000
commit83e1eed13d1b566420b416fef2ec044cfd3ba92b (patch)
tree3e809bd0883bc06c7ad94fb8eb59d7732a2894ce /Gui/mplayer
parent70c0a8df28688ae933c392fdf0ccecc88c57bd6e (diff)
downloadmpv-83e1eed13d1b566420b416fef2ec044cfd3ba92b.tar.bz2
mpv-83e1eed13d1b566420b416fef2ec044cfd3ba92b.tar.xz
some bug fix, and add decoration item to skin conffile. faszom(C)
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@1867 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'Gui/mplayer')
-rw-r--r--Gui/mplayer/Makefile2
-rw-r--r--Gui/mplayer/mplayer.c8
-rw-r--r--Gui/mplayer/play.c42
-rw-r--r--Gui/mplayer/psignal.c4
4 files changed, 26 insertions, 30 deletions
diff --git a/Gui/mplayer/Makefile b/Gui/mplayer/Makefile
index e586a5cc26..5b1b59a45d 100644
--- a/Gui/mplayer/Makefile
+++ b/Gui/mplayer/Makefile
@@ -34,7 +34,7 @@ dep: depend
depend: .depend
-.depend: Makefile ../config.mak ../config.h ../gui.mak ../bitmap/bitmap.mak
+.depend: Makefile ../config.mak ../gui.mak ../bitmap/bitmap.mak
$(CC) -MM $(CFLAGS) $(MPLAYERSRCS) 1>.depend
#
diff --git a/Gui/mplayer/mplayer.c b/Gui/mplayer/mplayer.c
index a07ea994c5..751f3d315a 100644
--- a/Gui/mplayer/mplayer.c
+++ b/Gui/mplayer/mplayer.c
@@ -15,7 +15,6 @@
#include "../timer.h"
#include "../language.h"
#include "../error.h"
-#include "../config.h"
#include "../../config.h"
#include "../../libvo/x11_common.h"
@@ -52,10 +51,11 @@ void mplTimerHandler( int signum )
void mplInit( int argc,char* argv[], char *envp[], void* disp )
{
+ int i;
// allocates shmem to gtkShMem
// fork() a process which runs gtkThreadProc() [gtkPID]
gtkInit( argc,argv,envp );
- strcpy( gtkShMem->sb.name,cfgSkin );
+ strcpy( gtkShMem->sb.name,skinName );
// allocates shmem to mplShMem
// init fields of this struct to default values
@@ -79,9 +79,11 @@ void mplInit( int argc,char* argv[], char *envp[], void* disp )
vo_setwindow(appMPlayer.subWindow.WindowID, appMPlayer.subWindow.wGC);
vo_setwindowsize( appMPlayer.sub.width,appMPlayer.sub.height );
+ i=wsHideFrame|wsMaxSize|wsShowWindow;
+ if ( appMPlayer.mainDecoration ) i=wsShowFrame|wsMaxSize|wsShowWindow;
wsCreateWindow( &appMPlayer.mainWindow,
appMPlayer.main.x,appMPlayer.main.y,appMPlayer.main.width,appMPlayer.main.height,
- wsNoBorder,wsShowMouseCursor|wsHandleMouseButton|wsHandleMouseMove,wsHideFrame|wsMaxSize|wsShowWindow,"MPlayer" ); //wsMinSize|
+ wsNoBorder,wsShowMouseCursor|wsHandleMouseButton|wsHandleMouseMove,i,"MPlayer" ); //wsMinSize|
wsSetShape( &appMPlayer.mainWindow,appMPlayer.main.Mask.Image );
diff --git a/Gui/mplayer/play.c b/Gui/mplayer/play.c
index b1cd724843..eb4629a4f4 100644
--- a/Gui/mplayer/play.c
+++ b/Gui/mplayer/play.c
@@ -24,7 +24,6 @@ int moviex,moviey,moviewidth,movieheight;
#include "play.h"
#include "../skin/skin.h"
-#include "../config.h"
#include "../error.h"
#include "../language.h"
@@ -127,7 +126,7 @@ listItems tmpList;
void ChangeSkin( void )
{
- if ( strcmp( cfgSkin,gtkShMem->sb.name ) )
+ if ( strcmp( skinName,gtkShMem->sb.name ) )
{
int ret;
#ifdef DEBUG
@@ -145,8 +144,8 @@ void ChangeSkin( void )
appInitStruct( &tmpList );
skinAppMPlayer=&appMPlayer;
appInitStruct( &appMPlayer );
- if ( !ret ) strcpy( cfgSkin,gtkShMem->sb.name );
- skinRead( cfgSkin );
+ if ( !ret ) strcpy( skinName,gtkShMem->sb.name );
+ skinRead( skinName );
if ( ret )
{
@@ -154,24 +153,6 @@ void ChangeSkin( void )
return;
}
-// 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 ); return; }
- wsResizeWindow( &appMPlayer.mainWindow,appMPlayer.main.width,appMPlayer.main.height );
- wsMoveWindow( &appMPlayer.mainWindow,appMPlayer.main.x,appMPlayer.main.y );
- wsResizeImage( &appMPlayer.mainWindow,appMPlayer.main.width,appMPlayer.main.height );
- 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 );
@@ -186,7 +167,6 @@ void ChangeSkin( void )
if ( !mplShMem->Playing )
{
mplSkinChanged=0;
-// if ( appMPlayer.subWindow.isFullScreen ) wsFullScreen( &appMPlayer.subWindow );
if ( !appMPlayer.subWindow.isFullScreen )
{
wsResizeWindow( &appMPlayer.subWindow,appMPlayer.sub.width,appMPlayer.sub.height );
@@ -196,6 +176,22 @@ void ChangeSkin( void )
wsClearWindow( appMPlayer.subWindow );
mplSubRender=1; wsPostRedisplay( &appMPlayer.subWindow );
}
+
+ if ( mplDrawBuffer ) free( mplDrawBuffer );
+ if ( ( mplDrawBuffer = (unsigned char *)calloc( 1,appMPlayer.main.Bitmap.ImageSize ) ) == NULL )
+ { message( False,langNEMDB ); return; }
+ wsVisibleWindow( &appMPlayer.mainWindow,wsHideWindow );
+ wsResizeWindow( &appMPlayer.mainWindow,appMPlayer.main.width,appMPlayer.main.height );
+ wsMoveWindow( &appMPlayer.mainWindow,appMPlayer.main.x,appMPlayer.main.y );
+ wsResizeImage( &appMPlayer.mainWindow,appMPlayer.main.width,appMPlayer.main.height );
+ wsSetShape( &appMPlayer.mainWindow,appMPlayer.main.Mask.Image );
+ mainVisible=1; mplMainRender=1; wsPostRedisplay( &appMPlayer.mainWindow );
+ wsWindowDecoration( &appMPlayer.mainWindow,appMPlayer.mainDecoration );
+ wsVisibleWindow( &appMPlayer.mainWindow,wsShowWindow );
+
+ btnModify( evSetVolume,mplShMem->Volume );
+ btnModify( evSetBalance,mplShMem->Balance );
+ btnModify( evSetMoviePosition,mplShMem->Position );
}
mplShMem->SkinChange=0;
}
diff --git a/Gui/mplayer/psignal.c b/Gui/mplayer/psignal.c
index 5d3991d4f3..7a810dffdb 100644
--- a/Gui/mplayer/psignal.c
+++ b/Gui/mplayer/psignal.c
@@ -12,12 +12,10 @@
#include "../skin/skin.h"
#include "../wm/ws.h"
-#include "../config.h"
#include "../error.h"
#include "../language.h"
#include "../../config.h"
-
#include "../../libvo/x11_common.h"
//#include "../../libvo/sub.h"
@@ -69,7 +67,7 @@ void gtkSigHandler( int s )
if ( !gtkFillSkinList( sbMPlayerPrefixDir ) ) break;
if ( gtkFillSkinList( sbMPlayerDirInHome ) )
{
- gtkSetDefaultToCList( SkinList,cfgSkin );
+ gtkSetDefaultToCList( SkinList,skinName );
gtk_widget_show( SkinBrowser );
gtkVisibleSkinBrowser=1;
gtkShow( evSkinBrowser );