فهرست منبع

Merged revisions 811-813 via svnmerge from
/trunk

git-svn-id: branches/fixes_2_0@815 -

florian 20 سال پیش
والد
کامیت
3bd3fbf138
7فایلهای تغییر یافته به همراه34 افزوده شده و 10 حذف شده
  1. 10 1
      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. 9 7
      ide/weditor.pas
  7. 5 0
      ide/wviews.pas

+ 10 - 1
ide/fpconst.pas

@@ -21,7 +21,7 @@ uses Views,App,
      WViews,WEditor,WHTMLHlp;
 
 const
-     VersionStr           = '1.0.4';
+     VersionStr           = '1.0.6';
 
      MaxRecentFileCount   = 9;
      MaxToolCount         = 16;
@@ -182,13 +182,20 @@ const
      cmUntilReturn       = 239;
      { WARNING these two are also defined in weditor.pas PM }
      { and why aren't these defines then removed? Gabor }
+     { commented out, now in wviews.pas FK
      cmCopyWin           = 240;
      cmPasteWin          = 241;
+     }
      cmRegisters         = 242;
      cmFPURegisters      = 243;
      cmDoReload          = 244;
      cmVectorRegisters   = 245;
 
+     { in wviews.pas defined
+     cmSelectAll         = 246;
+     cmUnselect          = 247;
+     }
+
      cmNotImplemented    = 1000;
      cmNewFromTemplate   = 1001;
      cmShowReadme        = 1002;
@@ -355,6 +362,8 @@ const
      hcShowClipboard     = hcShift+cmShowClipboard;
      hcCopyWin           = hcShift+cmCopyWin;
      hcPasteWin          = hcShift+cmPasteWin;
+     hcSelectAll         = hcShift+cmSelectAll;
+     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]);
 

+ 9 - 7
ide/weditor.pas

@@ -21,7 +21,7 @@ interface
 uses
   Dos,Objects,Drivers,Views,Dialogs,Menus,
   FVConsts,
-  WUtils;
+  WUtils,WViews;
 
 const
       cmFileNameChanged      = 51234;
@@ -712,10 +712,6 @@ type
 
 
 const
-
-     cmCopyWin = 240;
-     cmPasteWin = 241;
-
      { used for ShiftDel and ShiftIns to avoid
        GetShiftState to be considered for extending
        selection (PM) }
@@ -723,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]);
@@ -766,7 +765,7 @@ uses
 {$ifdef TEST_REGEXP}
   regexpr,
 {$endif TEST_REGEXP}
-  WConsts,WViews,WCEdit;
+  WConsts,WCEdit;
 
 type
     RecordWord = sw_word;
@@ -3577,6 +3576,9 @@ begin
           cmCut         : ClipCut;
           cmCopy        : ClipCopy;
           cmPaste       : ClipPaste;
+
+          cmSelectAll   : SelectAll(true);
+          cmUnselect    : SelectAll(false);
 {$ifdef WinClipSupported}
           cmCopyWin     : ClipCopyWin;
           cmPasteWin    : ClipPasteWin;

+ 5 - 0
ide/wviews.pas

@@ -20,6 +20,11 @@ uses Objects,Drivers,Views,Menus,Dialogs;
 const
       evIdle                 = $8000;
 
+      cmCopyWin = 240;
+      cmPasteWin = 241;
+      cmSelectAll         = 246;
+      cmUnselect          = 247;
+
       cmLocalMenu            = 54100;
       cmUpdate               = 54101;
       cmListFocusChanged     = 54102;