Commit 239a46ae authored by Derk-Jan Hartman's avatar Derk-Jan Hartman

* Fix the 'auto' selection of Console intf in "extra intfs" menu entry.

parent 2d938d88
......@@ -435,6 +435,7 @@
o_data = [[VLCMenuExt alloc] initWithVar: psz_variable Object: p_object->i_object_id
Value: val ofType: i_type];
[o_mi setRepresentedObject: [NSValue valueWithPointer:[o_data retain]]];
if( !( i_type & VLC_VAR_ISCOMMAND ) )
[o_mi setState: val.b_bool ? TRUE : FALSE ];
break;
......@@ -517,24 +518,6 @@
switch( i_type & VLC_VAR_TYPE )
{
case VLC_VAR_VARIABLE:
/* This is causing crashes for the moment.
o_title = [NSApp localizedString: text_list.p_list->p_values[i].psz_string ?
text_list.p_list->p_values[i].psz_string : val_list.p_list->p_values[i].psz_string ];
o_data = [[VLCMenuExt alloc] initWithVar: strdup(psz_variable) Object: p_object->i_object_id
Value: val ofType: i_type];
[o_lmi setRepresentedObject: [NSValue valueWithPointer:[o_data retain]]];
// Create a submenu
NSMenu *o_menu = [o_lmi submenu];
[self setupVarMenu: o_menu forMenuItem: o_lmi target:p_object
var:psz_variable selector:pf_callback];
*/
return;
case VLC_VAR_STRING:
another_val.psz_string =
strdup(val_list.p_list->p_values[i].psz_string);
......@@ -548,7 +531,7 @@
[o_lmi setRepresentedObject: [NSValue valueWithPointer:[o_data retain]]];
[o_lmi setTarget: self];
if( !strcmp( val.psz_string, val_list.p_list->p_values[i].psz_string ) )
if( !strcmp( val.psz_string, val_list.p_list->p_values[i].psz_string ) && !( i_type & VLC_VAR_ISCOMMAND ) )
[o_lmi setState: TRUE ];
break;
......@@ -566,7 +549,7 @@
[o_lmi setRepresentedObject: [NSValue valueWithPointer:[ o_data retain]]];
[o_lmi setTarget: self];
if( val_list.p_list->p_values[i].i_int == val.i_int )
if( val_list.p_list->p_values[i].i_int == val.i_int && !( i_type & VLC_VAR_ISCOMMAND ) )
[o_lmi setState: TRUE ];
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