Commit 7fc73f3f authored by Erwan Tulou's avatar Erwan Tulou

skins2: replace most config_Get with var_Inherit

parent 4d6247fd
......@@ -256,7 +256,7 @@ CmdGeneric *Interpreter::parseAction( const string &rAction, Theme *pTheme )
string windowId = rAction.substr( 0, leftPos );
if( windowId == "playlist_window" &&
!config_GetInt( getIntf(), "skinned-playlist") )
!var_InheritBool( getIntf(), "skinned-playlist") )
{
list<CmdGeneric *> list;
list.push_back( new CmdDlgPlaylist( getIntf() ) );
......@@ -297,7 +297,7 @@ CmdGeneric *Interpreter::parseAction( const string &rAction, Theme *pTheme )
int leftPos = rAction.find( ".hide()" );
string windowId = rAction.substr( 0, leftPos );
if( windowId == "playlist_window" &&
! config_GetInt( getIntf(), "skinned-playlist") )
!var_InheritBool( getIntf(), "skinned-playlist") )
{
list<CmdGeneric *> list;
list.push_back( new CmdDlgPlaylist( getIntf() ) );
......
......@@ -256,7 +256,7 @@ static void *Run( void * p_obj )
}
// Load a theme
skin_last = config_GetPsz( p_intf, "skins2-last" );
skin_last = var_InheritString( p_intf, "skins2-last" );
pLoader = new ThemeLoader( p_intf );
if( !skin_last || !pLoader->load( skin_last ) )
......@@ -339,7 +339,8 @@ static int WindowOpen( vlc_object_t *p_this )
if( pIntf == NULL )
return VLC_EGENERIC;
if( !config_GetInt( pIntf, "skinned-video") ||
if( !vlc_object_alive( pIntf ) ||
!var_InheritBool( pIntf, "skinned-video") ||
pWnd->cfg->is_standalone )
{
vlc_object_release( pIntf );
......
......@@ -98,7 +98,7 @@ bool ThemeLoader::load( const string &fileName )
}
// Check if the skin to load is in the config file, to load its config
char *skin_last = config_GetPsz( getIntf(), "skins2-last" );
char *skin_last = var_InheritString( getIntf(), "skins2-last" );
if( skin_last != NULL && fileName == (string)skin_last )
{
// Restore the theme configuration
......
......@@ -89,7 +89,7 @@ ThemeRepository::ThemeRepository( intf_thread_t *pIntf ): SkinObject( pIntf )
}
// retrieve last skins stored or skins requested by user
char* psz_current = config_GetPsz( getIntf(), "skins2-last" );
char* psz_current = var_InheritString( getIntf(), "skins2-last" );
string current = string( psz_current ? psz_current : "" );
// set the default skins if no skins provided
......@@ -206,7 +206,7 @@ void ThemeRepository::updateRepository()
vlc_value_t val, text;
// retrieve the current skin
char* psz_current = config_GetPsz( getIntf(), "skins2-last" );
char* psz_current = var_InheritString( getIntf(), "skins2-last" );
if( !psz_current )
return;
......
......@@ -754,7 +754,7 @@ void VlcProc::update_equalizer()
if( m_pAout )
pFilters = var_GetNonEmptyString( m_pAout, "audio-filter" );
else
pFilters = config_GetPsz( getIntf(), "audio-filter" );
pFilters = var_InheritString( getIntf(), "audio-filter" );
bool b_equalizer = pFilters && strstr( pFilters, "equalizer" );
free( pFilters );
......
......@@ -71,7 +71,7 @@ void WindowManager::startMove( TopWindow &rWindow )
m_movingWindows.clear();
buildDependSet( m_movingWindows, &rWindow );
if( config_GetInt( getIntf(), "skins2-transparency" ) )
if( var_InheritBool( getIntf(), "skins2-transparency" ) )
{
// Change the opacity of the moving windows
WinSet_t::const_iterator it;
......@@ -96,7 +96,7 @@ void WindowManager::stopMove()
WinSet_t::const_iterator itWin1, itWin2;
AncList_t::const_iterator itAnc1, itAnc2;
if( config_GetInt( getIntf(), "skins2-transparency" ) )
if( var_InheritBool( getIntf(), "skins2-transparency" ) )
{
// Restore the opacity of the moving windows
WinSet_t::const_iterator it;
......
......@@ -183,13 +183,13 @@ bool Win32Factory::init()
strcpy( m_trayIcon.szTip, "VLC media player" );
// Show the systray icon if needed
if( config_GetInt( getIntf(), "skins2-systray" ) )
if( var_InheritBool( getIntf(), "skins2-systray" ) )
{
addInTray();
}
// Show the task in the task bar if needed
if( config_GetInt( getIntf(), "skins2-taskbar" ) )
if( var_InheritBool( getIntf(), "skins2-taskbar" ) )
{
addInTaskBar();
}
......
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