Commit a64b70d2 authored by David Fuhrmann's avatar David Fuhrmann

macosx: progress dialog: Fix cancellability and cancellable state

According to API, an empty (NULL) cancel string means the dialog
is not cancellable.
Dialog can be also cancelled by calling pf_cancel, which in turn
stops the modal event loop with 0. In this case,
vlc_dialog_id_dismiss shall be called as well.
parent b6ea6f5d
......@@ -286,8 +286,10 @@ static void updateProgressCallback(void *p_data,
if ([[dialogData objectAtIndex:5] length] > 0) {
progressCancelButton.title = [dialogData objectAtIndex:5];
progressCancelButton.enabled = YES;
} else {
progressCancelButton.title = _NS("Cancel");
progressCancelButton.enabled = NO;
[progressIndicator startAnimation:self];
......@@ -298,7 +300,6 @@ static void updateProgressCallback(void *p_data,
[progressIndicator stopAnimation:self];
if (returnValue == -1)
vlc_dialog_id_dismiss([[dialogData objectAtIndex:0] 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