ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/Deliantra-Client/DC/UI/ChatView.pm
(Generate patch)

Comparing deliantra/Deliantra-Client/DC/UI/ChatView.pm (file contents):
Revision 1.21 by root, Mon Sep 8 19:53:23 2008 UTC vs.
Revision 1.22 by root, Tue Sep 9 10:27:26 2008 UTC

156 } else { 156 } else {
157 $self->set_inactive_fg ([0.6, 0.6, 1]); 157 $self->set_inactive_fg ([0.6, 0.6, 1]);
158 } 158 }
159 } 159 }
160 160
161 if ($para->{color_flags} & NDI_REPLY) { 161 $self->select_my_tab if $para->{color_flags} & NDI_REPLY;
162 $self->select_my_tab; 162 $self->clear_log if $para->{color_flags} & NDI_CLEAR;
163 }
164
165 if ($para->{color_flags} & NDI_CLEAR) {
166 $self->clear_log;
167 }
168 163
169 my $time = sprintf "%02d:%02d:%02d", (localtime time)[2,1,0]; 164 my $time = sprintf "%02d:%02d:%02d", (localtime time)[2,1,0];
170 165
171 $para->{markup} = "<span foreground='#ffffff'><tt>$time </tt></span>$para->{markup}"; 166 $para->{markup} = "<span foreground='#ffffff'><tt>$time </tt></span>$para->{markup}";
167
168 # boy this is ugly
169 $para->{markup} =~ s%\n%\n<tt> </tt>%g;
172 170
173 my $txt = $self->{txt}; 171 my $txt = $self->{txt};
174 $txt->add_paragraph ($para); 172 $txt->add_paragraph ($para);
175 $txt->scroll_to_bottom; 173
174 $txt->scroll_to_bottom unless $para->{color_flags} & NDI_CLEAR;
176} 175}
177 176
178# This method is called when 177# This method is called when
179sub activate { 178sub activate {
180 my ($self, $preset) = @_; 179 my ($self, $preset) = @_;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines