Skip to content

Commit

Permalink
Make it a bit clearer where to look for the VSCode editor keys option.
Browse files Browse the repository at this point in the history
  • Loading branch information
martijnlaan committed Nov 20, 2024
1 parent 6c19d08 commit e8d5e01
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 5 deletions.
7 changes: 4 additions & 3 deletions Projects/Src/IDE.MainForm.pas
Original file line number Diff line number Diff line change
Expand Up @@ -882,7 +882,7 @@ constructor TMainForm.Create(AOwner: TComponent);
'Your version of Inno Setup has been updated! <a id="hwhatsnew">See what''s new</a>.',
$ABE3AB); //MGreen with HSL lightness changed from 40% to 78%
CheckUpdatePanelMessage(Ini, 'VSCodeMemoKeyMap', 0, 1,
'Support for Visual Studio Code-style editor shortcuts has been added! Use the Options dialog and <a id="toptions">change the Editor Keys option</a>.',
'Support for Visual Studio Code-style editor shortcuts has been added! Use the Options dialog and <a id="toptions-vscode">change the Editor Keys option</a>.',
$FFD399); //MBlue with HSL lightness changed from 42% to 80%
UpdateUpdatePanel;

Expand Down Expand Up @@ -7768,9 +7768,10 @@ procedure TMainForm.UpdateLinkLabelLinkClick(Sender: TObject;
var Handled := True;
if (LinkType = sltID) and (Link = 'hwhatsnew') then
HWhatsNew.Click
else if (LinkType = sltID) and (Link = 'toptions') then
else if (LinkType = sltID) and (Link = 'toptions-vscode') then begin
TOptionsForm.DropDownMemoKeyMappingComboBoxOnNextShow := True;
TOptions.Click
else
end else
Handled := False;
if Handled then
UpdatePanelClosePaintBoxClick(Sender);
Expand Down
1 change: 1 addition & 0 deletions Projects/Src/IDE.OptionsForm.dfm
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ object OptionsForm: TOptionsForm
OldCreateOrder = True
Position = poScreenCenter
OnCreate = FormCreate
OnShow = FormShow
DesignSize = (
589
424)
Expand Down
17 changes: 15 additions & 2 deletions Projects/Src/IDE.OptionsForm.pas
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,14 @@ TOptionsForm = class(TUIStateForm)
procedure ChangeFontButtonClick(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure TabWidthEditChange(Sender: TObject);
procedure FormShow(Sender: TObject);
private
{ Private declarations }
class var
FDropDownMemoKeyMappingComboBoxOnNextShow: Boolean;
var
{}
public
{ Public declarations }
class property DropDownMemoKeyMappingComboBoxOnNextShow: Boolean write FDropDownMemoKeyMappingComboBoxOnNextShow;
end;

implementation
Expand Down Expand Up @@ -93,6 +97,15 @@ procedure TOptionsForm.FormCreate(Sender: TObject);
ThemeComboBox.Items.Add('Classic');
end;

procedure TOptionsForm.FormShow(Sender: TObject);
begin
if FDropDownMemoKeyMappingComboBoxOnNextShow then begin
ActiveControl := MemoKeyMappingComboBox;
MemoKeyMappingComboBox.DroppedDown := True;
FDropDownMemoKeyMappingComboBoxOnNextShow := False;
end;
end;

procedure TOptionsForm.AssocButtonClick(Sender: TObject);
const
UserStrings: array [Boolean] of String = ('the current user', 'all users');
Expand Down

0 comments on commit e8d5e01

Please sign in to comment.