From da1bedc4255d499412d9c5f8b38a11a3fca07e1b Mon Sep 17 00:00:00 2001 From: etienne Date: Mon, 6 Sep 2004 08:35:49 +0000 Subject: *** empty log message *** --- src/ivymon | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/src/ivymon b/src/ivymon index 76132bb..7580ffb 100755 --- a/src/ivymon +++ b/src/ivymon @@ -601,7 +601,7 @@ $searchEntry->eventAdd('<>', '', ''); $searchEntry->eventAdd('<>', '', ''); $searchEntry->bind('<>' => [\&searchNext, 1]); -$searchEntry->bind('<' => [\&searchPrev, 1]); +$searchEntry->bind('<>' => [\&searchPrev, 1]); $searchEntry->bind('<>' => [\&searchNextExpression]); $searchEntry->bind('<>' => [\&searchPrevExpression]); $searchEntry->bind('' => [\&searchOnTheFly]); @@ -1086,15 +1086,21 @@ sub filterClient { )->pack(-side => 'top', -fill => 'both', -expand => 1); - $clientsMessagesTpl{$client}->bind('<1>', - sub {$clientsMessagesTpl{$client}->focus;}); + $clientsMessagesTpl{$client}->bind('<1>', sub { + $clientsMessagesTpl{$client}->Subwidget('scrolled')->focus;}); &wheelmousebindings($clientsMessagesTpl{$client}); $tpl->Button(-text => 'Close', - -command => [sub { $clientsMessagesTpl{$client} = undef; - $tpl->destroy; - }], + -command => [sub { + my $text = $clientsMessagesTpl{$client}->Subwidget('scrolled'); + if ($focusedtext eq $text) { + $focusedtext = $messagesText; + $messagesText->focus; + } + $clientsMessagesTpl{$client} = undef; + $tpl->destroy; + }], )->pack(-side => 'top', -padx => 10, -pady => 10); @@ -1301,8 +1307,6 @@ sub afterUpdatingMessages { sub highlightString { my ($i1, $i2) = @_; - # hidden data - print "focusedtext=$focusedtext\n"; $focusedtext->tagConfigure('found', -background => 'sienna', -foreground => 'ivory'); @@ -1705,8 +1709,7 @@ sub searchPrevExpression { sub clearSearch { - # on vide la le champ de saisie - $searchEntry->delete(0, 'end'); + #$searchEntry->delete(0, 'end'); &highlightStringOff; $searchIndex = undef; $searchString = undef; @@ -1742,7 +1745,7 @@ sub searchOnTheFly { push(@searchopts, -nocase) unless ($casesensitiveflag); push(@searchopts, -regexp) if ($regexpflag); my $index = $focusedtext->search(@searchopts, $string, $index0); - print "index=$index strlen=$strlen\n"; + #print "index=$index strlen=$strlen\n"; if ($index) { &highlightStringOff if $searchString and $string eq $searchString; $searchString = $focusedtext->get($index, "$index + $strlen chars"); -- cgit v1.1