changeset 2187:6740154cec68

Mac: Push the NSView changes back to Lion 10.7 and fix building on Lion.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Thu, 15 Oct 2020 00:23:56 +0000
parents 25fc0f438c6d
children a02ff8927927
files mac/dw.m
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mac/dw.m	Wed Oct 14 23:44:25 2020 +0000
+++ b/mac/dw.m	Thu Oct 15 00:23:56 2020 +0000
@@ -27,6 +27,7 @@
 /* Create a define to let us know to include Lion specific features */
 #if defined(MAC_OS_X_VERSION_10_7) && ((defined(MAC_OS_X_VERSION_MAX_ALLOWED) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_7) || !defined(MAC_OS_X_VERSION_MAX_ALLOWED))
 #define BUILDING_FOR_LION
+#define DW_USE_NSVIEW
 #endif
 
 /* Create a define to let us know to include Mountain Lion specific features */
@@ -52,7 +53,6 @@
 #define DWCalendarUnitYear NSCalendarUnitYear
 #define DWCalendarIdentifierGregorian NSCalendarIdentifierGregorian
 #define BUILDING_FOR_YOSEMITE
-#define DW_USE_NSVIEW
 #else
 #define DWModalResponseOK NSOKButton
 #define DWModalResponseCancel NSCancelButton
@@ -7526,10 +7526,12 @@
     {
         NSString *title = [NSString stringWithUTF8String:titles[z]];
         NSTableColumn *column = [[NSTableColumn alloc] initWithIdentifier:title];
-#ifdef DW_USE_NSVIEW
+#ifdef BUILDING_FOR_YOSEMITE
         [column setTitle:title];
 #else
         [[column headerCell] setStringValue:title];
+#endif
+#ifndef DW_USE_NSVIEW
         if(flags[z] & DW_CFA_BITMAPORICON)
         {
             NSImageCell *imagecell = [[NSImageCell alloc] init];