mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-10 05:46:14 +02:00
IDE: enabled AROS' system clipboard code also for Amiga and MorphOS
git-svn-id: trunk@29406 -
This commit is contained in:
parent
285f564ed1
commit
e24f59fb9f
@ -115,10 +115,15 @@ 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 HASAMIGA}
|
||||
{$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 to the system clipboard';
|
||||
hint_editpastewin = 'Insert selected text from the system clipboard at the cursor position';
|
||||
{$endif}
|
||||
{$else}
|
||||
hint_editcopywin = 'Copy the selected text in windows clipboard';
|
||||
hint_editpastewin = 'Insert selected text from windows clipboard at the cursor position';
|
||||
{$endif}
|
||||
|
@ -235,10 +235,15 @@ resourcestring menu_local_gotosource = '~G~oto source';
|
||||
menu_file_exit = 'E~x~it';
|
||||
|
||||
menu_edit = '~E~dit';
|
||||
{$ifdef HASAMIGA}
|
||||
{$ifdef AROS}
|
||||
menu_edit_copywin = 'Cop~y~ to AROS';
|
||||
menu_edit_pastewin = 'Paste from A~R~OS';
|
||||
{$else}
|
||||
menu_edit_copywin = 'Cop~y~ to System';
|
||||
menu_edit_pastewin = 'Paste from Syste~m~';
|
||||
{$endif}
|
||||
{$else}
|
||||
menu_edit_copywin = 'Cop~y~ to Windows';
|
||||
menu_edit_pastewin = 'Paste from ~W~indows';
|
||||
{$endif}
|
||||
|
@ -100,10 +100,12 @@
|
||||
|
||||
{$ifdef Amiga}
|
||||
{$define FSCaseInsensitive}
|
||||
{$define WinClipSupported}
|
||||
{$endif}
|
||||
|
||||
{$ifdef MorphOS}
|
||||
{$define FSCaseInsensitive}
|
||||
{$define WinClipSupported}
|
||||
{$endif}
|
||||
|
||||
{$ifdef AROS}
|
||||
|
@ -46,11 +46,12 @@ implementation
|
||||
strings,windows;
|
||||
{$endif Windows}
|
||||
|
||||
{$ifdef aros}
|
||||
{$ifdef HASAMIGA}
|
||||
uses
|
||||
clipboard;
|
||||
clipboard,cliputils;
|
||||
{$endif}
|
||||
|
||||
|
||||
{$ifdef DOS}
|
||||
function WinClipboardSupported : boolean;
|
||||
var
|
||||
@ -134,7 +135,7 @@ begin
|
||||
end;
|
||||
{$endif Windows}
|
||||
|
||||
{$ifdef Aros}
|
||||
{$ifdef HASAMIGA}
|
||||
function WinClipboardSupported: Boolean;
|
||||
begin
|
||||
WinClipboardSupported := True;
|
||||
@ -162,7 +163,7 @@ begin
|
||||
Text := GetTextFromClip(PRIMARY_CLIP);
|
||||
InternGetDataSize := Length(Text);
|
||||
end;
|
||||
{$endif Aros}
|
||||
{$endif HASAMIGA}
|
||||
|
||||
|
||||
function GetTextWinClipboardSize : longint;
|
||||
@ -182,10 +183,10 @@ var
|
||||
h : HGlobal;
|
||||
pp : pchar;
|
||||
{$endif Windows}
|
||||
{$ifdef aros}
|
||||
{$ifdef HASAMIGA}
|
||||
Text: AnsiString;
|
||||
pp: PChar;
|
||||
{$endif aros}
|
||||
{$endif HASAMIGA}
|
||||
begin
|
||||
p:=nil;
|
||||
GetTextWinClipBoardData:=False;
|
||||
@ -220,14 +221,14 @@ begin
|
||||
end;
|
||||
GetTextWinClipBoardData:=h<>0;
|
||||
{$endif Windows}
|
||||
{$ifdef aros}
|
||||
{$ifdef HASAMIGA}
|
||||
Text := GetTextFromClip(0) + #0;
|
||||
PP := @Text[1];
|
||||
l := Length(Text);
|
||||
GetMem(p,l);
|
||||
Move(pp^,p^,l);
|
||||
GetTextWinClipBoardData := True;
|
||||
{$endif aros}
|
||||
{$endif HASAMIGA}
|
||||
CloseWinClipBoard;
|
||||
{$ifdef DOS}
|
||||
M.MoveDataFrom(l,P^);
|
||||
@ -246,10 +247,10 @@ var
|
||||
pp : pchar;
|
||||
res : boolean;
|
||||
{$endif Windows}
|
||||
{$ifdef aros}
|
||||
{$ifdef HASAMIGA}
|
||||
pp: PChar;
|
||||
Test: AnsiString;
|
||||
{$endif aros}
|
||||
{$endif HASAMIGA}
|
||||
begin
|
||||
SetTextWinClipBoardData:=False;
|
||||
if (l=0) or (l>65520) then
|
||||
@ -290,9 +291,9 @@ begin
|
||||
GlobalUnlock(h);
|
||||
SetTextWinClipBoardData:=res;
|
||||
{$endif Windows}
|
||||
{$ifdef Aros}
|
||||
{$ifdef HASAMIGA}
|
||||
PutTextToClip(0, AnsiString(p));
|
||||
{$endif Aros}
|
||||
{$endif HASAMIGA}
|
||||
CloseWinClipBoard;
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user