diff options
-rw-r--r-- | Gui/app.c | 38 | ||||
-rw-r--r-- | Gui/app.h | 4 | ||||
-rw-r--r-- | Gui/interface.c | 3 | ||||
-rw-r--r-- | Gui/mplayer/mw.c | 1 | ||||
-rw-r--r-- | Gui/mplayer/play.c | 1 | ||||
-rw-r--r-- | Gui/skin/skin.c | 30 | ||||
-rw-r--r-- | Gui/skin/skin.h | 3 |
7 files changed, 47 insertions, 33 deletions
@@ -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 @@ -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 ); |