mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-10 01:16:18 +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;
|
||||
// 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
|
||||
'text/plain':
|
||||
begin
|
||||
lNSStr := NSPasteboardTypeString;
|
||||
lNSStr.retain;
|
||||
//hack: the name of constants is a hack
|
||||
// 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;
|
||||
end;
|
||||
'image/png':
|
||||
begin
|
||||
lNSStr := NSPasteboardTypePNG;
|
||||
lNSStr.retain;
|
||||
lNSStr := NSSTR('public.png'); // NSPasteboardTypePNG
|
||||
lDataType := ccdtCocoaStandard;
|
||||
end;
|
||||
'image/bmp':
|
||||
begin
|
||||
lNSStr := NSPasteboardTypePNG;
|
||||
lNSStr := NSSTR('public.png'); // NSPasteboardTypePNG
|
||||
lDataType := ccdtBitmap;
|
||||
end;
|
||||
else
|
||||
{$ELSE}
|
||||
begin
|
||||
{$ENDIF}
|
||||
lNSStr := NSStringUtf8(AMimeType);
|
||||
lDataType := ccdtNonStandard;
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user