mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-16 08:59:26 +02:00
AROS: FP-IDE, System clipboard, execute programs/Shell, keycode Ctrl-A for Select All
git-svn-id: trunk@28561 -
This commit is contained in:
parent
81c717fc06
commit
9b40b6dcc1
@ -333,10 +333,10 @@ procedure InitCompilerSwitches;
|
||||
page is not available before video is initialized. (And only in certain
|
||||
circumstances after that, so, use a plain ascii character as bullet on Unix.)}
|
||||
|
||||
{$if defined(unix) or defined(amiga) or defined(morphos)}
|
||||
{$if defined(unix) or defined(HASAMIGA)}
|
||||
const bullet='*';
|
||||
{$else}
|
||||
const bullet='þ';
|
||||
const bullet='þ';
|
||||
{$endif}
|
||||
|
||||
BEGIN
|
||||
|
@ -115,8 +115,13 @@ const
|
||||
hint_editcut = 'Remove the selected text and put it in the clipboard';
|
||||
hint_editcopy = 'Copy the selected text in the clipboard';
|
||||
hint_editpaste = 'Insert selected text from the clipboard at the cursor position';
|
||||
{$ifdef AROS}
|
||||
hint_editcopywin = 'Copy the selected text in AROS clipboard';
|
||||
hint_editpastewin = 'Insert selected text from AROS clipboard at the cursor position';
|
||||
{$else}
|
||||
hint_editcopywin = 'Copy the selected text in windows clipboard';
|
||||
hint_editpastewin = 'Insert selected text from windows clipboard at the cursor position';
|
||||
{$endif}
|
||||
hint_editclear = 'Delete the selected text';
|
||||
hint_editselectall = 'Select the whole text';
|
||||
hint_editunselect = 'Unselect everything';
|
||||
|
@ -235,8 +235,13 @@ resourcestring menu_local_gotosource = '~G~oto source';
|
||||
menu_file_exit = 'E~x~it';
|
||||
|
||||
menu_edit = '~E~dit';
|
||||
{$ifdef AROS}
|
||||
menu_edit_copywin = 'Cop~y~ to AROS';
|
||||
menu_edit_pastewin = 'Paste from A~R~OS';
|
||||
{$else}
|
||||
menu_edit_copywin = 'Cop~y~ to Windows';
|
||||
menu_edit_pastewin = 'Paste from ~W~indows';
|
||||
{$endif}
|
||||
menu_edit_undo = '~U~ndo';
|
||||
menu_edit_redo = '~R~edo';
|
||||
menu_edit_cut = 'Cu~t~';
|
||||
@ -380,6 +385,8 @@ resourcestring menu_local_gotosource = '~G~oto source';
|
||||
menu_key_edit_copy_microsoft = menu_key_common_copy_microsoft;
|
||||
menu_key_edit_paste_microsoft = 'Ctrl+V';
|
||||
menu_key_edit_clear = 'Ctrl+Del';
|
||||
menu_key_edit_all_microsoft = 'Ctrl+A';
|
||||
menu_key_edit_all_borland = '';
|
||||
|
||||
menu_key_run_run = 'Ctrl+F9';
|
||||
menu_key_run_stepover = 'F8';
|
||||
@ -878,7 +885,7 @@ begin
|
||||
NewItem(menu_edit_copy,menu_key_edit_copy, copy_key, cmCopy, hcCopy,
|
||||
NewItem(menu_edit_paste,menu_key_edit_paste, paste_key, cmPaste, hcPaste,
|
||||
NewItem(menu_edit_clear,menu_key_edit_clear, kbCtrlDel, cmClear, hcClear,
|
||||
NewItem(menu_edit_selectall,'', kbNoKey, cmSelectAll, hcSelectAll,
|
||||
NewItem(menu_edit_selectall,menu_key_edit_all, all_Key, cmSelectAll, hcSelectAll,
|
||||
NewItem(menu_edit_unselect,'', kbNoKey, cmUnselect, hcUnselect,
|
||||
NewLine(
|
||||
NewItem(menu_edit_showclipboard,'', kbNoKey, cmShowClipboard, hcShowClipboard,
|
||||
@ -1041,20 +1048,24 @@ begin
|
||||
menu_key_edit_cut:=menu_key_edit_cut_microsoft;
|
||||
menu_key_edit_copy:=menu_key_edit_copy_microsoft;
|
||||
menu_key_edit_paste:=menu_key_edit_paste_microsoft;
|
||||
menu_key_edit_all:=menu_key_edit_all_microsoft;
|
||||
menu_key_hlplocal_copy:=menu_key_hlplocal_copy_microsoft;
|
||||
cut_key:=kbCtrlX;
|
||||
copy_key:=kbCtrlC;
|
||||
paste_key:=kbCtrlV;
|
||||
all_key:=kbCtrlA;
|
||||
end;
|
||||
ekm_borland:
|
||||
begin
|
||||
menu_key_edit_cut:=menu_key_edit_cut_borland;
|
||||
menu_key_edit_copy:=menu_key_edit_copy_borland;
|
||||
menu_key_edit_paste:=menu_key_edit_paste_borland;
|
||||
menu_key_edit_all:=menu_key_edit_all_borland;
|
||||
menu_key_hlplocal_copy:=menu_key_hlplocal_copy_borland;
|
||||
cut_key:=kbShiftDel;
|
||||
copy_key:=kbCtrlIns;
|
||||
paste_key:=kbShiftIns;
|
||||
all_key:=kbNoKey;
|
||||
end;
|
||||
end;
|
||||
loadmenubar;
|
||||
@ -1543,7 +1554,9 @@ begin
|
||||
Writeln('Running "'+ProgramPath+' '+Params+'"');
|
||||
{ DO NOT use COMSPEC for exe files as the
|
||||
ExitCode is lost in those cases PM }
|
||||
|
||||
{$ifdef AROS}
|
||||
DosExecute(ProgramPath, Params);
|
||||
{$else}
|
||||
{$ifndef Unix}
|
||||
posexe:=Pos('.EXE',UpCaseStr(ProgramPath));
|
||||
{ if programpath was three char long => bug }
|
||||
@ -1570,6 +1583,7 @@ begin
|
||||
InFile,OutFile,ErrFile);
|
||||
end;
|
||||
{$endif Unix}
|
||||
{$endif AROS}
|
||||
|
||||
{$ifdef Unix}
|
||||
if (DebuggeeTTY='') and (OutFile='') and (ExecType<>exDosShell) then
|
||||
@ -1718,6 +1732,9 @@ procedure TIDEApp.DosShell;
|
||||
var
|
||||
s : string;
|
||||
begin
|
||||
{$ifdef AROS}
|
||||
s := 'C:NewShell';
|
||||
{$else}
|
||||
{$ifdef Unix}
|
||||
s:=GetEnv('SHELL');
|
||||
if s='' then
|
||||
@ -1734,6 +1751,7 @@ begin
|
||||
if Not LocateExeFile(s) then
|
||||
s:='';
|
||||
end;
|
||||
{$endif}
|
||||
{$endif}
|
||||
if s='' then
|
||||
ErrorBox(msg_errorexecutingshell,nil)
|
||||
|
@ -63,6 +63,9 @@ end;
|
||||
|
||||
procedure TIDEApp.DoUserScreenWindow;
|
||||
begin
|
||||
{$ifdef HASAMIGA}
|
||||
Exit; // Do not open the Userscreen on AMIGA systems, its not closeable
|
||||
{$endif}
|
||||
if UserScreenWindow=nil then
|
||||
begin
|
||||
New(UserScreenWindow, Init(UserScreen, SearchFreeWindowNo));
|
||||
|
@ -788,8 +788,12 @@ end;
|
||||
|
||||
|
||||
{............................................................................}
|
||||
|
||||
procedure DosExecute(ProgName, ComLine : String);
|
||||
{$ifdef HASAMIGA}
|
||||
begin
|
||||
Dos.Exec(ProgName, ComLine);
|
||||
end;
|
||||
{$else}
|
||||
{$ifdef Windows}
|
||||
var
|
||||
StoreInherit : BOOL;
|
||||
@ -845,6 +849,7 @@ end;
|
||||
end;
|
||||
{$endif CPU86}
|
||||
End;
|
||||
{$endif HASAMIGA}
|
||||
|
||||
{*****************************************************************************
|
||||
Initialize
|
||||
|
@ -1577,7 +1577,11 @@ begin
|
||||
UserScreen:=New(PNWLScreen, Init);
|
||||
{$else}
|
||||
{$ifdef AMIGASCREEN}
|
||||
{$ifdef AROS}
|
||||
UserScreen:=New(PAmigaScreen, Init);
|
||||
{$else}
|
||||
UserScreen:=nil; //New(PAmigaScreen, Init);
|
||||
{$endif}
|
||||
{$else}
|
||||
UserScreen:=New(PScreen, Init);
|
||||
{$endif AMIGASCREEN}
|
||||
|
@ -29,12 +29,20 @@ const
|
||||
pasext = '.pas';
|
||||
ppext = '.pp';
|
||||
{$else}
|
||||
{$ifdef HASAMIGA}
|
||||
listsep = [';'];
|
||||
exeext = '';
|
||||
pasext = '.pas';
|
||||
ppext = '.pp';
|
||||
{$else HASAMIGA}
|
||||
listsep = [';'];
|
||||
exeext = '.exe';
|
||||
pasext = '.pas';
|
||||
ppext = '.pp';
|
||||
{$endif HASAMIGA}
|
||||
{$endif}
|
||||
|
||||
|
||||
function SmartPath(Path: string): string;
|
||||
Function FixPath(s:string;allowdot:boolean):string;
|
||||
function FixFileName(const s:string):string;
|
||||
|
@ -510,6 +510,7 @@ const menu_key_common_copy_borland = 'Ctrl+Ins';
|
||||
menu_key_edit_cut_microsoft = 'Ctrl+X';
|
||||
menu_key_edit_copy_microsoft = menu_key_common_copy_microsoft;
|
||||
menu_key_edit_paste_microsoft = 'Ctrl+V';
|
||||
menu_key_edit_all_borland = '';
|
||||
menu_key_edit_clear = 'Ctrl+Del';
|
||||
|
||||
menu_key_common_helpindex = 'Shift+F1';
|
||||
@ -530,10 +531,12 @@ const menu_key_common_copy_borland = 'Ctrl+Ins';
|
||||
const menu_key_edit_cut:string[63]=menu_key_edit_cut_borland;
|
||||
menu_key_edit_copy:string[63]=menu_key_edit_copy_borland;
|
||||
menu_key_edit_paste:string[63]=menu_key_edit_paste_borland;
|
||||
menu_key_edit_all:string[63]=menu_key_edit_all_borland;
|
||||
menu_key_hlplocal_copy:string[63]=menu_key_hlplocal_copy_borland;
|
||||
cut_key:word=kbShiftDel;
|
||||
copy_key:word=kbCtrlIns;
|
||||
paste_key:word=kbShiftIns;
|
||||
all_key:word=kbNoKey;
|
||||
|
||||
procedure RegisterFPViews;
|
||||
|
||||
|
@ -108,6 +108,11 @@
|
||||
{$define FSCaseInsensitive}
|
||||
{$endif}
|
||||
|
||||
{$ifdef AROS}
|
||||
{$define FSCaseInsensitive}
|
||||
{$define WinClipSupported}
|
||||
{$endif}
|
||||
|
||||
{ --- Exclude debugger support --- }
|
||||
{.$DEFINE NODEBUG}
|
||||
|
||||
|
@ -46,6 +46,11 @@ implementation
|
||||
strings,windows;
|
||||
{$endif Windows}
|
||||
|
||||
{$ifdef aros}
|
||||
uses
|
||||
clipboard;
|
||||
{$endif}
|
||||
|
||||
{$ifdef DOS}
|
||||
function WinClipboardSupported : boolean;
|
||||
var
|
||||
@ -129,6 +134,36 @@ begin
|
||||
end;
|
||||
{$endif Windows}
|
||||
|
||||
{$ifdef Aros}
|
||||
function WinClipboardSupported: Boolean;
|
||||
begin
|
||||
WinClipboardSupported := True;
|
||||
end;
|
||||
|
||||
function OpenWinClipboard: boolean;
|
||||
begin
|
||||
OpenWinClipboard := True;
|
||||
end;
|
||||
|
||||
function EmptyWinClipboard: boolean;
|
||||
begin
|
||||
EmptyWinClipboard := GetTextFromClip(PRIMARY_CLIP) = '';
|
||||
end;
|
||||
|
||||
function CloseWinClipboard : boolean;
|
||||
begin
|
||||
CloseWinClipboard:= True;
|
||||
end;
|
||||
|
||||
function InternGetDataSize: LongInt;
|
||||
var
|
||||
Text: string;
|
||||
begin
|
||||
Text := GetTextFromClip(PRIMARY_CLIP);
|
||||
InternGetDataSize := Length(Text);
|
||||
end;
|
||||
{$endif Aros}
|
||||
|
||||
|
||||
function GetTextWinClipboardSize : longint;
|
||||
begin
|
||||
@ -147,6 +182,10 @@ var
|
||||
h : HGlobal;
|
||||
pp : pchar;
|
||||
{$endif Windows}
|
||||
{$ifdef aros}
|
||||
Text: AnsiString;
|
||||
pp: PChar;
|
||||
{$endif aros}
|
||||
begin
|
||||
p:=nil;
|
||||
GetTextWinClipBoardData:=False;
|
||||
@ -181,6 +220,14 @@ begin
|
||||
end;
|
||||
GetTextWinClipBoardData:=h<>0;
|
||||
{$endif Windows}
|
||||
{$ifdef aros}
|
||||
Text := GetTextFromClip(0) + #0;
|
||||
PP := @Text[1];
|
||||
l := Length(Text);
|
||||
GetMem(p,l);
|
||||
Move(pp^,p^,l);
|
||||
GetTextWinClipBoardData := True;
|
||||
{$endif aros}
|
||||
CloseWinClipBoard;
|
||||
{$ifdef DOS}
|
||||
M.MoveDataFrom(l,P^);
|
||||
@ -199,6 +246,10 @@ var
|
||||
pp : pchar;
|
||||
res : boolean;
|
||||
{$endif Windows}
|
||||
{$ifdef aros}
|
||||
pp: PChar;
|
||||
Test: AnsiString;
|
||||
{$endif aros}
|
||||
begin
|
||||
SetTextWinClipBoardData:=False;
|
||||
if (l=0) or (l>65520) then
|
||||
@ -239,6 +290,9 @@ begin
|
||||
GlobalUnlock(h);
|
||||
SetTextWinClipBoardData:=res;
|
||||
{$endif Windows}
|
||||
{$ifdef Aros}
|
||||
PutTextToClip(0, AnsiString(p));
|
||||
{$endif Aros}
|
||||
CloseWinClipBoard;
|
||||
end;
|
||||
|
||||
|
@ -1233,7 +1233,7 @@ var Dir: string;
|
||||
begin
|
||||
Dir:=GetEnv('TEMP');
|
||||
if Dir='' then Dir:=GetEnv('TMP');
|
||||
{$if defined(morphos) or defined(amiga)}
|
||||
{$ifdef HASAMIGA}
|
||||
if Dir='' then Dir:='T:';
|
||||
{$endif}
|
||||
if (Dir<>'') then if not ExistsDir(Dir) then Dir:='';
|
||||
|
@ -1671,10 +1671,14 @@ var
|
||||
{$ifdef Unix}
|
||||
if Path=DirSeparator then Root:=true;
|
||||
{$else}
|
||||
{$ifdef HASAMIGA}
|
||||
if Length(Path) > 0 then Root := Path[Length(Path)] = DriveSeparator;
|
||||
{$else}
|
||||
if (length(Path)=3) and (Upcase(Path[1]) in['A'..'Z']) and
|
||||
(Path[2]=':') and (Path[3]=DirSeparator) then
|
||||
Root:=true;
|
||||
{$endif}
|
||||
{$endif}
|
||||
if (Root=false) and (copy(Path,length(Path),1)=DirSeparator) then
|
||||
NormalizeDir:=copy(Path,1,length(Path)-1)
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user