Changeset 329 for branches


Ignore:
Timestamp:
Aug 17, 2008, 8:23:09 PM (17 years ago)
Author:
RBRi
Message:

incorporate small fixes already done in head

Location:
branches/2.19_branch/NewView
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/2.19_branch/NewView/HelpFile.pas

    r325 r329  
    681681var
    682682  i: longint;
     683  tmpIndex: String;
    683684begin
    684685  result := nil;
     
    686687  for i := 0 to _Index.Count - 1 do
    687688  begin
    688     if StrStartsWithIgnoringCase( SearchText, _Index.ValuePtrs[ i ] ^ ) then
     689    tmpIndex := _Index.ValuePtrs[i]^;
     690    if StrStartsWithIgnoringCase(tmpIndex, SearchText) then
    689691    begin
    690692      // found
     
    730732      if tmpLevel = tmpTopic.ContentsLevel then
    731733      begin
    732         if StrStartsWithIgnoringCase( SearchText, tmpTopic.TitlePtr ^ ) then
     734        if StrStartsWithIgnoringCase(tmpTopic.TitlePtr^, SearchText) then
    733735        begin
    734736          result := tmpTopic;
  • branches/2.19_branch/NewView/MainForm.pas

    r298 r329  
    23812381  Filename := THelpFile( CurrentOpenFiles[ 0 ] ).Filename;
    23822382  NamePart := ExtractFileName( Filename );
    2383   Result := StrStartsWithIgnoringCase('newview', NamePart);
     2383  Result := StrStartsWithIgnoringCase(NamePart, 'newview');
    23842384end;
    23852385
     
    45514551Procedure TMainForm.IndexSearchEditOnChange (Sender: TObject);
    45524552var
    4553   MatchIndex: longint;
    4554   IndexINdex: longint;
    4555   SearchText: string;
     4553  tmpMatchIndex : longint;
     4554  tmpSearchText: string;
     4555  i : longint;
    45564556Begin
    45574557  if InIndexSearch then
    45584558    exit;
    45594559
    4560   MatchIndex:= -1;
    4561   SearchText:= trim( IndexSearchEdit.Text );
    4562   for IndexIndex:= 0 to DisplayedIndex.Count - 1 do
    4563   begin
    4564     if StrStartsWithIgnoringCase( SearchText, DisplayedIndex[ IndexIndex ] ) then //IndexEntry ) then
     4560  tmpMatchIndex := -1;
     4561  tmpSearchText := trim(IndexSearchEdit.Text);
     4562
     4563  for i := 0 to DisplayedIndex.Count - 1 do
     4564  begin
     4565    if StrStartsWithIgnoringCase(DisplayedIndex[i], tmpSearchText) then
    45654566    begin
    4566       MatchIndex:= IndexIndex;
     4567      tmpMatchIndex := i;
    45674568      break;
    45684569    end;
    45694570  end;
    45704571
    4571   if MatchIndex = -1 then
     4572  if tmpMatchIndex = -1 then
    45724573    exit;
    45734574
    45744575  InIndexSearch:= true;
    45754576
    4576   if IndexListBox.ItemIndex <> MatchIndex then
    4577     IndexListBox.ItemIndex:= MatchIndex;
     4577  if IndexListBox.ItemIndex <> tmpMatchIndex then
     4578    IndexListBox.ItemIndex := tmpMatchIndex;
    45784579
    45794580  InIndexSearch:= false;
Note: See TracChangeset for help on using the changeset viewer.