Commit 96a6787b authored by Gildas Bazin's avatar Gildas Bazin

* src/interface/interface.c: added skins2 to the interface menu.
* modules/gui/skins2/*: s/skin_last/skins2-last s/skin_config/skins2-config and fixed saving of skins2 configuration.
parent 3301dd40
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* skin_main.cpp * skin_main.cpp
***************************************************************************** *****************************************************************************
* Copyright (C) 2003 VideoLAN * Copyright (C) 2003 VideoLAN
* $Id: skin_main.cpp,v 1.5 2004/01/25 23:04:06 asmax Exp $ * $Id: skin_main.cpp,v 1.6 2004/02/08 11:23:17 gbazin Exp $
* *
* Authors: Cyril Deguet <asmax@via.ecp.fr> * Authors: Cyril Deguet <asmax@via.ecp.fr>
* Olivier Teulire <ipkiss@via.ecp.fr> * Olivier Teulire <ipkiss@via.ecp.fr>
...@@ -166,7 +166,7 @@ static void Run( intf_thread_t *p_intf ) ...@@ -166,7 +166,7 @@ static void Run( intf_thread_t *p_intf )
{ {
// Load a theme // Load a theme
ThemeLoader *pLoader = new ThemeLoader( p_intf ); ThemeLoader *pLoader = new ThemeLoader( p_intf );
char *skin_last = config_GetPsz( p_intf, "skin_last" ); char *skin_last = config_GetPsz( p_intf, "skins2-last" );
if( skin_last == NULL || !pLoader->load( skin_last ) ) if( skin_last == NULL || !pLoader->load( skin_last ) )
{ {
...@@ -229,13 +229,12 @@ static void Run( intf_thread_t *p_intf ) ...@@ -229,13 +229,12 @@ static void Run( intf_thread_t *p_intf )
#define SKIN_CONFIG_LONG N_("Config of last used skin.") #define SKIN_CONFIG_LONG N_("Config of last used skin.")
vlc_module_begin(); vlc_module_begin();
add_string( "skin_last", "", NULL, DEFAULT_SKIN, DEFAULT_SKIN_LONG, add_string( "skins2-last", "", NULL, DEFAULT_SKIN, DEFAULT_SKIN_LONG,
VLC_TRUE ); VLC_TRUE );
add_string( "skin_config", "", NULL, SKIN_CONFIG, SKIN_CONFIG_LONG, add_string( "skins2-config", "", NULL, SKIN_CONFIG, SKIN_CONFIG_LONG,
VLC_TRUE ); VLC_TRUE );
set_description( _("Skinnable Interface") ); set_description( _("Skinnable Interface") );
set_capability( "interface", 30 ); set_capability( "interface", 30 );
set_callbacks( Open, Close ); set_callbacks( Open, Close );
set_program( "svlc" ); set_program( "s2vlc" );
vlc_module_end(); vlc_module_end();
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* theme.cpp * theme.cpp
***************************************************************************** *****************************************************************************
* Copyright (C) 2003 VideoLAN * Copyright (C) 2003 VideoLAN
* $Id: theme.cpp,v 1.2 2004/01/25 23:04:06 asmax Exp $ * $Id: theme.cpp,v 1.3 2004/02/08 11:23:17 gbazin Exp $
* *
* Authors: Cyril Deguet <asmax@via.ecp.fr> * Authors: Cyril Deguet <asmax@via.ecp.fr>
* Olivier Teulire <ipkiss@via.ecp.fr> * Olivier Teulire <ipkiss@via.ecp.fr>
...@@ -45,7 +45,7 @@ void Theme::loadConfig() ...@@ -45,7 +45,7 @@ void Theme::loadConfig()
msg_Dbg( getIntf(), "Loading theme configuration"); msg_Dbg( getIntf(), "Loading theme configuration");
// Get config from vlcrc file // Get config from vlcrc file
char *save = config_GetPsz( getIntf(), "skin_config" ); char *save = config_GetPsz( getIntf(), "skins2-config" );
if( save == NULL ) if( save == NULL )
return; return;
...@@ -97,8 +97,8 @@ void Theme::saveConfig() ...@@ -97,8 +97,8 @@ void Theme::saveConfig()
} }
// Save config to file // Save config to file
config_PutPsz( getIntf(), "skin_config", save ); config_PutPsz( getIntf(), "skins2-config", save );
config_SaveConfigFile( getIntf(), "skins" ); config_SaveConfigFile( getIntf(), "skins2" );
// Free memory // Free memory
delete[] save; delete[] save;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* theme_loader.cpp * theme_loader.cpp
***************************************************************************** *****************************************************************************
* Copyright (C) 2003 VideoLAN * Copyright (C) 2003 VideoLAN
* $Id: theme_loader.cpp,v 1.8 2004/01/25 23:04:06 asmax Exp $ * $Id: theme_loader.cpp,v 1.9 2004/02/08 11:23:17 gbazin Exp $
* *
* Authors: Cyril Deguet <asmax@via.ecp.fr> * Authors: Cyril Deguet <asmax@via.ecp.fr>
* Olivier Teulire <ipkiss@via.ecp.fr> * Olivier Teulire <ipkiss@via.ecp.fr>
...@@ -73,7 +73,7 @@ bool ThemeLoader::load( const string &fileName ) ...@@ -73,7 +73,7 @@ bool ThemeLoader::load( const string &fileName )
} }
// Check if the skin to load is in the config file, to load its config // Check if the skin to load is in the config file, to load its config
char *skin_last = config_GetPsz( getIntf(), "skin_last" ); char *skin_last = config_GetPsz( getIntf(), "skins2-last" );
if( skin_last != NULL && fileName == (string)skin_last ) if( skin_last != NULL && fileName == (string)skin_last )
{ {
// Used to anchor the windows at the beginning // Used to anchor the windows at the beginning
...@@ -83,7 +83,7 @@ bool ThemeLoader::load( const string &fileName ) ...@@ -83,7 +83,7 @@ bool ThemeLoader::load( const string &fileName )
} }
else else
{ {
config_PutPsz( getIntf(), "skin_last", fileName.c_str() ); config_PutPsz( getIntf(), "skins2-last", fileName.c_str() );
// Show the windows // Show the windows
pNewTheme->getWindowManager().showAll(); pNewTheme->getWindowManager().showAll();
} }
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* interface, such as command line. * interface, such as command line.
***************************************************************************** *****************************************************************************
* Copyright (C) 1998-2004 VideoLAN * Copyright (C) 1998-2004 VideoLAN
* $Id: interface.c,v 1.112 2004/01/25 17:16:06 zorglub Exp $ * $Id: interface.c,v 1.113 2004/02/08 11:23:17 gbazin Exp $
* *
* Authors: Vincent Seguin <seguin@via.ecp.fr> * Authors: Vincent Seguin <seguin@via.ecp.fr>
* *
...@@ -257,6 +257,8 @@ static void RunInterface( intf_thread_t *p_intf ) ...@@ -257,6 +257,8 @@ static void RunInterface( intf_thread_t *p_intf )
val.psz_string = "skins"; text.psz_string = "Skins"; val.psz_string = "skins"; text.psz_string = "Skins";
var_Change( p_intf, "intf-switch", VLC_VAR_ADDCHOICE, &val, &text ); var_Change( p_intf, "intf-switch", VLC_VAR_ADDCHOICE, &val, &text );
val.psz_string = "skins2"; text.psz_string = "Skins 2";
var_Change( p_intf, "intf-switch", VLC_VAR_ADDCHOICE, &val, &text );
val.psz_string = "wxwin"; text.psz_string = "wxWindows"; val.psz_string = "wxwin"; text.psz_string = "wxWindows";
var_Change( p_intf, "intf-switch", VLC_VAR_ADDCHOICE, &val, &text ); var_Change( p_intf, "intf-switch", VLC_VAR_ADDCHOICE, &val, &text );
......
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