mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-22 06:00:26 +02:00
Merge branch 'IDE/Help/HelpButton' into 'main'
IDE/Help: Mention in the help button hint that it will open in the browser See merge request freepascal.org/lazarus/lazarus!537
This commit is contained in:
commit
bd768042b8
@ -5013,6 +5013,7 @@ resourcestring
|
||||
lisHOFPCDocHTMLPath = 'FPC Doc HTML Path';
|
||||
lisHlpOptsProperties = 'Properties:';
|
||||
lisHlpOptsDatabases = 'Databases';
|
||||
lisOpenContextHelpInBrowser = 'Open context help in the browser';
|
||||
|
||||
// enclose selection dialog
|
||||
lisChooseStructureToEncloseSelection = 'Choose structure to enclose selection';
|
||||
|
@ -12581,11 +12581,14 @@ begin
|
||||
lHelpButton.OnClick:=@LazarusHelp.HelpButtonClick;
|
||||
// set shortcut hint
|
||||
if lHelpButton.Hint='' then begin
|
||||
// explain the button action
|
||||
lHelpButton.ShowHint:=true;
|
||||
lHelpButton.Hint:=lisOpenContextHelpInBrowser;
|
||||
// maybe add shortcut
|
||||
lContextHelpCommand:=IDECommandList.FindIDECommand(ecContextHelp);
|
||||
if Assigned(lContextHelpCommand) then begin
|
||||
with lContextHelpCommand do
|
||||
lHelpButton.Hint:=KeyValuesToCaptionStr(ShortcutA,ShortcutB);
|
||||
lHelpButton.ShowHint:=true;
|
||||
lHelpButton.Hint:=lHelpButton.Hint+' '+KeyValuesToCaptionStr(ShortcutA,ShortcutB);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user