[vlc-commits] macosx: avoid ugly delayed initialization calls for the open panel

David Fuhrmann git at videolan.org
Wed Apr 2 14:35:10 CEST 2014


vlc | branch: master | David Fuhrmann <dfuhrmann at videolan.org> | Wed Apr  2 14:31:50 2014 +0200| [7d67bb4b6638e40535b8398c1a60119ca6b40dae] | committer: David Fuhrmann

macosx: avoid ugly delayed initialization calls for the open panel

These selectors may not be called in time as the main loop is blocked
if a modal dialog is open.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=7d67bb4b6638e40535b8398c1a60119ca6b40dae
---

 modules/gui/macosx/open.m |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/modules/gui/macosx/open.m b/modules/gui/macosx/open.m
index 60e2f03..9e3e538 100644
--- a/modules/gui/macosx/open.m
+++ b/modules/gui/macosx/open.m
@@ -317,8 +317,9 @@ static VLCOpen *_o_sharedMainInstance = nil;
 
     [[sharedWorkspace notificationCenter] addObserver:self selector:@selector(scanOpticalMedia:) name:NSWorkspaceDidMountNotification object:nil];
     [[sharedWorkspace notificationCenter] addObserver:self selector:@selector(scanOpticalMedia:) name:NSWorkspaceDidUnmountNotification object:nil];
-    [self performSelector:@selector(qtkToggleUIElements:) withObject:nil afterDelay:.3];
-    [self performSelector:@selector(scanOpticalMedia:) withObject:nil afterDelay:.5];
+
+    [self qtkToggleUIElements:nil];
+    [self scanOpticalMedia:nil];
 
     [self setMRL: @""];
 }



More information about the vlc-commits mailing list