From 4c1a13aa8b495c7c2ec8d29d1ca48508f5f9a8ad Mon Sep 17 00:00:00 2001 From: minima Date: Tue, 24 Jul 2001 15:59:35 +0000 Subject: [PATCH] starting to crack this... --- gtkconsole/Text.pm | 3 +++ gtkconsole/gtkconsole | 24 ++++++++++-------------- 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/gtkconsole/Text.pm b/gtkconsole/Text.pm index f3b7debc..8957da25 100644 --- a/gtkconsole/Text.pm +++ b/gtkconsole/Text.pm @@ -21,6 +21,9 @@ sub new my $font = Gtk::Gdk::Font->load("-misc-fixed-medium-r-normal-*-*-130-*-*-c-*-koi8-r"); my $text = new Gtk::Text(undef,undef); + my $style = $text->style; + $style->font($font); + $text->set_style($style); $text->show; my $vscroll = new Gtk::VScrollbar($text->vadj); $vscroll->show; 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) = @_; -- 2.43.0