Jelajahi Sumber

+ UI for selecting edit key set.

git-svn-id: trunk@2430 -
daniel 19 tahun lalu
induk
melakukan
1dc6cdbafb
4 mengubah file dengan 31 tambahan dan 15 penghapusan
  1. 1 1
      ide/fpide.pas
  2. 20 4
      ide/fpmopts.inc
  3. 9 9
      ide/fpstre.inc
  4. 1 1
      ide/fpstrh.inc

+ 1 - 1
ide/fpide.pas

@@ -441,7 +441,7 @@ begin
         NewItem(menu_options_env_codecomplete,'', kbNoKey, cmCodeCompleteOptions, hcCodeCompleteOptions,
         NewItem(menu_options_env_codetemplates,'', kbNoKey, cmCodeTemplateOptions, hcCodeTemplateOptions,
         NewItem(menu_options_env_desktop,'', kbNoKey, cmDesktopOptions, hcDesktopOptions,
-        NewItem(menu_options_env_mouse,'', kbNoKey, cmMouse, hcMouse,
+        NewItem(menu_options_env_keybmouse,'', kbNoKey, cmMouse, hcMouse,
         NewItem(menu_options_env_startup,'', kbNoKey, cmStartup, hcStartup,
         NewItem(menu_options_env_colors,'', kbNoKey, cmColors, hcColors,
 {$ifdef Unix}

+ 20 - 4
ide/fpmopts.inc

@@ -1178,14 +1178,24 @@ var R,R2: TRect;
     D: PCenterDialog;
     SB: PScrollBar;
     CB: PCheckBoxes;
-    RB1,RB2: PRadioButtons;
+    RB1,RB2,RBKB: PRadioButtons;
 begin
-  R.Assign(0,0,62,15);
+  R.Assign(0,0,62,19);
   New(D, Init(R, dialog_mouseoptions));
   with D^ do
   begin
     HelpCtx:=hcMouse;
-    GetExtent(R); R.Grow(-3,-2); R.B.Y:=R.A.Y+3;
+    GetExtent(R); R.Grow(-3,-2); inc(R.A.Y); R.B.Y:=R.A.Y+2;
+    New(RBkb, Init(R,
+      NewSItem('~B~orland convention (Shift+Del,Ctrl+Ins,Shift+Ins)',
+      NewSItem('~M~icrosoft convention (Ctrl+X,Ctrl+C,Ctrl+V)',
+      nil))));
+    RBkb^.Press(integer(EditKeys));
+    Insert(RBkb);
+    R.move(0,-1); R.B.Y:=R.A.Y+1;
+    Insert(New(PLabel, Init(R, '~K~eys for cut, copy and paste:', RBkb)));
+
+    R.Move(0,(R.B.Y-R.A.Y)+3); R.B.Y:=R.A.Y+3;
     R2.Copy(R); Inc(R2.A.Y,2); R2.B.X:=R2.A.X+(R2.B.X-R2.A.X) div 2 -1;
     New(SB, Init(R2)); SB^.GrowMode:=0; SB^.Options:=SB^.Options or ofSelectable;
     SB^.SetParams(DoubleDelay,1,20,1,1);
@@ -1232,13 +1242,19 @@ begin
     Insert(New(PLabel, Init(R2,  label_mouse_altrightmousebuttonaction, RB2)));
   end;
   InsertButtons(D);
-  RB1^.Select;
+
+  RBkb^.Select;
   if Desktop^.ExecView(D)=cmOK then
   begin
     MouseReverse:=CB^.Mark(0);
     DoubleDelay:=SB^.Value;
     CtrlMouseAction:=RB1^.Value;
     AltMouseAction:=RB2^.Value;
+    if Tedit_key_modes(RBkb^.value)<>EditKeys then
+      begin
+        EditKeys:=Tedit_key_modes(RBkb^.value);
+        reload_menubar;
+      end;
   end;
   Dispose(D, Done);
 end;

+ 9 - 9
ide/fpstre.inc

@@ -144,7 +144,7 @@ const
       menu_options_env_codecomplete = 'Code~C~omplete...';
       menu_options_env_codetemplates = 'Code~T~emplates...';
       menu_options_env_desktop = '~D~esktop...';
-      menu_options_env_mouse = '~M~ouse...';
+      menu_options_env_keybmouse = 'Keyboard & ~m~ouse...';
       menu_options_env_startup = '~S~tartup...';
       menu_options_env_colors= '~C~olors';
       menu_options_learn_keys= 'Learn ~K~eys';
@@ -450,17 +450,17 @@ const
 
       dialog_mouseoptions = 'Mouse Options';
       label_mouse_speedbar = 'Fast       Medium      Slow';
-      label_mouse_doubleclickspeed = '~M~ouse double click';
+      label_mouse_doubleclickspeed = 'Mouse ~d~ouble click';
       label_mouse_reversebuttons = '~R~everse mouse buttons';
       label_mouse_crtlrightmousebuttonaction = 'Ctrl+Right mouse button';
       label_mouse_altrightmousebuttonaction = 'Alt+Right mouse button';
-      label_mouse_act_nothing = '~N~othing';
-      label_mouse_act_topicsearch = '~T~opic search';
-      label_mouse_act_gotocursor = '~G~o to cursor';
-      label_mouse_act_breakpoint = '~B~reakpoint';
-      label_mouse_act_evaluate = '~E~valuate';
-      label_mouse_act_addwatch = '~A~dd watch';
-      label_mouse_act_browsesymbol = 'Browse ~s~ymbol';
+      label_mouse_act_nothing = 'Nothing';
+      label_mouse_act_topicsearch = 'Topic search';
+      label_mouse_act_gotocursor = 'Go to cursor';
+      label_mouse_act_breakpoint = 'Breakpoint';
+      label_mouse_act_evaluate = 'Evaluate';
+      label_mouse_act_addwatch = 'Add watch';
+      label_mouse_act_browsesymbol = 'Browse symbol';
 
       label_colors_grp_browser = 'Browser';
       label_colors_framepassive = 'Frame passive';

+ 1 - 1
ide/fpstrh.inc

@@ -131,7 +131,7 @@ const
       menu_options_env_codecomplete = 'Code~C~omplete...';
       menu_options_env_codetemplates = 'Code~T~emplates...';
       menu_options_env_desktop = '~A~sztal...';
-      menu_options_env_mouse = 'E~g~‚r...';
+      menu_options_env_keybmouse = 'Keyboard E~g~‚r...';
       menu_options_env_startup = '~I~ndul s...';
       menu_options_env_colors= 'Sz¡~n~ek';
       menu_options_learn_keys= 'Learn ~K~eys';{ NOT TRANSLATED }