Commit 8a1c45df authored by Olivier Teulière's avatar Olivier Teulière

* skins2/src/vlcproc.cpp: New "dvd.isActive" boolean variable

 * doc/skins/skins2-howto.xml: Updated doc
parent 3d8647e9
......@@ -861,7 +861,7 @@ difficulty to understand how VLC skins work.</para>
<listitem><para>
<emphasis>playlist.save()</emphasis>: Save the current playlist (since VLC 0.8.0).
</para></listitem>
<listitem><para>
<listitem id="dvdactions"><para>
<emphasis>dvd.nextTitle()</emphasis>: Go to the next title of the DVD (since VLC 0.8.5).
</para></listitem>
<listitem><para>
......@@ -966,6 +966,9 @@ difficulty to understand how VLC skins work.</para>
<listitem><para>
<emphasis>playlist.isRepeat</emphasis>: True when the current playlist item is being repeated, false otherwise (since VLC 0.8.0).
</para></listitem>
<listitem><para>
<emphasis>dvd.isActive</emphasis>: True when a DVD is currently playing. This variable can be used to display buttons associated to the <link linkend="dvdactions">dvd.* actions</link> only when needed (since VLC 0.8.5).
</para></listitem>
<listitem><para>
<emphasis>window_name.isVisible</emphasis>: True when the window whose <link linkend="windowid">id</link> is "window_name" is visible, false otherwise.
</para></listitem>
......
......@@ -100,6 +100,7 @@ VlcProc::VlcProc( intf_thread_t *pIntf ): SkinObject( pIntf ),
REGISTER_VAR( m_cVarSeekable, VarBoolImpl, "vlc.isSeekable" )
REGISTER_VAR( m_cVarEqualizer, VarBoolImpl, "equalizer.isEnabled" )
REGISTER_VAR( m_cVarEqPreamp, EqualizerPreamp, "equalizer.preamp" )
REGISTER_VAR( m_cVarDvdActive, VarBoolImpl, "dvd.isActive" )
#undef REGISTER_VAR
m_cVarStreamName = VariablePtr( new VarText( getIntf(), false ) );
pVarManager->registerVar( m_cVarStreamName, "streamName" );
......@@ -233,6 +234,7 @@ void VlcProc::manage()
VarBoolImpl *pVarRandom = (VarBoolImpl*)m_cVarRandom.get();
VarBoolImpl *pVarLoop = (VarBoolImpl*)m_cVarLoop.get();
VarBoolImpl *pVarRepeat = (VarBoolImpl*)m_cVarRepeat.get();
VarBoolImpl *pVarDvdActive = (VarBoolImpl*)m_cVarDvdActive.get();
// Refresh audio variables
refreshAudio();
......@@ -268,6 +270,12 @@ void VlcProc::manage()
pVarPaused->set( status == PLAYLIST_PAUSED );
pVarSeekable->set( pos.f_float != 0.0 );
// Refresh DVD detection
vlc_value_t chapters_count;
var_Change( pInput, "chapter", VLC_VAR_CHOICESCOUNT,
&chapters_count, NULL );
pVarDvdActive->set( chapters_count.i_int > 0 );
}
else
{
......@@ -275,6 +283,7 @@ void VlcProc::manage()
pVarPaused->set( false );
pVarStopped->set( true );
pVarSeekable->set( false );
pVarDvdActive->set( false );
pTime->set( 0, false );
}
......
......@@ -123,6 +123,8 @@ class VlcProc: public SkinObject
EqualizerBands m_varEqBands;
VariablePtr m_cVarEqPreamp;
VariablePtr m_cVarEqualizer;
/// Variable for DVD detection
VariablePtr m_cVarDvdActive;
/// Set of handles of vout windows
/**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment