--- deliantra/Deliantra-Client/DC/UI/MessageWindow.pm 2007/07/21 21:01:40 1.1 +++ deliantra/Deliantra-Client/DC/UI/MessageWindow.pm 2007/07/23 15:30:46 1.2 @@ -7,6 +7,7 @@ sub new { my $class = shift; + my $self = $class->SUPER::new ( name => "message_window", title => "Messages", @@ -18,6 +19,7 @@ child => (my $vbox = new CFPlus::UI::VBox), has_close_button => 1 ); + my $nb = $self->{nb} = CFPlus::UI::Notebook->new (expand => 1); my $txt = $self->{log} = new CFPlus::UI::TextScroller expand => 1, @@ -29,9 +31,10 @@ max_par => $::CFG->{logview_max_par}, tooltip => "Server Log. This text viewer contains all recent messages sent by the server.", ; + my $vb2 = CFPlus::UI::VBox->new; $vb2->add ($txt); - $nb->add ("Log", $vb2, "This is the main log of the server."); + $nb->add_tab (Log => $vb2, "This is the main log of the server."); $vbox->add ($nb); $vbox->add ($self->{input} = CFPlus::UI::Entry->new ( @@ -92,8 +95,10 @@ sub activate_console { my ($self, $preset) = @_; + $self->{input}->{auto_activated} = 1; $self->{input}->grab_focus; + if ($preset && $self->{input}->get_text eq '') { $self->{input}->set_text ($preset); } @@ -106,5 +111,8 @@ sub set_max_para { my ($self, $max_par) = @_; - $self->{log}->{max_par} = $max_par; + $self->{log}{max_par} = $max_par; } + +1; +