[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] Fix deprecation warning
From: |
Alan Third |
Subject: |
[PATCH] Fix deprecation warning |
Date: |
Wed, 26 Sep 2018 22:36:52 +0100 |
User-agent: |
Mutt/1.10.1 (2018-07-13) |
* src/nsterm.m (ns_term_init): Use writeToFile or writeToURL as
required.
---
I believe this should fix the colour list error.
src/nsterm.m | 16 +++++++++++++++-
1 file changed, 15 insertions(+), 1 deletion(-)
diff --git a/src/nsterm.m b/src/nsterm.m
index 954020dcde..d92d6c3244 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -5193,7 +5193,21 @@ Needs to be here because ns_initialize_display_info ()
uses AppKit classes.
alpha: 1.0]
forKey: [NSString stringWithUTF8String: name]];
}
- [cl writeToFile: nil];
+
+ /* FIXME: Report any errors writing the color file below. */
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= 101100
+#if MAC_OS_X_VERSION_MIN_REQUIRED < 101100
+ if ([cl respondsToSelector:@selector(writeToURL:error:)])
+#endif
+ [cl writeToURL:nil error:nil];
+#if MAC_OS_X_VERSION_MIN_REQUIRED < 101100
+ else
+#endif
+#endif /* MAC_OS_X_VERSION_MAX_ALLOWED >= 101100 */
+#if MAC_OS_X_VERSION_MIN_REQUIRED < 101100 \
+ || defined (NS_IMPL_GNUSTEP)
+ [cl writeToFile: nil];
+#endif
}
}
--
2.18.0
--
Alan Third
- weird startup error in MacOS Mojave, Perry E. Metzger, 2018/09/25
- Re: weird startup error in MacOS Mojave, Herbert J. Skuhra, 2018/09/25
- Re: weird startup error in MacOS Mojave, Perry E. Metzger, 2018/09/25
- Re: weird startup error in MacOS Mojave, Herbert J. Skuhra, 2018/09/25
- Re: weird startup error in MacOS Mojave, Perry E. Metzger, 2018/09/25
- Re: weird startup error in MacOS Mojave, Alan Third, 2018/09/26
- Re: weird startup error in MacOS Mojave, Perry E. Metzger, 2018/09/26
- [PATCH] Fix deprecation warning,
Alan Third <=
- Re: [PATCH] Fix deprecation warning, Herbert J. Skuhra, 2018/09/28
- Re: [PATCH] Fix deprecation warning, Alan Third, 2018/09/28
- Re: [PATCH] Fix deprecation warning, Perry E. Metzger, 2018/09/29
- Re: [PATCH] Fix deprecation warning, Alan Third, 2018/09/29
- Re: [PATCH] Fix deprecation warning, Perry E. Metzger, 2018/09/29
- Re: [PATCH] Fix deprecation warning, Alan Third, 2018/09/29
- Re: weird startup error in MacOS Mojave, Alan Third, 2018/09/28