Prechádzať zdrojové kódy

Make it a bit clearer where to look for the VSCode editor keys option.

Martijn Laan 9 mesiacov pred
rodič
commit
e8d5e01f14

+ 4 - 3
Projects/Src/IDE.MainForm.pas

@@ -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>.',
         '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%
         $ABE3AB); //MGreen with HSL lightness changed from 40% to 78%
       CheckUpdatePanelMessage(Ini, 'VSCodeMemoKeyMap', 0, 1,
       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%
         $FFD399); //MBlue with HSL lightness changed from 42% to 80%
       UpdateUpdatePanel;
       UpdateUpdatePanel;
 
 
@@ -7768,9 +7768,10 @@ begin
   var Handled := True;
   var Handled := True;
   if (LinkType = sltID) and (Link = 'hwhatsnew') then
   if (LinkType = sltID) and (Link = 'hwhatsnew') then
     HWhatsNew.Click
     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
     TOptions.Click
-  else
+  end else
     Handled := False;
     Handled := False;
   if Handled then
   if Handled then
     UpdatePanelClosePaintBoxClick(Sender);
     UpdatePanelClosePaintBoxClick(Sender);

+ 1 - 0
Projects/Src/IDE.OptionsForm.dfm

@@ -15,6 +15,7 @@ object OptionsForm: TOptionsForm
   OldCreateOrder = True
   OldCreateOrder = True
   Position = poScreenCenter
   Position = poScreenCenter
   OnCreate = FormCreate
   OnCreate = FormCreate
+  OnShow = FormShow
   DesignSize = (
   DesignSize = (
     589
     589
     424)
     424)

+ 15 - 2
Projects/Src/IDE.OptionsForm.pas

@@ -62,10 +62,14 @@ type
     procedure ChangeFontButtonClick(Sender: TObject);
     procedure ChangeFontButtonClick(Sender: TObject);
     procedure FormCreate(Sender: TObject);
     procedure FormCreate(Sender: TObject);
     procedure TabWidthEditChange(Sender: TObject);
     procedure TabWidthEditChange(Sender: TObject);
+    procedure FormShow(Sender: TObject);
   private
   private
-    { Private declarations }
+    class var
+      FDropDownMemoKeyMappingComboBoxOnNextShow: Boolean;
+    var
+      {}
   public
   public
-    { Public declarations }
+    class property DropDownMemoKeyMappingComboBoxOnNextShow: Boolean write FDropDownMemoKeyMappingComboBoxOnNextShow;
   end;
   end;
 
 
 implementation
 implementation
@@ -93,6 +97,15 @@ begin
   ThemeComboBox.Items.Add('Classic');
   ThemeComboBox.Items.Add('Classic');
 end;
 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);
 procedure TOptionsForm.AssocButtonClick(Sender: TObject);
 const
 const
   UserStrings: array [Boolean] of String = ('the current user', 'all users');
   UserStrings: array [Boolean] of String = ('the current user', 'all users');