fixed the talk problem
[spider.git] / gtkconsole / gtkconsole
index e545824407873ad2515aead2654d7412697d894d..3b65d0e6ec76672edb26d9bb1bf01727d701a8e3 100755 (executable)
@@ -114,7 +114,6 @@ $bot->set_editable(1);
 $bot->signal_connect('activate', \&bothandler);
 $bot->can_default(1);
 $bot->grab_default;
-$bot->grab_focus;
 $bot->show;
 
 # a horizontal box
@@ -142,6 +141,7 @@ $vbox->pack_start($bot, 0, 1, 0);
 
 # the main loop
 $main->show_all;
+$bot->grab_focus;
 Gtk->main;
 
 #
@@ -174,6 +174,7 @@ sub bothandler
        my $msg = $self->get_text;
        $msg =~ s/\r?\n$//;
        $self->set_text('');
+       $self->grab_focus;
        senddata($msg);
 }
 
@@ -212,9 +213,11 @@ sub handlemsg
        my $msg = shift;
        my ($sort, $call, $line) = $msg =~ /^(\w)([^\|]+)\|(.*)$/;
        if ($sort eq 'D') {
-               $toplist->insert($toplist->{font}, undef, undef, "$line\n");
+               $toplist->insert($toplist->{font}, undef, undef, "$line\n");    
        } elsif ($sort eq 'X') {
                $toplist->insert($toplist->{font}, undef, undef, "$line\n");
+       } elsif ($sort eq 'T') {
+               $toplist->insert($toplist->{font}, undef, undef, "$line\n");
        } elsif ($sort eq 'Y') {
                $toplist->insert($toplist->{font}, undef, undef, "$line\n");
        } elsif ($sort eq 'V') {