--- a/Tools__InlineMessageDialog.st Thu Nov 24 22:03:16 2016 +0000
+++ b/Tools__InlineMessageDialog.st Thu Nov 24 22:14:31 2016 +0000
@@ -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.