starting to crack this...
authorminima <minima>
Tue, 24 Jul 2001 15:59:35 +0000 (15:59 +0000)
committerminima <minima>
Tue, 24 Jul 2001 15:59:35 +0000 (15:59 +0000)
gtkconsole/Text.pm
gtkconsole/gtkconsole

index f3b7debc53446551c8ee24f0ea49d9489ee8658e..8957da25b23aa983027788fb3f3f69c43a4e8cf6 100644 (file)
@@ -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;
index 6b3a7798a5c8973029816cc64d80cd7af021f373..e545824407873ad2515aead2654d7412697d894d 100755 (executable)
@@ -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) = @_;