Author: rmottola
Date: Thu Nov 20 20:45:02 2014
New Revision: 38193
URL: http://svn.gna.org/viewcvs/gnustep?rev=38193&view=rev
Log:
By Fred: Enable underlining and strikethrough for GNUstep, provide better
fallback for old MacOS.
Modified:
libs/simplewebkit/trunk/ChangeLog
libs/simplewebkit/trunk/Sources/WebHTMLDocumentView.m
Modified: libs/simplewebkit/trunk/ChangeLog
URL:
http://svn.gna.org/viewcvs/gnustep/libs/simplewebkit/trunk/ChangeLog?rev=38193&r1=38192&r2=38193&view=diff
==============================================================================
--- libs/simplewebkit/trunk/ChangeLog (original)
+++ libs/simplewebkit/trunk/ChangeLog Thu Nov 20 20:45:02 2014
@@ -1,3 +1,8 @@
+2014-11-04 Riccardo Mottola <[email protected]>
+
+ * Sources/WebHTMLDocumentView.m
+ By Fred: Enable underlining and strikethrough for GNUstep, provide
better fallback for old MacOS.
+
2014-11-04 Riccardo Mottola <[email protected]>
* Sources/DOMCSS.m
Modified: libs/simplewebkit/trunk/Sources/WebHTMLDocumentView.m
URL:
http://svn.gna.org/viewcvs/gnustep/libs/simplewebkit/trunk/Sources/WebHTMLDocumentView.m?rev=38193&r1=38192&r2=38193&view=diff
==============================================================================
--- libs/simplewebkit/trunk/Sources/WebHTMLDocumentView.m (original)
+++ libs/simplewebkit/trunk/Sources/WebHTMLDocumentView.m Thu Nov 20
20:45:02 2014
@@ -1,7 +1,7 @@
/* simplewebkit
WebHTMLDocumentView.m
- Copyright (C) 2007 Free Software Foundation, Inc.
+ Copyright (C) 2007-2014 Free Software Foundation, Inc.
Author: Dr. H. Nikolaus Schaller
@@ -653,7 +653,7 @@
#if 0
NSLog(@"setLinkColor: %@", color);
#endif
-#if defined(__mySTEP__) || MAC_OS_X_VERSION_10_3 < MAC_OS_X_VERSION_MAX_ALLOWED
+#if defined(__mySTEP__) || defined(GNUSTEP) || MAC_OS_X_VERSION_10_3 <
MAC_OS_X_VERSION_MAX_ALLOWED
if(color)
[self setLinkTextAttributes:[NSDictionary
dictionaryWithObjectsAndKeys:color, NSUnderlineColorAttributeName,
[NSNumber numberWithInt:NSUnderlineStyleSingle],
NSUnderlineStyleAttributeName,
@@ -1520,9 +1520,9 @@
{
if([deco
isEqualToString:@"underline"])
{ // make underlined
-#if defined(__mySTEP__) || MAC_OS_X_VERSION_10_2 < MAC_OS_X_VERSION_MAX_ALLOWED
+#if defined(__mySTEP__) || defined(GNUSTEP)|| MAC_OS_X_VERSION_10_2 <
MAC_OS_X_VERSION_MAX_ALLOWED
[attributes
setObject:[NSNumber numberWithInt:NSUnderlineStyleSingle]
forKey:NSUnderlineStyleAttributeName];
-#else // MacOS X < 10.3 and GNUstep
+#else // MacOS X < 10.3
[attributes
setObject:[NSNumber numberWithInt:NSSingleUnderlineStyle]
forKey:NSUnderlineStyleAttributeName];
#endif
}
@@ -1530,10 +1530,10 @@
; // FIXME: not
available as NSAttributedString attribute
else if([deco
isEqualToString:@"line-through"])
{ // make strike-through
-#if defined(__mySTEP__) || MAC_OS_X_VERSION_10_2 < MAC_OS_X_VERSION_MAX_ALLOWED
+#if defined(__mySTEP__) || defined(GNUSTEP)|| MAC_OS_X_VERSION_10_2 <
MAC_OS_X_VERSION_MAX_ALLOWED
[attributes
setObject:[NSNumber numberWithInt:NSUnderlineStyleSingle]
forKey:NSStrikethroughStyleAttributeName];
-#else // MacOS X < 10.3 and GNUstep
- // [attributes
setObject:[NSNumber numberWithInt:NSSingleUnderlineStyle]
forKey:NSStrikethroughStyleAttributeName];
+#else // MacOS X < 10.3
+ [attributes
setObject:[NSNumber numberWithInt:NSUnderlineStrikethroughMask]
forKey:NSUnderlineStyleAttributeName];
#endif
}
// other values are simply
ignored
_______________________________________________
Gnustep-cvs mailing list
[email protected]
https://mail.gna.org/listinfo/gnustep-cvs