From 8434124f76d789f87860ead8c027a6f6c04a7a98 Mon Sep 17 00:00:00 2001 From: etienne Date: Fri, 18 Aug 2006 08:10:30 +0000 Subject: compatible with ivy 1.40 --- src/ivymon | 34 ++++++++++++++++++++++------------ 1 file changed, 22 insertions(+), 12 deletions(-) (limited to 'src') diff --git a/src/ivymon b/src/ivymon index a419f60..45d4fc2 100755 --- a/src/ivymon +++ b/src/ivymon @@ -92,7 +92,7 @@ use vars qw/$VERSION $opt_help $opt_b $opt_bus $opt_history @opt_bind @opt_send $opt_undersize $opt_out $opt_loadingmode $opt_replayrepeat $opt_replaystartregexp $opt_replaystopregexp $opt_replaytimegranularity/; # **** VERSION *** -$VERSION = '1.14'; +$VERSION = '1.15'; # options initialisation $opt_loadingmode = 'replay-pause'; @@ -256,10 +256,12 @@ if ($opt_bus) { } $history = $opt_history if $opt_history; my $title; +my $ivy_version = $Ivy::VERSION; +$ivy_version =~ s/Revision: //; if ($ivy_port) { - $title = "Ivymon v$VERSION ($ivy_port)"; + $title = "Ivymon v$VERSION ($ivy_port) - Ivy v$ivy_version"; } else { - $title = "Ivymon v$VERSION (default port)"; + $title = "Ivymon v$VERSION (default port) - Ivy v$ivy_version"; } $replay_time_granularity = $opt_replaytimegranularity if $opt_replaytimegranularity > 0; if ($replay_time_granularity >= 1) { @@ -506,7 +508,6 @@ my $messagesMaxLabel = $top2_fm->Label(-text => "Recordable : $history", -width => 25)->pack(-side => 'right'); - my $messagesText = $top_fm->Scrolled('Text', -scrollbars => 'e', @@ -516,8 +517,9 @@ my $messagesText = -spacing3 => 2, -state => 'disabled', )->pack(-fill => 'both', - -expand => 1, - -side => 'bottom'); + -expand => 1, + -side => 'bottom'); + $focusedtext = $messagesText; &wheelmousebindings($messagesText); $messagesText->bind('<1>', sub {$messagesText->focus;}); @@ -1087,17 +1089,25 @@ sub removeIvyBinding { sub checkClientsStatus { my $appname = $_[3]; my $status = $_[4]; - my $host_or_regexp = $_[5]; + my $host; + my $regexp; + if ($ivy_version ge 1.40) { + $host = $_[5]; + $regexp = $_[6]; + } else { + $host = $_[5]; + $regexp = $host; + } $appname =~ s/ /_/g; if ($status eq 'died') { - &removeClient($appname, $host_or_regexp); + &removeClient($appname, $host); } elsif ($status eq 'new') { - &addClient($appname, $host_or_regexp); + &addClient($appname, $host); } elsif ($status eq 'subscribing') { - $clientsBindings{$appname}->{$host_or_regexp}++; - &newBinding($host_or_regexp); + $clientsBindings{$appname}->{$host}++; + &newBinding($regexp); } elsif ($status eq 'unsubscribing') { - $clientsBindings{$appname}->{$host_or_regexp}--; + $clientsBindings{$appname}->{$host}--; } else { carp "In Ivymon, checkClientsStatus function, unknown status <$status>\n"; } -- cgit v1.1