]> git.sesse.net Git - vlc/commitdiff
* interaction.c: always show errors through the interaction framework, even if the...
authorFelix Paul Kühne <fkuehne@videolan.org>
Mon, 31 Jul 2006 22:51:43 +0000 (22:51 +0000)
committerFelix Paul Kühne <fkuehne@videolan.org>
Mon, 31 Jul 2006 22:51:43 +0000 (22:51 +0000)
* macosx/*: minor clean-up

modules/gui/macosx/interaction.h
modules/gui/macosx/intf.m
src/interface/interaction.c

index c748ecc8ca22d76ada0070a361eccd42828fd64b..d8367c5af0b87e8a4a38d75f5ab3a7347db876b2 100644 (file)
@@ -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;
index 366091b69181cda9fcb2202fe055ca440d2ee131..9d25ff1c1a504d0da0d919ef7657bcc2a780d236 100644 (file)
@@ -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 );
index e0bf1b8adcdd7669cea45c74a3fa6d67a0607de6..60d395cae4a568b5801a23a049fe254688581933 100644 (file)
@@ -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 );