… | |
… | |
371 | [0.74, 0.65, 0.41], |
371 | [0.74, 0.65, 0.41], |
372 | ); |
372 | ); |
373 | |
373 | |
374 | my $time = sprintf "%02d:%02d:%02d", (localtime time)[2,1,0]; |
374 | my $time = sprintf "%02d:%02d:%02d", (localtime time)[2,1,0]; |
375 | |
375 | |
|
|
376 | # try to create single paragraphs of multiple lines sent by the server |
|
|
377 | $text =~ s/(?<=\S)\n(?=\w)/ /g; |
|
|
378 | |
376 | $text = CFClient::UI::Label::escape $text; |
379 | $text = CFClient::UI::Label::escape $text; |
377 | $text =~ s/\[b\](.*?)\[\/b\]/<b>\1<\/b>/g; |
380 | $text =~ s/\[b\](.*?)\[\/b\]/<b>\1<\/b>/g; |
378 | $text =~ s/\[color=(.*?)\](.*?)\[\/color\]/<span foreground='\1'>\2<\/span>/g; |
381 | $text =~ s/\[color=(.*?)\](.*?)\[\/color\]/<span foreground='\1'>\2<\/span>/g; |
379 | |
382 | |
380 | $self->{logview}->add_paragraph ($color[$color], |
383 | $self->{logview}->add_paragraph ($color[$color], |
… | |
… | |
483 | |
486 | |
484 | $::FLOORBOX->clear; |
487 | $::FLOORBOX->clear; |
485 | |
488 | |
486 | my $row; |
489 | my $row; |
487 | for (@{ $::CONN->{container}{0} }) { |
490 | for (@{ $::CONN->{container}{0} }) { |
488 | if ($row < 7) { |
491 | if ($row < 6) { |
489 | local $_->{face_widget}; # hack to force recreation of widget |
492 | local $_->{face_widget}; # hack to force recreation of widget |
490 | local $_->{desc_widget}; # hack to force recreation of widget |
493 | local $_->{desc_widget}; # hack to force recreation of widget |
491 | CFClient::Item::update_widgets $_; |
494 | CFClient::Item::update_widgets $_; |
492 | |
495 | |
493 | $::FLOORBOX->add (0, $row, $_->{face_widget}); |
496 | $::FLOORBOX->add (0, $row, $_->{face_widget}); |
494 | $::FLOORBOX->add (1, $row, $_->{desc_widget}); |
497 | $::FLOORBOX->add (1, $row, $_->{desc_widget}); |
495 | |
498 | |
496 | $row++; |
499 | $row++; |
497 | } else { |
500 | } else { |
498 | $::FLOORBOX->add (1, $row, new CFClient::UI::Label text => "More..."); |
501 | $::FLOORBOX->add (1, $row, new CFClient::UI::Button |
|
|
502 | text => "More...", |
|
|
503 | on_activate => sub { $::INV_WINDOW->toggle_visibility }, |
|
|
504 | ); |
499 | last; |
505 | last; |
500 | } |
506 | } |
501 | } |
507 | } |
502 | }); |
508 | }); |
503 | |
509 | |