… | |
… | |
12 | $self->{log} = DC::UI::ChatView->new ( |
12 | $self->{log} = DC::UI::ChatView->new ( |
13 | expand => 1, |
13 | expand => 1, |
14 | can_close => 0, |
14 | can_close => 0, |
15 | can_undock => 0, |
15 | can_undock => 0, |
16 | info => { |
16 | info => { |
|
|
17 | id => "", |
17 | title => "Log", |
18 | title => "Log", |
18 | tooltip => |
|
|
19 | "<b>Server Log</b>. This text viewer contains all recent message sent by the server.", |
19 | tooltip => "<b>Server Log</b>. This text viewer contains all recent message sent by the server.", |
20 | entry_tooltip => |
|
|
21 | "<b>Command Entry</b>. If you enter something and press return/enter here, " |
20 | entry_tooltip => "<b>Command Entry</b>. If you enter something and press return/enter here, " |
22 | ."the line you entered will be sent to the server as a command.", |
21 | . "the line you entered will be sent to the server as a command.", |
23 | reply => '' |
22 | reply => '' |
24 | } |
23 | } |
25 | ) |
24 | ) |
26 | ); |
25 | ); |
27 | |
26 | |
28 | return $self |
27 | return $self |
29 | } |
28 | } |
30 | |
29 | |
31 | # called by MAPWIDGET activate console event |
30 | # called by MAPWIDGET activate console event |
32 | sub activate_console { |
31 | sub activate_console { |
|
|
32 | # nop |
33 | } |
33 | } |
34 | |
34 | |
35 | # adding channel |
35 | # adding channel |
36 | sub add_channel { |
36 | sub add_channel { |
37 | my ($self, $chaninfo) = @_; |
37 | my ($self, $chaninfo) = @_; |
… | |
… | |
39 | $self->{info}->{$chaninfo->{id}} = $chaninfo; |
39 | $self->{info}->{$chaninfo->{id}} = $chaninfo; |
40 | $self->touch_channel ($chaninfo->{id}); |
40 | $self->touch_channel ($chaninfo->{id}); |
41 | } |
41 | } |
42 | |
42 | |
43 | # set max paragraphs |
43 | # set max paragraphs |
44 | sub set_max_para { |
44 | sub set_max_par { |
|
|
45 | my ($self, $par) = @_; |
|
|
46 | for ($self->{log}, values %{$self->{chatview}}) { |
|
|
47 | $_->set_max_par ($par); |
|
|
48 | } |
45 | } |
49 | } |
46 | |
50 | |
47 | # set fontsize for all chatviews |
51 | # set fontsize for all chatviews |
48 | sub set_fontsize { |
52 | sub set_fontsize { |
49 | my ($self, $s) = @_; |
53 | my ($self, $s) = @_; |