Tools__InlineMessageDialog.st
changeset 17052 249ad2e42cb8
parent 16439 2a1c7ed2c5b3
child 17136 cb908d2ba02e
child 17810 892f591a7e57
--- a/Tools__InlineMessageDialog.st	Sun Nov 06 12:34:14 2016 +0100
+++ b/Tools__InlineMessageDialog.st	Sun Nov 06 12:34:30 2016 +0100
@@ -873,15 +873,14 @@
     "During an execution of aBlock, show a label with given
      string, a progressbar showing the progress and an 'Abort' button.
 
-    If the block raises a ProgressNotification, then the percentage
-    progress is updated accordingly. If it raises an ActivityNotification,
-    then the label is updated and progress bar is changed to be an
-    activity notificator.
+     If the block raises a ProgressNotification, then the percentage
+     progress is updated accordingly. If it raises an ActivityNotification,
+     then the label is updated and progress bar is changed to be an
+     activity notificator.
 
-    When an 'Abort' button is pressed, the block is interrupted by
-    AbortOperationRequest.
+     When an 'Abort' button is pressed, the block is interrupted by AbortOperationRequest.
 
-    When a block terminates (either normally or abruptly, dialog is closed.
+     When aBlock terminates (either normally or abruptly, the inline-dialog is closed).
     "
 
     worker := [
@@ -894,6 +893,23 @@
         [
             aBlock value.    
         ] on: ProgressNotification , ActivityNotification do:[:ex|
+            |status color|
+            
+            ex creator == ProgressNotification ifTrue:[
+                status := ex statusInfo.
+                status notNil ifTrue:[
+                    status == #error ifTrue:[
+                        color := Color red.
+                    ] ifFalse:[
+                        status == #warning ifTrue:[
+                            color := Color orange.
+                        ] ifFalse:[
+                            color := Color yellow.
+                        ].    
+                    ].    
+                    self progressIndicatorForegroundHolder value:color.
+                ].    
+            ].    
             self progress: ex parameter.
             ex messageText notNil ifTrue:[
                 self message: ex messageText.