[vlc-commits] macosx: cosmetics

Felix Paul Kühne git at videolan.org
Thu Mar 1 17:46:40 CET 2012


vlc/vlc-2.0 | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Thu Mar  1 17:46:09 2012 +0100| [90172d0239773fd275e4c3cfb897d6d504a3ba4e] | committer: Felix Paul Kühne

macosx: cosmetics
(cherry picked from commit 1e952e5ee6cfd2e0479a6589802234c46e65d2f0)

> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.0.git/?a=commit;h=90172d0239773fd275e4c3cfb897d6d504a3ba4e
---

 modules/gui/macosx/coredialogs.m |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/modules/gui/macosx/coredialogs.m b/modules/gui/macosx/coredialogs.m
index 384ea8b..dcda482 100644
--- a/modules/gui/macosx/coredialogs.m
+++ b/modules/gui/macosx/coredialogs.m
@@ -79,7 +79,7 @@ static VLCCoreDialogProvider *_o_sharedInstance = nil;
     else if( [o_type isEqualToString: @"dialog-login"] )
         [self performSelectorOnMainThread:@selector(showLoginDialog:) withObject:o_value waitUntilDone:YES];
     else if( [o_type isEqualToString: @"dialog-progress-bar"] )
-        [self performSelector:@selector(showProgressDialogOnMainThread:) withObject: o_value afterDelay:3.00];
+        [self performSelectorOnMainThread:@selector(showProgressDialogOnMainThread:) withObject: o_value waitUntilDone:YES];
     else
         msg_Err( VLCIntf, "unhandled dialog type: '%s'", type );
 }
@@ -166,13 +166,16 @@ static VLCCoreDialogProvider *_o_sharedInstance = nil;
     /* we work-around a Cocoa limitation here, since you cannot delay an execution
      * on the main thread within a single call */
     if (VLCIntf)
-        [self performSelectorOnMainThread:@selector(showProgressDialog:) withObject:o_value waitUntilDone:YES];
+        [self performSelector:@selector(showProgressDialog:) withObject: o_value afterDelay:3.00];
 }
 
 -(void)showProgressDialog: (NSValue *)o_value
 {
     dialog_progress_bar_t *p_dialog = [o_value pointerValue];
 
+    if (!p_dialog)
+        return;
+
     if( p_dialog->title != NULL )
     {
         [o_prog_win setTitle: [NSString stringWithUTF8String: p_dialog->title]];



More information about the vlc-commits mailing list