summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoretienne2018-01-31 15:52:42 +0000
committeretienne2018-01-31 15:52:42 +0000
commitc60e1443cfda6a19427d75490de054158a33b328 (patch)
tree2839c157f93dba805e50387c81cd338adc7e7d94 /src
parent21dc7d3790abdc0271bb91007437d32fa2971424 (diff)
downloadivymon-c60e1443cfda6a19427d75490de054158a33b328.zip
ivymon-c60e1443cfda6a19427d75490de054158a33b328.tar.gz
ivymon-c60e1443cfda6a19427d75490de054158a33b328.tar.bz2
ivymon-c60e1443cfda6a19427d75490de054158a33b328.tar.xz
Possibilite' d'elargir la frame Applications. Corrections concernant : . la navigation dans l'historique des saisies (abonnements, recherche, envoi de msg);. la gestion des agents connectes : quand un agent UNTEL se connectait, le premier agent de la liste dont le nom commencait par UNTEL disparaissait.
Diffstat (limited to 'src')
-rwxr-xr-xsrc/ivymon50
1 files changed, 45 insertions, 5 deletions
diff --git a/src/ivymon b/src/ivymon
index debb7dc..8f1e02c 100755
--- a/src/ivymon
+++ b/src/ivymon
@@ -94,7 +94,7 @@ use Tk::CmdLine;
use vars qw/$VERSION $opt_help $opt_b $opt_bus $opt_history @opt_bind $opt_verbose
@opt_send $opt_size $opt_undersize $opt_out $opt_debug $opt_buf/;
# **** VERSION ****
-$VERSION = '1.27'; # TODO a modifier
+$VERSION = '1.29'; # TODO a modifier
# options initialisation
# geometry
@@ -427,13 +427,28 @@ $bindingsEnlargeBtn->configure(-relief => 'flat',
}
});
my $clients_fm =
- $bottom_fm->LabFrame(-label => 'Applications : ',
+ $bottom_fm->eLabFrame(-label => 'Applications : ',
+ -buttonbmp => $enlargebmp,
-labelside => 'acrosstop',
-borderwidth => 3)->pack(-fill => 'both',
-side => 'left',
-expand => 0,
-padx => 5*$coef,
);
+my $clientsEnlargeBtn = $clients_fm->Subwidget('button');
+$clientsEnlargeBtn->{enlarge} = 0;
+$clientsEnlargeBtn->configure(-relief => 'flat',
+ -command => sub {
+ if ($clientsEnlargeBtn->{enlarge}) {
+ &shrink_clientsfm;
+ $clientsEnlargeBtn->{enlarge} = 0;
+ $clientsEnlargeBtn->configure(-image => $enlargebmp);
+ } else {
+ &enlarge_clientsfm;
+ $clientsEnlargeBtn->{enlarge} = 1;
+ $clientsEnlargeBtn->configure(-image => $shrinkbmp);
+ }
+ });
my $send_fm =
$bottom_fm->eLabFrame(-label => ' Messages to send : ',
-buttonbmp => $enlargebmp,
@@ -1287,7 +1302,7 @@ sub removeClient {
$host = $hostname if $host eq 'localhost' or $host =~ /^$hostname\./;
$connectedClients{$client}->{$host}-- if $connectedClients{$client}->{$host} > 0;
- my $num = 0;
+ my $num = 0; # nombre d'agents $client connectes
for my $host ((keys(%{$connectedClients{$client}}))) {
$num += $connectedClients{$client}->{$host};
}
@@ -1303,13 +1318,13 @@ sub manageClient {
my $i = 0;
for ($clientsListbox->get(0, 'end')) {
- if ($_ =~ /^$client/ or $_ =~ /-- $client/) {
+ if ($_ =~ /^$client on/ or $_ =~ /-- $client died/) {
$clientsListbox->delete($i);
last;
}
$i++;
}
- my $num = 0;
+ my $num = 0; # nombre d'agents $client connectes
for (values(%{$connectedClients{$client}})) {
$num += $_;
}
@@ -1942,6 +1957,7 @@ sub bindHistoryGenList {
return if $bindHistory{$string};
$bindHistory{$string} = 1;
push(@bindHistory, $string);
+ $bindHistoryIndex = $#bindHistory;
} # end bindHistoryGenList
@@ -2060,6 +2076,7 @@ sub sendHistoryGenList {
return if $sendHistory{$string};
$sendHistory{$string} = 1;
push(@sendHistory, $string);
+ $sendHistoryIndex = $#sendHistory;
} # end sendHistoryGenList
@@ -2145,6 +2162,7 @@ sub searchHistoryGenList {
return if $searchHistory{$string};
$searchHistory{$string} = 1;
push(@searchHistory, $string);
+ $searchHistoryIndex = $#searchHistory;
} # end searchHistoryGenList
@@ -2882,6 +2900,28 @@ sub shrink_sendfm {
} # end shrink_sendfm
+sub enlarge_clientsfm {
+
+ @packinfo = ();
+ push(@packinfo, [$bindings_fm->packInfo]);
+ push(@packinfo, [$clients_fm->packInfo]);
+ push(@packinfo, [$send_fm->packInfo]);
+ push(@packinfo, [$searchandcontrol_fm->packInfo]);
+ $clients_fm->pack(-expand => 1);
+ $send_fm->packForget;
+
+} # end enlarge_clientsfm
+
+
+sub shrink_clientsfm {
+
+ $clients_fm->packForget;
+ $clients_fm->pack(@{$packinfo[1]});
+ $send_fm->pack(@{$packinfo[2]});
+
+} # end shrink_clientsfm
+
+
sub wheelmousebindings {
my $w = shift;
my $count = shift;