From 5d09f6000a0b589d63e1fc9c6af4e5b055658203 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Felix=20Paul=20K=C3=BChne?= Date: Mon, 31 Jul 2006 22:51:43 +0000 Subject: [PATCH] * interaction.c: always show errors through the interaction framework, even if the user disabled its usage * macosx/*: minor clean-up --- modules/gui/macosx/interaction.h | 1 + modules/gui/macosx/intf.m | 3 --- src/interface/interaction.c | 29 ++++++++++++++++++----------- 3 files changed, 19 insertions(+), 14 deletions(-) diff --git a/modules/gui/macosx/interaction.h b/modules/gui/macosx/interaction.h index c748ecc8ca..d8367c5af0 100644 --- a/modules/gui/macosx/interaction.h +++ b/modules/gui/macosx/interaction.h @@ -92,6 +92,7 @@ BOOL nib_interact_errpanel_loaded; } - (IBAction)cleanupTable:(id)sender; +- (IBAction)showMessages:(id)sender; -(void)showPanel; -(void)addError: (NSString *)o_error withMsg:(NSString *)o_msg; diff --git a/modules/gui/macosx/intf.m b/modules/gui/macosx/intf.m index 366091b691..9d25ff1c1a 100644 --- a/modules/gui/macosx/intf.m +++ b/modules/gui/macosx/intf.m @@ -1309,7 +1309,6 @@ static VLCMain *_o_sharedMainInstance = nil; - (void)updateMessageArray { int i_start, i_stop; - vlc_value_t quiet; vlc_mutex_lock( p_intf->p_sys->p_sub->p_lock ); i_stop = *p_intf->p_sys->p_sub->pi_stop; @@ -1363,8 +1362,6 @@ static VLCMain *_o_sharedMainInstance = nil; [o_msg_arr addObject: [o_msg_color autorelease]]; [o_msg_lock unlock]; - - var_Get( p_intf->p_vlc, "verbose", &quiet ); } vlc_mutex_lock( p_intf->p_sys->p_sub->p_lock ); diff --git a/src/interface/interaction.c b/src/interface/interaction.c index e0bf1b8adc..60d395cae4 100644 --- a/src/interface/interaction.c +++ b/src/interface/interaction.c @@ -75,20 +75,25 @@ int __intf_Interact( vlc_object_t *p_this, interaction_dialog_t *p_dialog ) if( p_this->i_flags & OBJECT_FLAGS_NOINTERACT ) return VLC_EGENERIC; - if( !config_GetInt(p_this, "interact") ) return VLC_EGENERIC; - - p_dialog->p_interaction = p_interaction; - p_dialog->p_parent = p_this; - - if( p_dialog->i_type == INTERACT_DIALOG_TWOWAY ) + if( config_GetInt(p_this, "interact") || + p_dialog->i_flags & DIALOG_BLOCKING_ERROR || + p_dialog->i_flags & DIALOG_NONBLOCKING_ERROR ) { - return intf_WaitAnswer( p_interaction, p_dialog ); + p_dialog->p_interaction = p_interaction; + p_dialog->p_parent = p_this; + + if( p_dialog->i_type == INTERACT_DIALOG_TWOWAY ) + { + return intf_WaitAnswer( p_interaction, p_dialog ); + } + else + { + p_dialog->i_flags |= DIALOG_GOT_ANSWER; + return intf_Send( p_interaction, p_dialog ); + } } else - { - p_dialog->i_flags |= DIALOG_GOT_ANSWER; - return intf_Send( p_interaction, p_dialog ); - } + return VLC_EGENERIC; } /** @@ -253,6 +258,7 @@ void __intf_UserFatal( vlc_object_t *p_this, INTERACT_INIT( p_new ); p_new->psz_title = strdup( psz_title ); + p_new->i_type = INTERACT_DIALOG_ONEWAY; va_start( args, psz_format ); vasprintf( &p_new->psz_description, psz_format, args ); @@ -281,6 +287,7 @@ void __intf_UserWarn( vlc_object_t *p_this, INTERACT_INIT( p_new ); p_new->psz_title = strdup( psz_title ); + p_new->i_type = INTERACT_DIALOG_ONEWAY; va_start( args, psz_format ); vasprintf( &p_new->psz_description, psz_format, args ); -- 2.39.2