diff options
author | Manuel Pégourié-Gonnard <mpg@elzevir.fr> | 2010-04-05 08:08:58 +0000 |
---|---|---|
committer | Manuel Pégourié-Gonnard <mpg@elzevir.fr> | 2010-04-05 08:08:58 +0000 |
commit | 1fadc23a29aee57d1a40525fa274f7cef482b49e (patch) | |
tree | abd6cd5db29c277e8037357a70ce6d73ce9cf0b1 | |
parent | 4476c7d9b82f603eb7a092f822ff200012c64dd1 (diff) |
Search buttons now set srchtype correctly.
git-svn-id: svn://tug.org/texlive/trunk@17699 c570f23f-e606-0410-a88d-b1316a301751
-rwxr-xr-x | Master/texmf/scripts/tetex/texdoctk.pl | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/Master/texmf/scripts/tetex/texdoctk.pl b/Master/texmf/scripts/tetex/texdoctk.pl index 234303297d7..39fdece9805 100755 --- a/Master/texmf/scripts/tetex/texdoctk.pl +++ b/Master/texmf/scripts/tetex/texdoctk.pl @@ -30,6 +30,7 @@ my @tdcolors; my %butcol; my $srchentry; my $srchflag=0; +my $srchtype; # 0 = database, 1 = texdoc my $tmpfno; # system variables my ($texmfmain,$texmfdist,$texmfdoc,$texmflocal,$texmfhome, @@ -194,12 +195,12 @@ $Qbut->configure(-font=>$deffont); $tlwins{'mainwindow'}{'buttons'}[1]=$cmdframe->Button( -text=>'Database search', -font=>$deffont,%butcol, - -command=>\&mksrch + -command=>[\&mksrch, 0] )->pack(-side=>'left'); $tlwins{'mainwindow'}{'buttons'}[2]=$cmdframe->Button( -text=>'File search', -font=>$deffont,%butcol, - -command=>\&mksrch + -command=>[\&mksrch, 1] )->pack(-side=>'left'); $tlwins{'mainwindow'}{'buttons'}[3]=$cmdframe->Button(-text=>'Help/About', -font=>$deffont,%butcol, @@ -760,9 +761,14 @@ sub showpath { # make or destroy search entry widget sub mksrch { + my ($type) = @_; if ($srchflag == 1) { - destroy $srchentry; - $srchflag=0; + if ($type == $srchtype) { + destroy $srchentry; + $srchflag=0; + } else { + $srchtype = $type; + } } else { # get the search string $srchentry=$cmdframe->Entry(-cursor=>'xterm', |