Commit 1de6f934 authored by Felix Paul Kühne's avatar Felix Paul Kühne

macosx: fixed potential race condition

items stored in a xib should only interacted with after its loaded, which may be after NSApp is
parent 4471b1a1
...@@ -654,6 +654,13 @@ static VLCMain *_o_sharedMainInstance = nil; ...@@ -654,6 +654,13 @@ static VLCMain *_o_sharedMainInstance = nil;
[[VLCApplication sharedApplication] setApplicationIconImage: [NSImage imageNamed:@"vlc-xmas"]]; [[VLCApplication sharedApplication] setApplicationIconImage: [NSImage imageNamed:@"vlc-xmas"]];
} }
[o_mainwindow updateWindow];
[o_mainwindow updateTimeSlider];
[o_mainwindow updateVolumeSlider];
[o_mainwindow makeKeyAndOrderFront: self];
[self initStrings];
nib_main_loaded = TRUE; nib_main_loaded = TRUE;
} }
...@@ -663,11 +670,6 @@ static VLCMain *_o_sharedMainInstance = nil; ...@@ -663,11 +670,6 @@ static VLCMain *_o_sharedMainInstance = nil;
[self updateCurrentlyUsedHotkeys]; [self updateCurrentlyUsedHotkeys];
[o_mainwindow updateWindow];
[o_mainwindow updateTimeSlider];
[o_mainwindow updateVolumeSlider];
[o_mainwindow makeKeyAndOrderFront: self];
/* init media key support */ /* init media key support */
b_mediaKeySupport = var_InheritBool( VLCIntf, "macosx-mediakeys" ); b_mediaKeySupport = var_InheritBool( VLCIntf, "macosx-mediakeys" );
if( b_mediaKeySupport ) if( b_mediaKeySupport )
...@@ -690,7 +692,6 @@ static VLCMain *_o_sharedMainInstance = nil; ...@@ -690,7 +692,6 @@ static VLCMain *_o_sharedMainInstance = nil;
/* we will need this, so let's load it here so the interface appears to be more responsive */ /* we will need this, so let's load it here so the interface appears to be more responsive */
nib_open_loaded = [NSBundle loadNibNamed:@"Open" owner: NSApp]; nib_open_loaded = [NSBundle loadNibNamed:@"Open" owner: NSApp];
[self initStrings];
} }
- (void)initStrings - (void)initStrings
......
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