Ignore:
Timestamp:
Jan 13, 2026, 4:01:26 PM (3 hours ago)
Author:
chronos
Message:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/LocalPlayer/Help.pas

    r715 r725  
    20542054
    20552055procedure THelpDlg.SearchBtnClick(Sender: TObject);
    2056 begin
    2057   InputDlg.Caption := Phrases.Lookup('SEARCH');
    2058   InputDlg.EditInput.Text := SearchContent;
    2059   InputDlg.CenterToRect(BoundsRect);
    2060   InputDlg.ShowModal;
    2061   if (InputDlg.ModalResult = mrOK) and (Length(InputDlg.EditInput.Text) >= 2) then
    2062   begin
    2063     Search(InputDlg.EditInput.Text);
    2064     case SearchResult.Count of
    2065       0: begin
    2066         Gtk2Fix;
    2067         SimpleMessage(Format(HelpText.Lookup('NOMATCHES'),
    2068           [InputDlg.EditInput.Text]));
    2069       end;
    2070       1:
    2071         with THelpLineInfo(SearchResult.Objects[0]) do
    2072           ShowNewContent(FWindowMode, Category, Index);
    2073       else begin
    2074         NewSearchContent := InputDlg.EditInput.Text;
    2075         ShowNewContent(FWindowMode, hkMisc, Integer(miscSearchResult));
     2056var
     2057  InputDlg: TInputDlg;
     2058begin
     2059  InputDlg := TInputDlg.Create(nil);
     2060  try
     2061    InputDlg.Caption := Phrases.Lookup('SEARCH');
     2062    InputDlg.EditInput.Text := SearchContent;
     2063    InputDlg.CenterToRect(BoundsRect);
     2064    InputDlg.ShowModal;
     2065    if (InputDlg.ModalResult = mrOK) and (Length(InputDlg.EditInput.Text) >= 2) then
     2066    begin
     2067      Search(InputDlg.EditInput.Text);
     2068      case SearchResult.Count of
     2069        0: begin
     2070          Gtk2Fix;
     2071          SimpleMessage(Format(HelpText.Lookup('NOMATCHES'),
     2072            [InputDlg.EditInput.Text]));
     2073        end;
     2074        1:
     2075          with THelpLineInfo(SearchResult.Objects[0]) do
     2076            ShowNewContent(FWindowMode, Category, Index);
     2077        else begin
     2078          NewSearchContent := InputDlg.EditInput.Text;
     2079          ShowNewContent(FWindowMode, hkMisc, Integer(miscSearchResult));
     2080        end;
    20762081      end;
    20772082    end;
     2083  finally
     2084    InputDlg.Free;
    20782085  end;
    20792086end;
Note: See TracChangeset for help on using the changeset viewer.