X-Git-Url: http://gb7djk.dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;ds=inline;f=gtkconsole%2Fgtkconsole;fp=gtkconsole%2Fgtkconsole;h=e545824407873ad2515aead2654d7412697d894d;hb=4c1a13aa8b495c7c2ec8d29d1ca48508f5f9a8ad;hp=6b3a7798a5c8973029816cc64d80cd7af021f373;hpb=2592f24e43c0417d0d314671c1986f7bdb9ee056;p=spider.git diff --git a/gtkconsole/gtkconsole b/gtkconsole/gtkconsole index 6b3a7798..e5458244 100755 --- a/gtkconsole/gtkconsole +++ b/gtkconsole/gtkconsole @@ -20,16 +20,18 @@ BEGIN { use strict; -use vars qw(@modules); +use Gtk qw(-init); + +use vars qw(@modules $font); @modules = (); # is the list of modules that need init calling # on them. It is set up by each 'use'ed module # that has Gtk stuff in it +$font = Gtk::Gdk::Font->load("-misc-fixed-medium-r-normal-*-*-130-*-*-c-*-koi8-r"); use DXVars; use DXUtil; use IO::Socket::INET; -use Gtk qw(-init); use Text; use DebugHandler; @@ -92,24 +94,27 @@ $menu->show; my $top = new Text(1); my $toplist = $top->text; $toplist->set_editable(0); +$toplist->sensitive(0); # add the handler for incoming messages from the node my $tophandler = Gtk::Gdk->input_add($sock->fileno, ['read'], \&tophandler, $sock); my $rbuf = ""; # used in handler -$toplist->{signalid} = $toplist->signal_connect(insert_text => \&doinsert, $toplist); +#$toplist->{signalid} = $toplist->signal_connect(insert_text => \&doinsert, $toplist); #$bot->{signalid} = $bot->signal_connect(insert_text => \&botinsert, $bot); $vbox->pack_start($top, 1, 1, 0); $vbox->show; # the bottom handler my $bot = new Gtk::Entry; +my $style = $toplist->style; +$style->font($main::font); +$bot->set_style($style); $bot->set_editable(1); $bot->signal_connect('activate', \&bothandler); -$bot->can_focus(1); $bot->can_default(1); -$bot->grab_focus; $bot->grab_default; +$bot->grab_focus; $bot->show; # a horizontal box @@ -163,15 +168,6 @@ sub doinsert { 1; } -sub botinsert -{ - my ($self, $text) = @_; - - printf "%s\n", $text; - - 1; -} - sub bothandler { my ($self, $data) = @_;