This also closes #5892.
[o_mitem setEnabled: YES];
[o_mitem setTarget: self];
}
- [[o_submenu itemWithTag: config_GetInt( VLCIntf, "macosx-vdev" )] setState: NSOnState];
+ [[o_submenu itemWithTag: var_InheritInteger( VLCIntf, "macosx-vdev" )] setState: NSOnState];
}
- (void)setSubmenusEnabled:(BOOL)b_enabled
b_nativeFullscreenMode = NO;
#ifdef MAC_OS_X_VERSION_10_7
if( OSX_LION && b_video_deco )
- b_nativeFullscreenMode = config_GetInt( VLCIntf, "macosx-nativefullscreenmode" );
+ b_nativeFullscreenMode = var_InheritBool( VLCIntf, "macosx-nativefullscreenmode" );
#endif
t_hide_mouse_timer = nil;
[o_detached_video_window setDelegate: self];
- (id)setupVideoView
{
// TODO: make lion fullscreen compatible with macosx-background and !embedded-video
- if( config_GetInt( VLCIntf, "macosx-background" ) && !b_nativeFullscreenMode )
+ if( var_InheritBool( VLCIntf, "macosx-background" ) && !b_nativeFullscreenMode )
{
msg_Dbg( VLCIntf, "Creating background window" );
- NSScreen *screen = [NSScreen screenWithDisplayID:(CGDirectDisplayID)config_GetInt( VLCIntf, "macosx-vdev" )];
+ NSScreen *screen = [NSScreen screenWithDisplayID:(CGDirectDisplayID)var_InheritInteger( VLCIntf, "macosx-vdev" )];
if( !screen )
screen = [self screen];
NSRect screen_rect = [screen frame];
{
nativeVideoSize = size;
- if( config_GetInt( VLCIntf, "macosx-video-autoresize" ) && !b_fullscreen && !config_GetInt( VLCIntf, "macosx-background" ) )
+ if( var_InheritBool( VLCIntf, "macosx-video-autoresize" ) && !b_fullscreen && !var_InheritBool( VLCIntf, "macosx-background" ) )
[self performSelectorOnMainThread:@selector(resizeWindow) withObject:nil waitUntilDone:NO];
}
NSScreen *screen;
NSRect screen_rect;
NSRect rect;
- BOOL blackout_other_displays = config_GetInt( VLCIntf, "macosx-black" );
+ BOOL blackout_other_displays = var_InheritBool( VLCIntf, "macosx-black" );
o_current_video_window = [o_video_view window];
- screen = [NSScreen screenWithDisplayID:(CGDirectDisplayID)config_GetInt( VLCIntf, "macosx-vdev" )];
+ screen = [NSScreen screenWithDisplayID:(CGDirectDisplayID)var_InheritInteger( VLCIntf, "macosx-vdev" )];
[self lockFullscreenAnimation];
if (!screen)
{
NSMutableDictionary *dict1, *dict2;
NSRect frame;
- BOOL blackout_other_displays = config_GetInt( VLCIntf, "macosx-black" );
+ BOOL blackout_other_displays = var_InheritBool( VLCIntf, "macosx-black" );
if( !o_current_video_window )
return;
[o_msgs_refresh_btn setImage: [NSImage imageNamed: NSImageNameRefreshTemplate]];
- BOOL b_video_deco = config_GetInt( VLCIntf, "video-deco" );
+ BOOL b_video_deco = var_InheritBool( VLCIntf, "video-deco" );
/* yeah, we are done */
b_nativeFullscreenMode = NO;
#ifdef MAC_OS_X_VERSION_10_7
if( OSX_LION && b_video_deco )
- b_nativeFullscreenMode = config_GetInt( p_intf, "macosx-nativefullscreenmode" );
+ b_nativeFullscreenMode = var_InheritBool( p_intf, "macosx-nativefullscreenmode" );
#endif
/* recover stored audio device, if set
[o_mainwindow makeKeyAndOrderFront: self];
/* init media key support */
- b_mediaKeySupport = config_GetInt( VLCIntf, "macosx-mediakeys" );
+ b_mediaKeySupport = var_InheritBool( VLCIntf, "macosx-mediakeys" );
if( b_mediaKeySupport )
{
o_mediaKeyController = [[SPMediaKeyTap alloc] initWithDelegate:self];
- (void)applicationDidBecomeActive:(NSNotification *)aNotification
{
if( !p_intf ) return;
- if( config_GetInt( p_intf, "macosx-appleremote" ) == YES )
+ if( var_InheritBool( p_intf, "macosx-appleremote" ) == YES )
[o_remote startListening: self];
}
- (void)applicationDidResignActive:(NSNotification *)aNotification
- (void)setWindowLevel:(NSNumber*)state
{
- if( config_GetInt( p_intf, "macosx-background" ) )
+ if( var_InheritBool( p_intf, "macosx-background" ) )
return;
if ([state unsignedIntValue] & VOUT_WINDOW_STATE_ABOVE)
}
- (void)coreChangedMediaKeySupportSetting: (NSNotification *)o_notification
{
- b_mediaKeySupport = config_GetInt( VLCIntf, "macosx-mediakeys" );
+ b_mediaKeySupport = var_InheritBool( VLCIntf, "macosx-mediakeys" );
if (b_mediaKeySupport)
{
if (!o_mediaKeyController)