Changeset 1030

Show
Ignore:
Timestamp:
11/02/07 00:01:47 (6 years ago)
Author:
cho45
Message:

lang/ruby/Chemr/CHMDocument.rb:

http も内部表示するように
ローカルに保存しないでキーワードインデックスだけつけるとき便利かも

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lang/ruby/Chemr/CHMDocument.rb

    r915 r1030  
    153153 
    154154        def browse(path) 
    155                 if path 
     155                return unless path 
     156                case path 
     157                when /^http:/ 
     158                        r = NSURLRequest.requestWithURL NSURL.URLWithString(path.to_s) 
     159                        log path 
     160                        @webview.mainFrame.loadRequest r 
     161                else 
    156162                        path = "/#{path}" unless path[0] == ?/ 
    157163                        h = @webview.stringByEvaluatingJavaScriptFromString("location.pathname+location.hash") 
     
    310316 
    311317        # webview policyDelegate 
    312         def webView_decidePolicyForNavigationAction_request_frame_decisionListener( 
    313                 sender, 
    314                 actionInformation, 
    315                 request, 
    316                 frame, 
    317                 listener 
    318         ) 
    319  
    320                 if CHMInternalURLProtocol.canHandleURL(request.URL) 
    321                         listener.use 
    322                 else 
    323                         NSWorkspace.sharedWorkspace.openURL(request.URL) 
    324                         listener.ignore 
    325                 end 
    326         end 
    327  
    328         def webView_decidePolicyForNewWindowAction_request_newFrameName_decisionListener( 
    329                 sender, 
    330                 actionInformation, 
    331                 request, 
    332                 frameName, 
    333                 listener 
    334         ) 
    335                 if CHMInternalURLProtocol.canHandleURL(request.URL) 
    336                         listener.use 
    337                 else 
    338                         NSWorkspace.sharedWorkspace.openURL(request.URL) 
    339                         listener.ignore 
    340                 end 
    341         end 
     318#       def webView_decidePolicyForNavigationAction_request_frame_decisionListener( 
     319#               sender, 
     320#               actionInformation, 
     321#               request, 
     322#               frame, 
     323#               listener 
     324#       ) 
     325# 
     326#               if CHMInternalURLProtocol.canHandleURL(request.URL) 
     327#                       listener.use 
     328#               else 
     329#                       NSWorkspace.sharedWorkspace.openURL(request.URL) 
     330#                       listener.ignore 
     331#               end 
     332#       end 
     333# 
     334#       def webView_decidePolicyForNewWindowAction_request_newFrameName_decisionListener( 
     335#               sender, 
     336#               actionInformation, 
     337#               request, 
     338#               frameName, 
     339#               listener 
     340#       ) 
     341#               if CHMInternalURLProtocol.canHandleURL(request.URL) 
     342#                       listener.use 
     343#               else 
     344#                       NSWorkspace.sharedWorkspace.openURL(request.URL) 
     345#                       listener.ignore 
     346#               end 
     347#       end 
    342348 
    343349        # webview loading delegate