Revision: 29462
          http://sourceforge.net/p/bibdesk/svn/29462
Author:   hofman
Date:     2025-08-25 08:53:06 +0000 (Mon, 25 Aug 2025)
Log Message:
-----------
reuse method

Modified Paths:
--------------
    trunk/bibdesk/BDSKTextImportController.m

Modified: trunk/bibdesk/BDSKTextImportController.m
===================================================================
--- trunk/bibdesk/BDSKTextImportController.m    2025-08-25 08:51:00 UTC (rev 
29461)
+++ trunk/bibdesk/BDSKTextImportController.m    2025-08-25 08:53:06 UTC (rev 
29462)
@@ -990,7 +990,7 @@
     [forwardButton setEnabled:[webView canGoForward]];
 }
 
-- (void)webView:(WKWebView *)aWebView 
didFailProvisionalNavigation:(WKNavigation *)navigation withError:(NSError 
*)error {
+- (void)webView:(WKWebView *)aWebView didFailNavigation:(WKNavigation 
*)navigation withError:(NSError *)error {
     [self setLoading:[webView isLoading]];
     [backButton setEnabled:[webView canGoBack]];
     [forwardButton setEnabled:[webView canGoForward]];
@@ -1002,16 +1002,8 @@
     }
 }
 
-- (void)webView:(WKWebView *)aWebView didFailNavigation:(WKNavigation 
*)navigation withError:(NSError *)error {
-    [self setLoading:[webView isLoading]];
-    [backButton setEnabled:[webView canGoBack]];
-    [forwardButton setEnabled:[webView canGoForward]];
-    
-    if ([[error domain] isEqualToString:NSURLErrorDomain] == NO || [error 
code] != NSURLErrorCancelled) {
-        NSURL *url = [webView URL];
-        NSString *errorHTML = [NSString 
stringWithFormat:@"<html><head><title>%@</title></head><body><h1>%@</h1></body></html>",
 NSLocalizedString(@"Error", @"Placeholder web group label"), [error 
localizedDescription]];
-        [webView loadHTMLString:errorHTML baseURL:url];
-    }
+- (void)webView:(WKWebView *)aWebView 
didFailProvisionalNavigation:(WKNavigation *)navigation withError:(NSError 
*)error {
+    [self webView:aWebView didFailNavigation:navigation withError:error];
 }
 
 - (void)webView:(WKWebView *)aWebView 
decidePolicyForNavigationResponse:(WKNavigationResponse *)navigationResponse 
decisionHandler:(void (^)(WKNavigationResponsePolicy))decisionHandler {

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.



_______________________________________________
Bibdesk-commit mailing list
Bibdesk-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bibdesk-commit

Reply via email to