]> git.sesse.net Git - vlc/commitdiff
skins2: replace most config_Get with var_Inherit
authorErwan Tulou <erwan10@videolan.org>
Sat, 6 Mar 2010 13:28:07 +0000 (14:28 +0100)
committerErwan Tulou <erwan10@videolan.org>
Sat, 6 Mar 2010 13:38:05 +0000 (14:38 +0100)
modules/gui/skins2/parser/interpreter.cpp
modules/gui/skins2/src/skin_main.cpp
modules/gui/skins2/src/theme_loader.cpp
modules/gui/skins2/src/theme_repository.cpp
modules/gui/skins2/src/vlcproc.cpp
modules/gui/skins2/src/window_manager.cpp
modules/gui/skins2/win32/win32_factory.cpp

index 38e01706ec91ca2742b6eb7a9882ac9f115d98f3..9f695aafffff9a9a2e9fe4d1c5d82f5cdf3675a9 100644 (file)
@@ -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() ) );
index 17d68def974338478988f2aeb71ed5f59a86b1ca..f019c1f4bd1fd577c8a3c13196d5055ee185e03a 100644 (file)
@@ -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 );
index 0d9cfd5b9ee7fede21f097417049b9b057588139..f06e77c1caea8b3bb7313100dcb095744ed39b54 100644 (file)
@@ -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
index 06199e4539b686c1974b820b24bad7122e187642..df8d8d1b7459c5d34ac87a3ff90fa3ed508e1d98 100644 (file)
@@ -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;
 
index b0981bb171c2fbab9f0825726eaf2298725e6b3c..bb95186822ce21d0768dbaff892e31127d90ffbc 100644 (file)
@@ -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 );
index d2c8b8ea437c45d4c82e5179bb457786d1648ffb..1081e1a61e62ad3193c52bb1a6d2d4c9fe70e046 100644 (file)
@@ -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;
index f95d9f7b7e5f00da7dcae268452bf59c89bd431c..7e0b5f96e989ad8387ea9828c370dc5fafdab636 100644 (file)
@@ -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();
     }