NSValue *o_value = [[o_notification userInfo] objectForKey:@"VLCDialogPointer"];
NSString *o_type = [[o_notification userInfo] objectForKey:@"VLCDialogType"];
- if( [o_type isEqualToString: @"dialog-fatal"] )
+ if( [o_type isEqualToString: @"dialog-error"] )
[self showFatalDialog: o_value];
+ else if( [o_type isEqualToString: @"dialog-critical"] )
+ [self showFatalWaitDialog: o_value];
else if( [o_type isEqualToString: @"dialog-question"] )
[self showQuestionDialog: o_value];
else if( [o_type isEqualToString: @"dialog-login"] )
-(void)showFatalDialog: (NSValue *)o_value
{
dialog_fatal_t *p_dialog = [o_value pointerValue];
- /* do we need to block ? */
- if( p_dialog->modal == YES )
- {
- NSAlert *o_alert;
- o_alert = [NSAlert alertWithMessageText: [NSString stringWithUTF8String: p_dialog->title] defaultButton: _NS("OK") alternateButton: nil otherButton: nil informativeTextWithFormat: [NSString stringWithUTF8String: p_dialog->message]];
- [o_alert setAlertStyle: NSCriticalAlertStyle];
- [o_alert runModal];
- }
- else
- {
- [o_error_panel addError: [NSString stringWithUTF8String: p_dialog->title] withMsg: [NSString stringWithUTF8String: p_dialog->message]];
- [o_error_panel showPanel];
- }
+
+ [o_error_panel addError: [NSString stringWithUTF8String: p_dialog->title] withMsg: [NSString stringWithUTF8String: p_dialog->message]];
+ [o_error_panel showPanel];
+}
+
+-(void)showFatalWaitDialog: (NSValue *)o_value
+{
+ dialog_fatal_t *p_dialog = [o_value pointerValue];
+ NSAlert *o_alert;
+
+ o_alert = [NSAlert alertWithMessageText: [NSString stringWithUTF8String: p_dialog->title] defaultButton: _NS("OK") alternateButton: nil otherButton: nil informativeTextWithFormat: [NSString stringWithUTF8String: p_dialog->message]];
+ [o_alert setAlertStyle: NSCriticalAlertStyle];
+ [o_alert runModal];
}
-(void)showQuestionDialog: (NSValue *)o_value
nib_coredialogs_loaded = [NSBundle loadNibNamed:@"CoreDialogs" owner: NSApp];
/* subscribe to various interactive dialogues */
- var_Create( p_intf, "dialog-fatal", VLC_VAR_ADDRESS );
- var_AddCallback( p_intf, "dialog-fatal", DialogCallback, self );
+ var_Create( p_intf, "dialog-error", VLC_VAR_ADDRESS );
+ var_AddCallback( p_intf, "dialog-error", DialogCallback, self );
+ var_Create( p_intf, "dialog-critical", VLC_VAR_ADDRESS );
+ var_AddCallback( p_intf, "dialog-critical", DialogCallback, self );
var_Create( p_intf, "dialog-login", VLC_VAR_ADDRESS );
var_AddCallback( p_intf, "dialog-login", DialogCallback, self );
var_Create( p_intf, "dialog-question", VLC_VAR_ADDRESS );
/* unsubscribe from the interactive dialogues */
dialog_Unregister( p_intf );
- var_DelCallback( p_intf, "dialog-fatal", DialogCallback, self );
+ var_DelCallback( p_intf, "dialog-error", DialogCallback, self );
+ var_DelCallback( p_intf, "dialog-critical", DialogCallback, self );
var_DelCallback( p_intf, "dialog-login", DialogCallback, self );
var_DelCallback( p_intf, "dialog-question", DialogCallback, self );
var_DelCallback( p_intf, "dialog-progress-bar", DialogCallback, self );