… | |
… | |
1032 | |
1032 | |
1033 | ## try to create single paragraphs of multiple lines sent by the server |
1033 | ## try to create single paragraphs of multiple lines sent by the server |
1034 | # no longer neecssary with TRT servers |
1034 | # no longer neecssary with TRT servers |
1035 | #$text =~ s/(?<=\S)\n(?=\w)/ /g; |
1035 | #$text =~ s/(?<=\S)\n(?=\w)/ /g; |
1036 | |
1036 | |
|
|
1037 | for (split /\n/, $text) { |
1037 | ::message ({ |
1038 | ::message ({ |
1038 | fg => $fg, |
1039 | fg => $fg, |
1039 | markup => $_, |
1040 | markup => $_, |
1040 | type => $type, |
1041 | type => $type, |
1041 | extra => [@extra], |
1042 | extra => [@extra], |
1042 | color_flags => $color |
1043 | color_flags => $color |
1043 | }) for split /\n/, $text; |
1044 | }); |
|
|
1045 | |
|
|
1046 | $color &= ~NDI_CLEAR; # only clear once for multiline messages |
|
|
1047 | } |
1044 | |
1048 | |
1045 | $self->{statusbox}->add ($text, |
1049 | $self->{statusbox}->add ($text, |
1046 | group => $text, |
1050 | group => $text, |
1047 | fg => $fg, |
1051 | fg => $fg, |
1048 | timeout => $color >= 2 ? 180 : 10, |
1052 | timeout => $color >= 2 ? 180 : 10, |