diff --git a/DetoxInstruments/DetoxInstruments/About.storyboard b/DetoxInstruments/DetoxInstruments/About.storyboard index 4b01a91d..a39d4e67 100644 --- a/DetoxInstruments/DetoxInstruments/About.storyboard +++ b/DetoxInstruments/DetoxInstruments/About.storyboard @@ -1,9 +1,8 @@ - + - - + @@ -31,25 +30,40 @@ DQ - + - - - - - + + + + + + + + + + + + + + + + + + + + - + + + - + - - - + @@ -164,7 +178,7 @@ DQ - + @@ -199,6 +213,6 @@ DQ - + diff --git a/DetoxInstruments/DetoxInstruments/Acknowledgements.html b/DetoxInstruments/DetoxInstruments/Acknowledgements.html index 9d42079c..1beecd6f 100644 --- a/DetoxInstruments/DetoxInstruments/Acknowledgements.html +++ b/DetoxInstruments/DetoxInstruments/Acknowledgements.html @@ -1,10 +1,7 @@ - - Acknowledgements diff --git a/DetoxInstruments/DetoxInstruments/Controllers/DTXAcknowledgementsViewController.m b/DetoxInstruments/DetoxInstruments/Controllers/DTXAcknowledgementsViewController.m index 22100a51..8e4127cd 100644 --- a/DetoxInstruments/DetoxInstruments/Controllers/DTXAcknowledgementsViewController.m +++ b/DetoxInstruments/DetoxInstruments/Controllers/DTXAcknowledgementsViewController.m @@ -13,7 +13,8 @@ @interface DTXAcknowledgementsViewController () @end @implementation DTXAcknowledgementsViewController { - IBOutlet __weak WKWebView* _webView; +// IBOutlet __weak WKWebView* _webView; + IBOutlet __weak NSTextView* _textView; NSURL* _htmlURL; } @@ -23,20 +24,15 @@ - (void)viewDidLoad _htmlURL = [[NSBundle mainBundle] URLForResource:@"Acknowledgements" withExtension:@"html"]; - [_webView loadFileURL:_htmlURL allowingReadAccessToURL:_htmlURL]; - _webView.navigationDelegate = self; -} - -- (void)webView:(WKWebView *)webView decidePolicyForNavigationAction:(WKNavigationAction *)navigationAction decisionHandler:(void (^)(WKNavigationActionPolicy))decisionHandler; -{ - if([navigationAction.request.URL isEqualTo:_htmlURL]) - { - decisionHandler(WKNavigationActionPolicyAllow); - return; - } + NSMutableAttributedString* str = [[NSMutableAttributedString alloc] initWithData:[NSData dataWithContentsOfURL:_htmlURL] options:@{NSDocumentTypeDocumentOption: NSHTMLTextDocumentType, NSCharacterEncodingDocumentOption: @(NSUTF8StringEncoding)} documentAttributes:nil error:NULL]; + [str addAttributes:@{NSForegroundColorAttributeName: NSColor.textColor} range:NSMakeRange(0, str.length)]; + + [str enumerateAttributesInRange:NSMakeRange(0, str.length) options:0 usingBlock:^(NSDictionary * _Nonnull attrs, NSRange range, BOOL * _Nonnull stop) { + NSLog(@"%@", attrs); + }]; - [[NSWorkspace sharedWorkspace] openURL:navigationAction.request.URL]; - decisionHandler(WKNavigationActionPolicyCancel); + [_textView.textStorage appendAttributedString:str]; + _textView.textContainerInset = NSMakeSize(20, 20); } @end diff --git a/DetoxInstruments/DetoxInstruments/Info.plist b/DetoxInstruments/DetoxInstruments/Info.plist index 76e28749..511374f8 100644 --- a/DetoxInstruments/DetoxInstruments/Info.plist +++ b/DetoxInstruments/DetoxInstruments/Info.plist @@ -53,9 +53,9 @@ CFBundleShortVersionString 1.6 CFBundleVersion - 8308 + 8321 DTXBuildDate - 2018-12-04T17:58:03Z + 2018-12-05T16:51:22Z DTXSourceRoot $(DTXSRCROOT) LSMinimumSystemVersion diff --git a/Profiler/DTXProfiler/Info.plist b/Profiler/DTXProfiler/Info.plist index 5b0b7c2f..051d8ad0 100644 --- a/Profiler/DTXProfiler/Info.plist +++ b/Profiler/DTXProfiler/Info.plist @@ -17,9 +17,9 @@ CFBundleShortVersionString 1.6 CFBundleVersion - 8308 + 8321 DTXBuildDate - 2018-12-04T17:58:03Z + 2018-12-05T16:51:22Z NSPrincipalClass diff --git a/updateAcknowledgements.sh b/updateAcknowledgements.sh index 888359f5..52ddf6b9 100755 --- a/updateAcknowledgements.sh +++ b/updateAcknowledgements.sh @@ -38,13 +38,9 @@ done <<< "$SUBMODULES" TARGET_FILE=DetoxInstruments/DetoxInstruments/Acknowledgements.html echo '' > "${TARGET_FILE}" -echo '' >> "${TARGET_FILE}" -echo '' >> "${TARGET_FILE}" echo 'Acknowledgements' >> "${TARGET_FILE}"