diff options
author | etienne | 2004-09-06 08:35:49 +0000 |
---|---|---|
committer | etienne | 2004-09-06 08:35:49 +0000 |
commit | da1bedc4255d499412d9c5f8b38a11a3fca07e1b (patch) | |
tree | 2b7761298cce5ad9a306ec449aa2aa45b713eb5b /src | |
parent | 7cfdb25a10dc9a21ad727f45a11e0502ffe0261c (diff) | |
download | ivymon-da1bedc4255d499412d9c5f8b38a11a3fca07e1b.zip ivymon-da1bedc4255d499412d9c5f8b38a11a3fca07e1b.tar.gz ivymon-da1bedc4255d499412d9c5f8b38a11a3fca07e1b.tar.bz2 ivymon-da1bedc4255d499412d9c5f8b38a11a3fca07e1b.tar.xz |
*** empty log message ***
Diffstat (limited to 'src')
-rwxr-xr-x | src/ivymon | 25 |
1 files changed, 14 insertions, 11 deletions
@@ -601,7 +601,7 @@ $searchEntry->eventAdd('<<SearchNextExpr>>', '<Down>', '<Control-n>'); $searchEntry->eventAdd('<<SearchPrevExpr>>', '<Up>', '<Control-p>'); $searchEntry->bind('<<SearchNext>>' => [\&searchNext, 1]); -$searchEntry->bind('<<SearchPrev>' => [\&searchPrev, 1]); +$searchEntry->bind('<<SearchPrev>>' => [\&searchPrev, 1]); $searchEntry->bind('<<SearchNextExpr>>' => [\&searchNextExpression]); $searchEntry->bind('<<SearchPrevExpr>>' => [\&searchPrevExpression]); $searchEntry->bind('<Key>' => [\&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"); |