mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-18 04:19:12 +02:00
cocoa: using hard-coded paste(clip)board names, rather than their dynamic-symbol counterparts so the unit can be linked on MacOS < 10.6. #33762
git-svn-id: trunk@58287 -
This commit is contained in:
parent
7d1246423d
commit
99abd92c54
@ -396,29 +396,26 @@ begin
|
|||||||
|
|
||||||
lDataType := ccdtNonStandard;
|
lDataType := ccdtNonStandard;
|
||||||
// See PredefinedClipboardMimeTypes for the most common mime-types
|
// See PredefinedClipboardMimeTypes for the most common mime-types
|
||||||
{$IF not defined(MAC_OS_X_VERSION_MIN_REQUIRED) or (MAC_OS_X_VERSION_MIN_REQUIRED >= 1060)}
|
|
||||||
case AMimeType of
|
case AMimeType of
|
||||||
'text/plain':
|
'text/plain':
|
||||||
begin
|
begin
|
||||||
lNSStr := NSPasteboardTypeString;
|
//hack: the name of constants is a hack
|
||||||
lNSStr.retain;
|
// should be replaced with either weaklinking
|
||||||
|
// or dynamic loading (dlsym)
|
||||||
|
lNSStr := NSSTR('public.utf8-plain-text'); // NSPasteboardTypeString; // commented out for OSX < 10.6 see #33672
|
||||||
lDataType := ccdtText;
|
lDataType := ccdtText;
|
||||||
end;
|
end;
|
||||||
'image/png':
|
'image/png':
|
||||||
begin
|
begin
|
||||||
lNSStr := NSPasteboardTypePNG;
|
lNSStr := NSSTR('public.png'); // NSPasteboardTypePNG
|
||||||
lNSStr.retain;
|
|
||||||
lDataType := ccdtCocoaStandard;
|
lDataType := ccdtCocoaStandard;
|
||||||
end;
|
end;
|
||||||
'image/bmp':
|
'image/bmp':
|
||||||
begin
|
begin
|
||||||
lNSStr := NSPasteboardTypePNG;
|
lNSStr := NSSTR('public.png'); // NSPasteboardTypePNG
|
||||||
lDataType := ccdtBitmap;
|
lDataType := ccdtBitmap;
|
||||||
end;
|
end;
|
||||||
else
|
else
|
||||||
{$ELSE}
|
|
||||||
begin
|
|
||||||
{$ENDIF}
|
|
||||||
lNSStr := NSStringUtf8(AMimeType);
|
lNSStr := NSStringUtf8(AMimeType);
|
||||||
lDataType := ccdtNonStandard;
|
lDataType := ccdtNonStandard;
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user