Commit 690d0794 authored by Felix Paul Kühne's avatar Felix Paul Kühne Committed by Jean-Baptiste Kempf

macosx: delay the 'rebuilding fontcache' dialog (close #6040)

(cherry picked from commit 5b459832)
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent de8a5786
......@@ -87,6 +87,7 @@
-(void)showLoginDialog: (NSValue *)o_value;
-(IBAction)loginDialogAction:(id)sender;
-(void)showProgressDialogOnMainThread: (NSValue *)o_value;
-(void)showProgressDialog: (NSValue *)o_value;
-(IBAction)progDialogAction:(id)sender;
-(BOOL)progressCancelled;
......
......@@ -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 performSelectorOnMainThread:@selector(showProgressDialog:) withObject:o_value waitUntilDone:YES];
[self performSelector:@selector(showProgressDialogOnMainThread:) withObject: o_value afterDelay:3.00];
else
msg_Err( VLCIntf, "unhandled dialog type: '%s'", type );
}
......@@ -161,6 +161,14 @@ static VLCCoreDialogProvider *_o_sharedInstance = nil;
[NSApp stopModalWithCode: 0];
}
-(void)showProgressDialogOnMainThread: (NSValue *)o_value
{
/* 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];
}
-(void)showProgressDialog: (NSValue *)o_value
{
dialog_progress_bar_t *p_dialog = [o_value pointerValue];
......
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