Explorar el Código

+ Edit|Select and Edit|Unselect, closes 4181

git-svn-id: trunk@813 -
florian hace 20 años
padre
commit
be090fcf7b
Se han modificado 7 ficheros con 21 adiciones y 5 borrados
  1. 2 2
      ide/fpconst.pas
  2. 2 0
      ide/fphelp.pas
  3. 3 1
      ide/fpide.pas
  4. 4 0
      ide/fpstre.inc
  5. 1 1
      ide/fpviews.pas
  6. 7 1
      ide/weditor.pas
  7. 2 0
      ide/wviews.pas

+ 2 - 2
ide/fpconst.pas

@@ -193,7 +193,7 @@ const
 
      { in wviews.pas defined
      cmSelectAll         = 246;
-     cmSelectClear       = 247;
+     cmUnselect          = 247;
      }
 
      cmNotImplemented    = 1000;
@@ -363,7 +363,7 @@ const
      hcCopyWin           = hcShift+cmCopyWin;
      hcPasteWin          = hcShift+cmPasteWin;
      hcSelectAll         = hcShift+cmSelectAll;
-     hcSelectClear       = hcShift+cmSelectClear;
+     hcUnselect          = hcShift+cmUnselect;
 
      hcFindProcedure     = hcShift+cmFindProcedure;
      hcObjects           = hcShift+cmObjects;

+ 2 - 0
ide/fphelp.pas

@@ -129,6 +129,8 @@ begin
     hcCut           : S:=hint_editcut;
     hcCopy          : S:=hint_editcopy;
     hcPaste         : S:=hint_editpaste;
+    hcSelectAll     : S:=hint_editselectall;
+    hcUnselect      : S:=hint_editunselect;
     hcCopyWin       : S:=hint_editcopywin;
     hcPasteWin      : S:=hint_editpastewin;
     hcClear         : S:=hint_editclear;

+ 3 - 1
ide/fpide.pas

@@ -330,9 +330,11 @@ begin
       NewItem(menu_edit_copy,menu_key_edit_copy, kbCtrlIns, cmCopy, hcCut,
       NewItem(menu_edit_paste,menu_key_edit_paste, kbShiftIns, cmPaste, hcPaste,
       NewItem(menu_edit_clear,menu_key_edit_clear, kbCtrlDel, cmClear, hcClear,
+      NewItem(menu_edit_selectall,'', kbNoKey, cmSelectAll, hcSelectAll,
+      NewItem(menu_edit_unselect,'', kbNoKey, cmUnselect, hcUnselect,
       NewLine(
       NewItem(menu_edit_showclipboard,'', kbNoKey, cmShowClipboard, hcShowClipboard,
-      WinPMI))))))
+      WinPMI))))))))
 {$ifdef DebugUndo}))){$endif DebugUndo}
       )))),
     NewSubMenu(menu_search,hcSearchMenu, NewMenu(

+ 4 - 0
ide/fpstre.inc

@@ -67,6 +67,8 @@ const
       menu_edit_paste        = '~P~aste';
       menu_edit_clear        = 'C~l~ear';
       menu_edit_showclipboard= '~S~how clipboard';
+      menu_edit_selectall    = 'Select ~A~ll';
+      menu_edit_unselect     = 'U~n~select';
 
       menu_search            = '~S~earch';
       menu_search_find       = '~F~ind...';
@@ -945,6 +947,8 @@ const
       hint_editcopywin       = 'Copy the selected text in windows clipboard';
       hint_editpastewin      = 'Insert selected text from windows clipboard at the cursor position';
       hint_editclear         = 'Delete the selected text';
+      hint_editselectall     = 'Select the whole text';
+      hint_editunselect      = 'Unselect everything';
       hint_showclipboard     = 'Open then clipboard window';
       hint_searchmenu        = 'Text and symbols search commands';
       hint_searchfind        = 'Search for text';

+ 1 - 1
ide/fpviews.pas

@@ -481,7 +481,7 @@ const
       SourceCmds  : TCommandSet =
         ([cmSave,cmSaveAs,cmCompile,cmHide,cmDoReload]);
       EditorCmds  : TCommandSet =
-        ([cmFind,cmReplace,cmSearchAgain,cmJumpLine,cmHelpTopicSearch]);
+        ([cmFind,cmReplace,cmSearchAgain,cmJumpLine,cmHelpTopicSearch,cmSelectAll,cmUnselect]);
       CompileCmds : TCommandSet =
         ([cmMake,cmBuild,cmRun]);
 

+ 7 - 1
ide/weditor.pas

@@ -719,7 +719,10 @@ const
 
      CodeCompleteMinLen : byte = 4; { minimum length of text to try to complete }
 
-     ToClipCmds         : TCommandSet = ([cmCut,cmCopy,cmCopyWin]);
+     ToClipCmds         : TCommandSet = ([cmCut,cmCopy,cmCopyWin,
+       { cmUnselect should because like cut, copy, copywin:
+         if there is a selection, it is active, else it isn't }
+       cmUnselect]);
      FromClipCmds       : TCommandSet = ([cmPaste]);
      NulClipCmds        : TCommandSet = ([cmClear]);
      UndoCmd            : TCommandSet = ([cmUndo]);
@@ -3573,6 +3576,9 @@ begin
           cmCut         : ClipCut;
           cmCopy        : ClipCopy;
           cmPaste       : ClipPaste;
+
+          cmSelectAll   : SelectAll(true);
+          cmUnselect    : SelectAll(false);
 {$ifdef WinClipSupported}
           cmCopyWin     : ClipCopyWin;
           cmPasteWin    : ClipPasteWin;

+ 2 - 0
ide/wviews.pas

@@ -22,6 +22,8 @@ const
 
       cmCopyWin = 240;
       cmPasteWin = 241;
+      cmSelectAll         = 246;
+      cmUnselect          = 247;
 
       cmLocalMenu            = 54100;
       cmUpdate               = 54101;