… | |
… | |
623 | [0.74, 0.65, 0.41], |
623 | [0.74, 0.65, 0.41], |
624 | ); |
624 | ); |
625 | |
625 | |
626 | $self->logprint ("info: ", $text); |
626 | $self->logprint ("info: ", $text); |
627 | |
627 | |
628 | my $time = sprintf "%02d:%02d:%02d", (localtime time)[2,1,0]; |
|
|
629 | |
|
|
630 | # try to create single paragraphs of multiple lines sent by the server |
628 | # try to create single paragraphs of multiple lines sent by the server |
631 | $text =~ s/(?<=\S)\n(?=\w)/ /g; |
629 | $text =~ s/(?<=\S)\n(?=\w)/ /g; |
632 | |
630 | |
633 | $text = CFPlus::asxml $text; |
631 | $text = CFPlus::asxml $text; |
634 | $text =~ s/\[b\](.*?)\[\/b\]/<b>\1<\/b>/g; |
632 | $text =~ s/\[b\](.*?)\[\/b\]/<b>\1<\/b>/g; |
635 | $text =~ s/\[color=(.*?)\](.*?)\[\/color\]/<span foreground='\1'>\2<\/span>/g; |
633 | $text =~ s/\[color=(.*?)\](.*?)\[\/color\]/<span foreground='\1'>\2<\/span>/g; |
636 | |
634 | |
637 | $self->{logview}->add_paragraph ({ fg => $color[$color], markup => $_ }) |
635 | ::message ({ fg => $color[$color], markup => $_ }) |
638 | for map "<span foreground='#ffffff'>$time</span> $_", split /\n/, $text; |
636 | for split /\n/, $text; |
639 | $self->{logview}->scroll_to_bottom; |
|
|
640 | |
637 | |
641 | $self->{statusbox}->add ($text, |
638 | $self->{statusbox}->add ($text, |
642 | group => $text, |
639 | group => $text, |
643 | fg => $color[$color], |
640 | fg => $color[$color], |
644 | timeout => $color >= 2 ? 180 : 10, |
641 | timeout => $color >= 2 ? 180 : 10, |
… | |
… | |
883 | $::SERVER_INFO->set_markup ( |
880 | $::SERVER_INFO->set_markup ( |
884 | "server <tt>$self->{host}:$self->{port}</tt>\n" |
881 | "server <tt>$self->{host}:$self->{port}</tt>\n" |
885 | . "protocol version <tt>$self->{version}</tt>\n" |
882 | . "protocol version <tt>$self->{version}</tt>\n" |
886 | . "minimap support $yesno[$self->{setup}{mapinfocmd} > 0]\n" |
883 | . "minimap support $yesno[$self->{setup}{mapinfocmd} > 0]\n" |
887 | . "extended command support $yesno[$self->{setup}{extcmd} > 0]\n" |
884 | . "extended command support $yesno[$self->{setup}{extcmd} > 0]\n" |
888 | . "editor support $yesno[!!length $self->{cvs_root}]\n" |
885 | . "editing support $yesno[!!$self->{editor_support}]\n" |
889 | . "test server " . (length $self->{test_server} ? $self->{test_server} : $yesno[0]) . "\n" |
|
|
890 | . "map attributes $yesno[$self->{setup}{extmap} > 0]\n" |
886 | . "map attributes $yesno[$self->{setup}{extmap} > 0]\n" |
891 | . "cfplus support $yesno[$self->{cfplus_ext} > 0]" |
887 | . "cfplus support $yesno[$self->{cfplus_ext} > 0]" |
892 | . ($self->{cfplus_ext} > 0 ? ", version $self->{cfplus_ext}" : "") ."\n" |
888 | . ($self->{cfplus_ext} > 0 ? ", version $self->{cfplus_ext}" : "") ."\n" |
893 | . "map size $self->{mapw}×$self->{maph}\n" |
889 | . "map size $self->{mapw}×$self->{maph}\n" |
894 | ); |
890 | ); |
… | |
… | |
901 | $self->{cfplus_ext} = $_[0]{version}; |
897 | $self->{cfplus_ext} = $_[0]{version}; |
902 | $self->update_server_info; |
898 | $self->update_server_info; |
903 | |
899 | |
904 | if ($self->{cfplus_ext} >= 2) { |
900 | if ($self->{cfplus_ext} >= 2) { |
905 | $self->send_ext_req ("editor_support", sub { |
901 | $self->send_ext_req ("editor_support", sub { |
906 | $self->{cvs_root} = $_[0]{cvs_root}; |
902 | $self->{editor_support} = $_[0]; |
907 | $self->{upload} = $_[0]{upload}; |
|
|
908 | $self->{test_server} = $_[0]{server}; |
|
|
909 | $self->update_server_info; |
903 | $self->update_server_info; |
910 | |
904 | |
911 | 0 |
905 | 0 |
912 | }); |
906 | }); |
913 | } |
907 | } |