Commit 76a63d03 authored by Clément Stenac's avatar Clément Stenac

Add a (default enabled) skinned-playlist option

It will show the dialogs provider playlist instead of the "playlist_window" window
parent 02a21822
......@@ -51,6 +51,7 @@ typedef CmdDialogs<14> CmdDlgDirectory;
typedef CmdDialogs<15> CmdDlgStreamingWizard;
typedef CmdDialogs<16> CmdDlgPlaytreeLoad;
typedef CmdDialogs<17> CmdDlgPlaytreeSave;
typedef CmdDialogs<18> CmdDlgPlaylist;
/// Generic "Open dialog" command
......@@ -118,6 +119,9 @@ class CmdDialogs: public CmdGeneric
case 15:
pDialogs->showStreamingWizard();
break;
case 18:
pDialogs->showPlaylist();
break;
default:
msg_Warn( getIntf(), "unknown dialog type" );
break;
......
......@@ -214,24 +214,34 @@ CmdGeneric *Interpreter::parseAction( const string &rAction, Theme *pTheme )
{
int leftPos = rAction.find( ".show()" );
string windowId = rAction.substr( 0, leftPos );
TopWindow *pWin = pTheme->getWindowById( windowId );
if( pWin )
if( windowId == "playlist_window" &&
!config_GetInt( getIntf(), "skinned-playlist") )
{
pCommand = new CmdShowWindow( getIntf(), pTheme->getWindowManager(),
*pWin );
pCommand = new CmdDlgPlaylist( getIntf() );
}
else
{
// It was maybe the id of a popup
Popup *pPopup = pTheme->getPopupById( windowId );
if( pPopup )
TopWindow *pWin = pTheme->getWindowById( windowId );
if( pWin )
{
pCommand = new CmdShowPopup( getIntf(), *pPopup );
pCommand = new CmdShowWindow( getIntf(),
pTheme->getWindowManager(),
*pWin );
}
else
{
msg_Err( getIntf(), "unknown window or popup (%s)",
windowId.c_str() );
// It was maybe the id of a popup
Popup *pPopup = pTheme->getPopupById( windowId );
if( pPopup )
{
pCommand = new CmdShowPopup( getIntf(), *pPopup );
}
else
{
msg_Err( getIntf(), "unknown window or popup (%s)",
windowId.c_str() );
}
}
}
}
......@@ -239,15 +249,24 @@ CmdGeneric *Interpreter::parseAction( const string &rAction, Theme *pTheme )
{
int leftPos = rAction.find( ".hide()" );
string windowId = rAction.substr( 0, leftPos );
TopWindow *pWin = pTheme->getWindowById( windowId );
if( pWin )
if( windowId == "playlist_window" &&
! config_GetInt( getIntf(), "skinned-playlist") )
{
pCommand = new CmdHideWindow( getIntf(), pTheme->getWindowManager(),
*pWin );
pCommand = new CmdDlgPlaylist( getIntf() );
}
else
{
msg_Err( getIntf(), "unknown window (%s)", windowId.c_str() );
TopWindow *pWin = pTheme->getWindowById( windowId );
if( pWin )
{
pCommand = new CmdHideWindow( getIntf(),
pTheme->getWindowManager(),
*pWin );
}
else
{
msg_Err( getIntf(), "unknown window (%s)", windowId.c_str() );
}
}
}
......
......@@ -242,6 +242,14 @@ void Dialogs::showPlaylistSave()
showPlaylistSaveCB, kSAVE );
}
void Dialogs::showPlaylist()
{
if( m_pProvider && m_pProvider->pf_show_dialog )
{
m_pProvider->pf_show_dialog( m_pProvider, INTF_DIALOG_PLAYLIST,
0, 0 );
}
}
void Dialogs::showFileSimple( bool play )
{
......
......@@ -86,6 +86,9 @@ class Dialogs: public SkinObject
/// Show the Streaming Wizard dialog
void showStreamingWizard();
/// Show the Playlist
void showPlaylist();
/// Show the popup menu
void showPopupMenu( bool bShow );
......
......@@ -365,6 +365,9 @@ vlc_module_begin();
add_bool( "skins2-transparency", VLC_FALSE, NULL, SKINS2_TRANSPARENCY,
SKINS2_TRANSPARENCY_LONG, VLC_FALSE );
#endif
add_bool( "skinned-playlist", VLC_TRUE, NULL, SKINS2_TRANSPARENCY,
SKINS2_TRANSPARENCY_LONG, VLC_FALSE );
set_shortname( _("Skins"));
set_description( _("Skinnable Interface") );
set_capability( "interface", 30 );
......
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