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,10 +214,19 @@ CmdGeneric *Interpreter::parseAction( const string &rAction, Theme *pTheme )
{
int leftPos = rAction.find( ".show()" );
string windowId = rAction.substr( 0, leftPos );
if( windowId == "playlist_window" &&
!config_GetInt( getIntf(), "skinned-playlist") )
{
pCommand = new CmdDlgPlaylist( getIntf() );
}
else
{
TopWindow *pWin = pTheme->getWindowById( windowId );
if( pWin )
{
pCommand = new CmdShowWindow( getIntf(), pTheme->getWindowManager(),
pCommand = new CmdShowWindow( getIntf(),
pTheme->getWindowManager(),
*pWin );
}
else
......@@ -235,14 +244,23 @@ CmdGeneric *Interpreter::parseAction( const string &rAction, Theme *pTheme )
}
}
}
}
else if( rAction.find( ".hide()" ) != string::npos )
{
int leftPos = rAction.find( ".hide()" );
string windowId = rAction.substr( 0, leftPos );
if( windowId == "playlist_window" &&
! config_GetInt( getIntf(), "skinned-playlist") )
{
pCommand = new CmdDlgPlaylist( getIntf() );
}
else
{
TopWindow *pWin = pTheme->getWindowById( windowId );
if( pWin )
{
pCommand = new CmdHideWindow( getIntf(), pTheme->getWindowManager(),
pCommand = new CmdHideWindow( getIntf(),
pTheme->getWindowManager(),
*pWin );
}
else
......@@ -250,6 +268,7 @@ CmdGeneric *Interpreter::parseAction( const string &rAction, Theme *pTheme )
msg_Err( getIntf(), "unknown window (%s)", windowId.c_str() );
}
}
}
if( pCommand )
{
......
......@@ -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