diff options
Diffstat (limited to 'src/Agent.pm')
-rw-r--r-- | src/Agent.pm | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/Agent.pm b/src/Agent.pm index d1a6fc1..9e2e6c8 100644 --- a/src/Agent.pm +++ b/src/Agent.pm @@ -6,7 +6,6 @@ use FugueConfig; use strict; - #---------------------------------------------------------------------- # # class variables and methods @@ -24,6 +23,7 @@ sub configure { ($mw, $bg, $fg, $selcolor, $pbcolor, $hlbg, $darkbg, $fontspec, $x0, $y0, $wmax, $dy, $cmin, $rmax, $bus, $coef, $pingThreshold) = @_; @fontspec = @$fontspec if $fontspec; + $off_img = $mw->Bitmap('off', -file => Tk::findINC('led.bmp'), -foreground => $bg); $pb_img = $mw->Bitmap('pb', -file => Tk::findINC('led.bmp'), @@ -242,12 +242,12 @@ sub setposition { if ($self->{command}) { $self->{led}->configure(-highlightthickness => 6*$coef); - $self->{led}->place(-x => $x+3*$coef, -y => $y+3*$coef); + $self->{led}->place(-x => $x+3*$coef, '-y' => $y+3*$coef); } else { $self->{led}->configure(-highlightthickness => 2*$coef); - $self->{led}->place(-x => $x+6*$coef, -y => $y+6*$coef); + $self->{led}->place(-x => $x+6*$coef, '-y' => $y+6*$coef); } - $self->{label}->place(-x => $x + 38, -y => $y2); + $self->{label}->place(-x => $x + 38, '-y' => $y2); } # end setposition @@ -257,8 +257,8 @@ sub createlabel { my ($self) = @_; $self->{led} = $mw->Label(-image => $off_img, - -highlightbackground => $hlbg, - -borderwidth => 0, + -highlightbackground => $hlbg, + -borderwidth => 0, ); $self->{label} = $mw->Label(-text => $self->formatlabel, @@ -370,8 +370,9 @@ sub _cbOnPress { my $host = &_hostsmenu($x, $y, $self->{host}); $self->{label}->configure(-foreground => $fg); return unless $host; - FugueConfig::launchAgent($self->{appname}, $host, - $self->{command}, $self->{params}, $bus); + FugueConfig::execAgentBackground($self->{appname}, $host, + $self->{command}, $self->{params}, + $bus); print "$self->{appname} launched\n"; } else { $mw->bell; |