summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoretienne2004-09-06 08:35:49 +0000
committeretienne2004-09-06 08:35:49 +0000
commitda1bedc4255d499412d9c5f8b38a11a3fca07e1b (patch)
tree2b7761298cce5ad9a306ec449aa2aa45b713eb5b
parent7cfdb25a10dc9a21ad727f45a11e0502ffe0261c (diff)
downloadivymon-da1bedc4255d499412d9c5f8b38a11a3fca07e1b.zip
ivymon-da1bedc4255d499412d9c5f8b38a11a3fca07e1b.tar.gz
ivymon-da1bedc4255d499412d9c5f8b38a11a3fca07e1b.tar.bz2
ivymon-da1bedc4255d499412d9c5f8b38a11a3fca07e1b.tar.xz
*** empty log message ***
-rwxr-xr-xsrc/ivymon25
1 files 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('<<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");