summaryrefslogtreecommitdiffstats
path: root/Gui
diff options
context:
space:
mode:
authorpontscho <pontscho@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-11-25 17:33:30 +0000
committerpontscho <pontscho@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-11-25 17:33:30 +0000
commitfce995a07aef239f9e130610aafce537995f6103 (patch)
tree993d26a5838821e079bfa6a667a114516c325351 /Gui
parentc3d9fc330b3a74ed644b45f0473962422f1fa16c (diff)
downloadmpv-fce995a07aef239f9e130610aafce537995f6103.tar.bz2
mpv-fce995a07aef239f9e130610aafce537995f6103.tar.xz
no seeking if stream is STREAMTYPE_STREAM (net/stdin)
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@8281 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'Gui')
-rw-r--r--Gui/app.c38
-rw-r--r--Gui/app.h4
-rw-r--r--Gui/interface.c3
-rw-r--r--Gui/mplayer/mw.c1
-rw-r--r--Gui/mplayer/play.c1
-rw-r--r--Gui/skin/skin.c30
-rw-r--r--Gui/skin/skin.h3
7 files changed, 47 insertions, 33 deletions
diff --git a/Gui/app.c b/Gui/app.c
index b58e649aa8..346a93131a 100644
--- a/Gui/app.c
+++ b/Gui/app.c
@@ -154,3 +154,41 @@ int appFindMessage( unsigned char * str )
if ( !strcmp( evNames[i].name,str ) ) return evNames[i].msg;
return -1;
}
+
+void btnModify( int event,float state )
+{
+ int j;
+ for ( j=0;j<appMPlayer.NumberOfItems + 1;j++ )
+ if ( appMPlayer.Items[j].msg == event )
+ {
+ switch ( appMPlayer.Items[j].type )
+ {
+ case itButton:
+ appMPlayer.Items[j].pressed=(int)state;
+ appMPlayer.Items[j].tmp=(int)state;
+ break;
+ case itPotmeter:
+ case itHPotmeter:
+ if ( state < 0.0f ) state=0.0f;
+ if ( state > 100.f ) state=100.0f;
+ appMPlayer.Items[j].value=state;
+ break;
+ }
+ }
+}
+
+float btnGetValue( int event )
+{
+ int j;
+ for ( j=0;j<appMPlayer.NumberOfItems + 1;j++ )
+ if ( appMPlayer.Items[j].msg == event ) return appMPlayer.Items[j].value;
+ return 0;
+}
+
+void btnSet( int event,int set )
+{
+ int j;
+ for ( j=0;j<appMPlayer.NumberOfItems + 1;j++ )
+ if ( appMPlayer.Items[j].msg == event ) appMPlayer.Items[j].disabled=set;
+}
+ \ No newline at end of file
diff --git a/Gui/app.h b/Gui/app.h
index 735116ef99..429be70689 100644
--- a/Gui/app.h
+++ b/Gui/app.h
@@ -172,4 +172,8 @@ extern void appCopy( listItems * item1,listItems * item2 );
extern int appFindMessage( unsigned char * str );
extern int appFindKey( unsigned char * name );
+extern void btnModify( int event,float state );
+extern float btnGetValue( int event );
+extern void btnSet( int event,int set );
+
#endif
diff --git a/Gui/interface.c b/Gui/interface.c
index b379d3fe1e..166f70cc13 100644
--- a/Gui/interface.c
+++ b/Gui/interface.c
@@ -538,6 +538,9 @@ int guiGetEvent( int type,char * arg )
}
if ( guiIntfStruct.NoWindow ) wsVisibleWindow( &appMPlayer.subWindow,wsHideWindow );
+
+ if ( guiIntfStruct.StreamType == STREAMTYPE_STREAM ) btnSet( evSetMoviePosition,1 );
+ else btnSet( evSetMoviePosition,0 );
// -- audio
if ( audio_out )
diff --git a/Gui/mplayer/mw.c b/Gui/mplayer/mw.c
index a74fdc6962..881d145995 100644
--- a/Gui/mplayer/mw.c
+++ b/Gui/mplayer/mw.c
@@ -196,6 +196,7 @@ void mplMainDraw( void )
for( i=0;i < appMPlayer.NumberOfItems + 1;i++ )
{
item=&appMPlayer.Items[i];
+ if ( !item->disabled )
switch( item->type )
{
case itButton:
diff --git a/Gui/mplayer/play.c b/Gui/mplayer/play.c
index 4685cc7705..e79282fe5e 100644
--- a/Gui/mplayer/play.c
+++ b/Gui/mplayer/play.c
@@ -179,6 +179,7 @@ void mplRelSeek( float s )
void mplAbsSeek( float s )
{ // 0.0 ... 100.0
+ if ( guiIntfStruct.StreamType == STREAMTYPE_STREAM ) return;
rel_seek_secs=0.01*s; abs_seek_pos=3;
}
diff --git a/Gui/skin/skin.c b/Gui/skin/skin.c
index 15745b1dc8..e7d1e21ec3 100644
--- a/Gui/skin/skin.c
+++ b/Gui/skin/skin.c
@@ -635,33 +635,3 @@ int skinRead( char * dname )
}
return 0;
}
-
-void btnModify( int event,float state )
-{
- int j;
- for ( j=0;j<appMPlayer.NumberOfItems + 1;j++ )
- if ( appMPlayer.Items[j].msg == event )
- {
- switch ( appMPlayer.Items[j].type )
- {
- case itButton:
- appMPlayer.Items[j].pressed=(int)state;
- appMPlayer.Items[j].tmp=(int)state;
- break;
- case itPotmeter:
- case itHPotmeter:
- if ( state < 0.0f ) state=0.0f;
- if ( state > 100.f ) state=100.0f;
- appMPlayer.Items[j].value=state;
- break;
- }
- }
-}
-
-float btnGetValue( int event )
-{
- int j;
- for ( j=0;j<appMPlayer.NumberOfItems + 1;j++ )
- if ( appMPlayer.Items[j].msg == event ) return appMPlayer.Items[j].value;
- return 0;
-}
diff --git a/Gui/skin/skin.h b/Gui/skin/skin.h
index 0497b29f6e..7a99affd7d 100644
--- a/Gui/skin/skin.h
+++ b/Gui/skin/skin.h
@@ -11,9 +11,6 @@ extern listItems * skinAppMPlayer;
extern int skinRead( char * dname );
extern int skinBPRead( char * fname, txSample * bf );
-extern void btnModify( int event,float state );
-extern float btnGetValue( int event );
-
// ---
extern char * strdelspacesbeforecommand( char * in );