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; ...@@ -51,6 +51,7 @@ typedef CmdDialogs<14> CmdDlgDirectory;
typedef CmdDialogs<15> CmdDlgStreamingWizard; typedef CmdDialogs<15> CmdDlgStreamingWizard;
typedef CmdDialogs<16> CmdDlgPlaytreeLoad; typedef CmdDialogs<16> CmdDlgPlaytreeLoad;
typedef CmdDialogs<17> CmdDlgPlaytreeSave; typedef CmdDialogs<17> CmdDlgPlaytreeSave;
typedef CmdDialogs<18> CmdDlgPlaylist;
/// Generic "Open dialog" command /// Generic "Open dialog" command
...@@ -118,6 +119,9 @@ class CmdDialogs: public CmdGeneric ...@@ -118,6 +119,9 @@ class CmdDialogs: public CmdGeneric
case 15: case 15:
pDialogs->showStreamingWizard(); pDialogs->showStreamingWizard();
break; break;
case 18:
pDialogs->showPlaylist();
break;
default: default:
msg_Warn( getIntf(), "unknown dialog type" ); msg_Warn( getIntf(), "unknown dialog type" );
break; break;
......
...@@ -214,10 +214,19 @@ CmdGeneric *Interpreter::parseAction( const string &rAction, Theme *pTheme ) ...@@ -214,10 +214,19 @@ CmdGeneric *Interpreter::parseAction( const string &rAction, Theme *pTheme )
{ {
int leftPos = rAction.find( ".show()" ); int leftPos = rAction.find( ".show()" );
string windowId = rAction.substr( 0, leftPos ); 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 ); TopWindow *pWin = pTheme->getWindowById( windowId );
if( pWin ) if( pWin )
{ {
pCommand = new CmdShowWindow( getIntf(), pTheme->getWindowManager(), pCommand = new CmdShowWindow( getIntf(),
pTheme->getWindowManager(),
*pWin ); *pWin );
} }
else else
...@@ -235,14 +244,23 @@ CmdGeneric *Interpreter::parseAction( const string &rAction, Theme *pTheme ) ...@@ -235,14 +244,23 @@ CmdGeneric *Interpreter::parseAction( const string &rAction, Theme *pTheme )
} }
} }
} }
}
else if( rAction.find( ".hide()" ) != string::npos ) else if( rAction.find( ".hide()" ) != string::npos )
{ {
int leftPos = rAction.find( ".hide()" ); int leftPos = rAction.find( ".hide()" );
string windowId = rAction.substr( 0, leftPos ); 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 ); TopWindow *pWin = pTheme->getWindowById( windowId );
if( pWin ) if( pWin )
{ {
pCommand = new CmdHideWindow( getIntf(), pTheme->getWindowManager(), pCommand = new CmdHideWindow( getIntf(),
pTheme->getWindowManager(),
*pWin ); *pWin );
} }
else else
...@@ -250,6 +268,7 @@ CmdGeneric *Interpreter::parseAction( const string &rAction, Theme *pTheme ) ...@@ -250,6 +268,7 @@ CmdGeneric *Interpreter::parseAction( const string &rAction, Theme *pTheme )
msg_Err( getIntf(), "unknown window (%s)", windowId.c_str() ); msg_Err( getIntf(), "unknown window (%s)", windowId.c_str() );
} }
} }
}
if( pCommand ) if( pCommand )
{ {
......
...@@ -242,6 +242,14 @@ void Dialogs::showPlaylistSave() ...@@ -242,6 +242,14 @@ void Dialogs::showPlaylistSave()
showPlaylistSaveCB, kSAVE ); 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 ) void Dialogs::showFileSimple( bool play )
{ {
......
...@@ -86,6 +86,9 @@ class Dialogs: public SkinObject ...@@ -86,6 +86,9 @@ class Dialogs: public SkinObject
/// Show the Streaming Wizard dialog /// Show the Streaming Wizard dialog
void showStreamingWizard(); void showStreamingWizard();
/// Show the Playlist
void showPlaylist();
/// Show the popup menu /// Show the popup menu
void showPopupMenu( bool bShow ); void showPopupMenu( bool bShow );
......
...@@ -365,6 +365,9 @@ vlc_module_begin(); ...@@ -365,6 +365,9 @@ vlc_module_begin();
add_bool( "skins2-transparency", VLC_FALSE, NULL, SKINS2_TRANSPARENCY, add_bool( "skins2-transparency", VLC_FALSE, NULL, SKINS2_TRANSPARENCY,
SKINS2_TRANSPARENCY_LONG, VLC_FALSE ); SKINS2_TRANSPARENCY_LONG, VLC_FALSE );
#endif #endif
add_bool( "skinned-playlist", VLC_TRUE, NULL, SKINS2_TRANSPARENCY,
SKINS2_TRANSPARENCY_LONG, VLC_FALSE );
set_shortname( _("Skins")); set_shortname( _("Skins"));
set_description( _("Skinnable Interface") ); set_description( _("Skinnable Interface") );
set_capability( "interface", 30 ); 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