[vlc-commits] macosx: fixed setting the following options on the command line: ' macosx-vdev', 'macosx-nativefullscreenmode', 'macosx-background', ' macosx-video-autoresize', 'macosx-black', 'macosx-mediakeys', ' macosx-appleremote'
Felix Paul Kühne
git at videolan.org
Thu Aug 16 13:42:09 CEST 2012
vlc | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Thu Aug 16 13:41:46 2012 +0200| [7f0b026896bf32365a641b54bc9d88d95d45885d] | committer: Felix Paul Kühne
macosx: fixed setting the following options on the command line: 'macosx-vdev', 'macosx-nativefullscreenmode', 'macosx-background', 'macosx-video-autoresize', 'macosx-black', 'macosx-mediakeys', 'macosx-appleremote'
This also closes #5892.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=7f0b026896bf32365a641b54bc9d88d95d45885d
---
modules/gui/macosx/MainMenu.m | 2 +-
modules/gui/macosx/MainWindow.m | 14 +++++++-------
modules/gui/macosx/intf.m | 12 ++++++------
3 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/modules/gui/macosx/MainMenu.m b/modules/gui/macosx/MainMenu.m
index 3803228..bb8b4d9 100644
--- a/modules/gui/macosx/MainMenu.m
+++ b/modules/gui/macosx/MainMenu.m
@@ -534,7 +534,7 @@ static VLCMainMenu *_o_sharedInstance = nil;
[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
diff --git a/modules/gui/macosx/MainWindow.m b/modules/gui/macosx/MainWindow.m
index 5fca070..3fb5788 100644
--- a/modules/gui/macosx/MainWindow.m
+++ b/modules/gui/macosx/MainWindow.m
@@ -171,7 +171,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
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];
@@ -1786,10 +1786,10 @@ static VLCMainWindow *_o_sharedInstance = nil;
- (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];
@@ -1974,7 +1974,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
{
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];
}
@@ -2037,10 +2037,10 @@ static VLCMainWindow *_o_sharedInstance = nil;
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)
@@ -2224,7 +2224,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
{
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;
diff --git a/modules/gui/macosx/intf.m b/modules/gui/macosx/intf.m
index bc931e3..586b1de 100644
--- a/modules/gui/macosx/intf.m
+++ b/modules/gui/macosx/intf.m
@@ -625,12 +625,12 @@ static VLCMain *_o_sharedMainInstance = nil;
[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
@@ -669,7 +669,7 @@ static VLCMain *_o_sharedMainInstance = nil;
[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];
@@ -897,7 +897,7 @@ static VLCMain *_o_sharedMainInstance = nil;
- (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
@@ -1659,7 +1659,7 @@ unsigned int CocoaKeyToVLC( unichar i_key )
- (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)
@@ -2179,7 +2179,7 @@ unsigned int CocoaKeyToVLC( unichar i_key )
}
- (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)
More information about the vlc-commits
mailing list