Commit 5e2efe13 authored by Clément Stenac's avatar Clément Stenac

Allow intf-switch

  * both ways in !Win32
  * only wx->skins in Win32
parent bbe98d26
...@@ -259,7 +259,7 @@ void PopupMenu( intf_thread_t *p_intf, wxWindow *p_parent, ...@@ -259,7 +259,7 @@ void PopupMenu( intf_thread_t *p_intf, wxWindow *p_parent,
FIND_PARENT ); FIND_PARENT );
if( p_object != NULL ) if( p_object != NULL )
{ {
#if 0 #ifndef WIN32
#if (wxCHECK_VERSION(2,5,0)) #if (wxCHECK_VERSION(2,5,0))
ppsz_varnames[i] = "intf-switch"; ppsz_varnames[i] = "intf-switch";
pi_objects[i++] = p_object->i_object_id; pi_objects[i++] = p_object->i_object_id;
...@@ -512,11 +512,9 @@ wxMenu *SettingsMenu( intf_thread_t *_p_intf, wxWindow *p_parent, ...@@ -512,11 +512,9 @@ wxMenu *SettingsMenu( intf_thread_t *_p_intf, wxWindow *p_parent,
FIND_PARENT ); FIND_PARENT );
if( p_object != NULL ) if( p_object != NULL )
{ {
#if 0
#if (wxCHECK_VERSION(2,5,0)) #if (wxCHECK_VERSION(2,5,0))
ppsz_varnames[i] = "intf-switch"; ppsz_varnames[i] = "intf-switch";
pi_objects[i++] = p_object->i_object_id; pi_objects[i++] = p_object->i_object_id;
#endif
#endif #endif
ppsz_varnames[i] = "intf-add"; ppsz_varnames[i] = "intf-add";
pi_objects[i++] = p_object->i_object_id; pi_objects[i++] = p_object->i_object_id;
...@@ -642,6 +640,8 @@ static bool IsMenuEmpty( char *psz_var, vlc_object_t *p_object, ...@@ -642,6 +640,8 @@ static bool IsMenuEmpty( char *psz_var, vlc_object_t *p_object,
if( (i_type & VLC_VAR_TYPE) != VLC_VAR_VARIABLE ) if( (i_type & VLC_VAR_TYPE) != VLC_VAR_VARIABLE )
{ {
/* Very evil hack ! intf-switch can have only one value */
if( !strcmp( psz_var, "intf-switch" ) ) return FALSE;
if( val.i_int == 1 && b_root ) return TRUE; if( val.i_int == 1 && b_root ) return TRUE;
else return FALSE; else return FALSE;
} }
......
...@@ -329,7 +329,9 @@ static void RunInterface( intf_thread_t *p_intf ) ...@@ -329,7 +329,9 @@ static void RunInterface( intf_thread_t *p_intf )
static char *ppsz_interfaces[] = static char *ppsz_interfaces[] =
{ {
"skins2", "Skins 2", "skins2", "Skins 2",
#ifndef WIN32
"wxwidgets", "wxWidgets", "wxwidgets", "wxWidgets",
#endif
NULL, NULL NULL, NULL
}; };
char **ppsz_parser; char **ppsz_parser;
...@@ -357,6 +359,7 @@ static void RunInterface( intf_thread_t *p_intf ) ...@@ -357,6 +359,7 @@ static void RunInterface( intf_thread_t *p_intf )
{ {
val.psz_string = ppsz_parser[0]; val.psz_string = ppsz_parser[0];
text.psz_string = ppsz_parser[1]; text.psz_string = ppsz_parser[1];
fprintf( stderr, "Adding %s\n", val.psz_string );
var_Change( p_intf, "intf-switch", VLC_VAR_ADDCHOICE, var_Change( p_intf, "intf-switch", VLC_VAR_ADDCHOICE,
&val, &text ); &val, &text );
break; break;
......
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