]> git.sesse.net Git - vlc/commitdiff
macosx: fixed setting the following options on the command line: 'macosx-vdev', ...
authorFelix Paul Kühne <fkuehne@videolan.org>
Thu, 16 Aug 2012 11:41:46 +0000 (13:41 +0200)
committerFelix Paul Kühne <fkuehne@videolan.org>
Thu, 16 Aug 2012 11:41:46 +0000 (13:41 +0200)
This also closes #5892.

modules/gui/macosx/MainMenu.m
modules/gui/macosx/MainWindow.m
modules/gui/macosx/intf.m

index 3803228ba19071c00f25b810744f7ee9ee8066a9..bb8b4d917e5226a1220bacbe5ed76b8495c1515e 100644 (file)
@@ -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
index 5fca07067580a1a6bc52237237d1f7d1179a9974..3fb57882b5dccc754e4646c3a687f5d92a39ef75 100644 (file)
@@ -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;
index bc931e3e50ccee04102098e62ef969af998ab52d..586b1ded2f62002ef0d9bd7dee723c1863086cbb 100644 (file)
@@ -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)