[vlc-commits] macosx: make sure that the 'updating font cache' dialog doesn' t show empty content (close #6439)

Felix Paul Kühne git at videolan.org
Mon Apr 2 09:19:45 CEST 2012


vlc | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Mon Apr  2 09:19:34 2012 +0200| [e1b1237c58718193bd74a198294be8d2de3b8625] | committer: Felix Paul Kühne

macosx: make sure that the 'updating font cache' dialog doesn't show empty content (close #6439)

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

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

diff --git a/modules/gui/macosx/coredialogs.m b/modules/gui/macosx/coredialogs.m
index 9bb043f..e2a52b6 100644
--- a/modules/gui/macosx/coredialogs.m
+++ b/modules/gui/macosx/coredialogs.m
@@ -166,12 +166,7 @@ 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 */
     b_progress_cancelled = NO;
-    if (VLCIntf)
-        [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 || b_progress_cancelled)
@@ -195,6 +190,18 @@ static VLCCoreDialogProvider *_o_sharedInstance = nil;
         [o_prog_description_txt setStringValue: [NSString stringWithUTF8String: p_dialog->message]];
     else
         [o_prog_description_txt setStringValue: @""];
+
+    if (VLCIntf)
+        [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 || b_progress_cancelled)
+        return;
+
     [o_prog_bar setDoubleValue: 0];
     [o_prog_bar setIndeterminate: YES];
     [o_prog_bar startAnimation: self];



More information about the vlc-commits mailing list