summaryrefslogtreecommitdiff
path: root/src/Agent.pm
diff options
context:
space:
mode:
authoretienne2007-02-01 15:32:18 +0000
committeretienne2007-02-01 15:32:18 +0000
commitaa5d90bd2b50dcd4582bee3895f8b7e187a23df7 (patch)
tree03c66987082ce56f100f946924a8bdb8014f0cf8 /src/Agent.pm
parenta1e0928917d1db6c8b996a8808b1c707db78add2 (diff)
downloadivycontrolpanel-aa5d90bd2b50dcd4582bee3895f8b7e187a23df7.zip
ivycontrolpanel-aa5d90bd2b50dcd4582bee3895f8b7e187a23df7.tar.gz
ivycontrolpanel-aa5d90bd2b50dcd4582bee3895f8b7e187a23df7.tar.bz2
ivycontrolpanel-aa5d90bd2b50dcd4582bee3895f8b7e187a23df7.tar.xz
L'application crashait en debian etch après une séquence d'exécution/arrêt d'un agent ivy
Diffstat (limited to 'src/Agent.pm')
-rw-r--r--src/Agent.pm17
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;