From 3cfa0525f83124432658a175600986c0919fbfcf Mon Sep 17 00:00:00 2001 From: etienne Date: Tue, 6 Feb 2018 11:19:38 +0000 Subject: Correction concernant la navigation dans l'historique des saisies --- debian/changelog | 16 ++++++++++------ src/ivymon | 31 +++++++++++++------------------ 2 files changed, 23 insertions(+), 24 deletions(-) diff --git a/debian/changelog b/debian/changelog index 9ea03c1..89e5a85 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,12 +1,16 @@ +ivymon (1.29) unstable; urgency=low + + * Correction concernant la navigation dans l'historique des saisies + (abonnements, recherche, envoi de msg). + + -- Daniel Etienne Tue, 6 Feb 2018 15:00:00 +0200 + ivymon (1.28) unstable; urgency=low * 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. + * Correction concernant la gestion des agents connectes : quand un + agent UNTEL se connectait, le premier agent de la liste dont le nom + commencait par UNTEL disparaissait. -- Daniel Etienne Thu, 1 Feb 2018 15:00:00 +0200 diff --git a/src/ivymon b/src/ivymon index 78f64cf..92c2892 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.28'; # TODO a modifier +$VERSION = '1.29'; # TODO a modifier # options initialisation # geometry @@ -127,15 +127,12 @@ my $msgToSendFlag = 0; my $searchIndex; my $searchString; -my %searchHistory; my @searchHistory; my $searchHistoryIndex = -1; -my %sendHistory; my @sendHistory; my $sendHistoryIndex = -1; -my %bindHistory; my @bindHistory; my $bindHistoryIndex = -1; @@ -1954,11 +1951,10 @@ sub bindingsGenList { sub bindHistoryGenList { my $string = shift; - return if $bindHistory{$string}; - $bindHistory{$string} = 1; - push(@bindHistory, $string); - $bindHistoryIndex = $#bindHistory; - + unless (scalar(@bindHistory) > 0 and $string eq $bindHistory[-1]) { + push(@bindHistory, $string); + $bindHistoryIndex = $#bindHistory; + } } # end bindHistoryGenList #---------------------------------------------------------------------------------- @@ -2073,10 +2069,10 @@ sub sendGenList { sub sendHistoryGenList { my $string = shift; - return if $sendHistory{$string}; - $sendHistory{$string} = 1; - push(@sendHistory, $string); - $sendHistoryIndex = $#sendHistory; + unless (scalar(@sendHistory) > 0 and $string eq $sendHistory[-1]) { + push(@sendHistory, $string); + $sendHistoryIndex = $#sendHistory; + } } # end sendHistoryGenList @@ -2159,11 +2155,10 @@ sub clearSearch { sub searchHistoryGenList { my $string = shift; - return if $searchHistory{$string}; - $searchHistory{$string} = 1; - push(@searchHistory, $string); - $searchHistoryIndex = $#searchHistory; - + unless (scalar(@searchHistory) > 0 and $string eq $searchHistory[-1]) { + push(@searchHistory, $string); + $searchHistoryIndex = $#searchHistory; + } } # end searchHistoryGenList sub searchOnTheFly { -- cgit v1.1