aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAlan Third2021-11-25 20:58:37 +0000
committerAlan Third2021-11-25 21:04:50 +0000
commit9d37be35227fcb419e7b52978f8d5a8b1379567f (patch)
treeb2983676d55b16016a236dd5c23c4f408ea9422a /src
parent4cd6bc88090d75df54ef5af684c21454954e1cd3 (diff)
downloademacs-9d37be35227fcb419e7b52978f8d5a8b1379567f.tar.gz
emacs-9d37be35227fcb419e7b52978f8d5a8b1379567f.zip
Fix selection for old GNUstep and GCC
* src/nsselect.m (ns_get_foreign_selection): Remove language features not yet supported by GCC. Be more selective with which pasteboard types we use. * src/nsterm.h: Set up some more #defines for deprecated variables.
Diffstat (limited to 'src')
-rw-r--r--src/nsselect.m12
-rw-r--r--src/nsterm.h9
2 files changed, 17 insertions, 4 deletions
diff --git a/src/nsselect.m b/src/nsselect.m
index e999835014d..8b23f6f51ad 100644
--- a/src/nsselect.m
+++ b/src/nsselect.m
@@ -215,7 +215,7 @@ ns_get_local_selection (Lisp_Object selection_name,
215static Lisp_Object 215static Lisp_Object
216ns_get_foreign_selection (Lisp_Object symbol, Lisp_Object target) 216ns_get_foreign_selection (Lisp_Object symbol, Lisp_Object target)
217{ 217{
218 NSDictionary<NSString *, NSString *> *typeLookup; 218 NSDictionary *typeLookup;
219 id pb; 219 id pb;
220 pb = ns_symbol_to_pb (symbol); 220 pb = ns_symbol_to_pb (symbol);
221 221
@@ -229,10 +229,14 @@ ns_get_foreign_selection (Lisp_Object symbol, Lisp_Object target)
229#else 229#else
230 @"text/plain", NSFilenamesPboardType, 230 @"text/plain", NSFilenamesPboardType,
231#endif 231#endif
232 @"text/html", NSPasteboardTypeHTML, 232#ifdef NS_IMPL_COCOA
233 /* FIXME: I believe these are actually available in recent
234 versions of GNUstep. */
233 @"text/plain", NSPasteboardTypeMultipleTextSelection, 235 @"text/plain", NSPasteboardTypeMultipleTextSelection,
234 @"application/pdf", NSPasteboardTypePDF,
235 @"image/png", NSPasteboardTypePNG, 236 @"image/png", NSPasteboardTypePNG,
237#endif
238 @"text/html", NSPasteboardTypeHTML,
239 @"application/pdf", NSPasteboardTypePDF,
236 @"application/rtf", NSPasteboardTypeRTF, 240 @"application/rtf", NSPasteboardTypeRTF,
237 @"application/rtfd", NSPasteboardTypeRTFD, 241 @"application/rtfd", NSPasteboardTypeRTFD,
238 @"STRING", NSPasteboardTypeString, 242 @"STRING", NSPasteboardTypeString,
@@ -272,7 +276,7 @@ ns_get_foreign_selection (Lisp_Object symbol, Lisp_Object target)
272 = [typeLookup allKeysForObject: 276 = [typeLookup allKeysForObject:
273 [NSString stringWithLispString:SYMBOL_NAME (target)]]; 277 [NSString stringWithLispString:SYMBOL_NAME (target)]];
274 else 278 else
275 availableTypes = @[NSPasteboardTypeString]; 279 availableTypes = [NSArray arrayWithObject:NSPasteboardTypeString];
276 280
277 t = [pb availableTypeFromArray:availableTypes]; 281 t = [pb availableTypeFromArray:availableTypes];
278 282
diff --git a/src/nsterm.h b/src/nsterm.h
index 8175f996644..a32b8fe149c 100644
--- a/src/nsterm.h
+++ b/src/nsterm.h
@@ -1346,9 +1346,18 @@ enum NSWindowTabbingMode
1346 1346
1347#if !defined (NS_IMPL_COCOA) || !defined (MAC_OS_X_VERSION_10_14) 1347#if !defined (NS_IMPL_COCOA) || !defined (MAC_OS_X_VERSION_10_14)
1348/* Deprecated in macOS 10.14. */ 1348/* Deprecated in macOS 10.14. */
1349/* FIXME: Some of these new names, if not all, are actually available
1350 in some recent version of GNUstep. */
1349#define NSPasteboardTypeString NSStringPboardType 1351#define NSPasteboardTypeString NSStringPboardType
1350#define NSPasteboardTypeTabularText NSTabularTextPboardType 1352#define NSPasteboardTypeTabularText NSTabularTextPboardType
1351#define NSPasteboardTypeURL NSURLPboardType 1353#define NSPasteboardTypeURL NSURLPboardType
1354#define NSPasteboardTypeHTML NSHTMLPboardType
1355#define NSPasteboardTypeMultipleTextSelection NSMultipleTextSelectionPboardType
1356#define NSPasteboardTypePDF NSPDFPboardType
1357#define NSPasteboardTypePNG NSPNGPboardType
1358#define NSPasteboardTypeRTF NSRTFPboardType
1359#define NSPasteboardTypeRTFD NSRTFDPboardType
1360#define NSPasteboardTypeTIFF NSTIFFPboardType
1352#define NSControlStateValueOn NSOnState 1361#define NSControlStateValueOn NSOnState
1353#define NSControlStateValueOff NSOffState 1362#define NSControlStateValueOff NSOffState
1354#define NSBezelStyleRounded NSRoundedBezelStyle 1363#define NSBezelStyleRounded NSRoundedBezelStyle