Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
GSoC
GSoC2018
macOS
vlc
Commits
909aedf9
Commit
909aedf9
authored
Aug 09, 2004
by
ipkiss
Browse files
* skins2: support playlist.setRandom(true) and playlist.setRandom(false)
parent
81cc781d
Changes
4
Hide whitespace changes
Inline
Side-by-side
doc/skins/skins2-howto.xml
View file @
909aedf9
...
...
@@ -747,6 +747,14 @@ difficulty to understand how VLC skins work.</para>
<listitem><para>
<emphasis>
playlist.setLoop(false)
</emphasis>
: Do not loop at playlist end.
</para></listitem>
<!-- TODO: Enable it for 0.7.3
<listitem><para>
<emphasis>playlist.setRepeat(true)</emphasis>: Repeat the current playlist item.
</para></listitem>
<listitem><para>
<emphasis>playlist.setRepeat(false)</emphasis>: Stop repeating the current playlist item.
</para></listitem>
-->
<listitem><para>
<emphasis>
WindowID.show()
</emphasis>
: Show the
<link
linkend=
"Window"
>
Window
</link>
whose
<link
linkend=
"windowid"
>
id
</link>
attribute is 'WindowID'.
</para></listitem>
...
...
modules/gui/skins2/commands/cmd_playlist.cpp
View file @
909aedf9
...
...
@@ -88,3 +88,15 @@ void CmdPlaylistLoop::execute()
}
}
void
CmdPlaylistRepeat
::
execute
()
{
playlist_t
*
pPlaylist
=
getIntf
()
->
p_sys
->
p_playlist
;
if
(
pPlaylist
!=
NULL
)
{
vlc_value_t
val
;
val
.
b_bool
=
m_value
;
var_Set
(
pPlaylist
,
"repeat"
,
val
);
}
}
modules/gui/skins2/commands/cmd_playlist.hpp
View file @
909aedf9
...
...
@@ -78,6 +78,7 @@ class CmdPlaylistRandom: public CmdGeneric
bool
m_value
;
};
/// Command to set the loop state
class
CmdPlaylistLoop
:
public
CmdGeneric
{
...
...
@@ -98,5 +99,24 @@ class CmdPlaylistLoop: public CmdGeneric
};
/// Command to set the repeat state
class
CmdPlaylistRepeat
:
public
CmdGeneric
{
public:
CmdPlaylistRepeat
(
intf_thread_t
*
pIntf
,
bool
value
)
:
CmdGeneric
(
pIntf
),
m_value
(
value
)
{}
virtual
~
CmdPlaylistRepeat
()
{}
/// This method does the real job of the command
virtual
void
execute
();
/// Return the type of the command
virtual
string
getType
()
const
{
return
"playlist repeat"
;
}
private:
/// Repeat state
bool
m_value
;
};
#endif
modules/gui/skins2/parser/interpreter.cpp
View file @
909aedf9
...
...
@@ -70,6 +70,10 @@ Interpreter::Interpreter( intf_thread_t *pIntf ): SkinObject( pIntf )
CmdGenericPtr
(
new
CmdPlaylistLoop
(
getIntf
(),
true
)
);
m_commandMap
[
"playlist.setLoop(false)"
]
=
CmdGenericPtr
(
new
CmdPlaylistLoop
(
getIntf
(),
false
)
);
m_commandMap
[
"playlist.setRepeat(true)"
]
=
CmdGenericPtr
(
new
CmdPlaylistRepeat
(
getIntf
(),
true
)
);
m_commandMap
[
"playlist.setRepeat(false)"
]
=
CmdGenericPtr
(
new
CmdPlaylistRepeat
(
getIntf
(),
false
)
);
REGISTER_CMD
(
"vlc.fullscreen()"
,
CmdFullscreen
)
REGISTER_CMD
(
"vlc.play()"
,
CmdPlay
)
REGISTER_CMD
(
"vlc.pause()"
,
CmdPause
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment