Browse Source

Core changes

master
milkbone57 22 years ago
parent
commit
f920a982ac
  1. 8
      lib/Milkbone/HookEntry.pm
  2. 35
      milkbone
  3. 5
      plugins/Tk-Chat/Milkbone/Chat.pm

8
lib/Milkbone/HookEntry.pm

@ -12,12 +12,6 @@ package Milkbone::HookEntry; @@ -12,12 +12,6 @@ package Milkbone::HookEntry;
use strict;
use warnings;
require Exporter;
our @ISA = qw( Exporter );
our @EXPORT = qw( );
our @EXPORT_OK = qw( );
sub new
{
my $self = {};
@ -41,4 +35,4 @@ sub call @@ -41,4 +35,4 @@ sub call
$self->{callback}->(%args, %{$self->{args}});
}
1;
1;

35
milkbone

@ -1,16 +1,21 @@ @@ -1,16 +1,21 @@
#!/usr/bin/perl
# ----------------------------------------------------------------------
# File: milkbone
# -----------------------------------------------------------------------------
# milkbone
# Desc: This file is the heart of milkbone. It brings up the core and calls
# the appropriate guidance script. There's nothing too complicated happening
# here; most of it ought to be self-explanatory.
# Quote: "A beginning is the time for ensuring that the balances are correct"
# - Princess Irulan, Dune
# ----------------------------------------------------------------------
# Quote: "A beginning is the time for taking the most delicate care
# that the balances are correct."
# - Dune
# -----------------------------------------------------------------------------
use strict;
use warnings;
# Load the core. This prepares @INC for guidance script detection, and
# sets default values (e.g. $Milkbone::FatalLog).
use lib 'lib';
use Milkbone;
# Launch the correct guidance script based on the command-line parameters.
@ -36,14 +41,20 @@ else { @@ -36,14 +41,20 @@ else {
# something must have gone terribly wrong. Note that the guidance script
# doesn't return until the user has closed milkbone.
eval {
require $target;
};
my $script = slurp($target . ".pl", 1);
$script = <<'END' . $script;
use strict;
use warnings;
END
eval $script;
# Really serious exceptions will get logged into the file pointed to by
# $Milkbone::FatalLog.
if($@) {
open(my $file, $Milkbone::FatalLog);
print $file $a;
close($file);
print $@;
open(my $log, ">" . $Milkbone::FatalLog);
print $log "\n" . $@;
close($log);
}

5
plugins/Tk-Chat/Milkbone/Chat.pm

@ -20,6 +20,7 @@ sub ClassInit @@ -20,6 +20,7 @@ sub ClassInit
sub Populate
{
my ($self, $args) = @_;
$self->withdraw;
$self->SUPER::Populate($args);
}
@ -64,11 +65,9 @@ sub init @@ -64,11 +65,9 @@ sub init
$self->{in} = $self->BrowseEdit(-height => 4)->pack(-fill => 'x', -padx => 3, -pady => 5);
$self->update;
$self->geometry("+" . int(($self->screenwidth() / 2) - int($self->width() / 2)) . "+" . int(($self->screenheight() / 2) - int($self->height() / 2)) );
$self->update;
$self->deiconify;
$self->update();
}
1;

Loading…
Cancel
Save