Fix up for nsurl changes. Untested.

svn path=/trunk/netsurf/; revision=12930
This commit is contained in:
Michael Drake 2011-10-03 16:49:55 +00:00
parent 7dc000e643
commit 817841eab3
4 changed files with 5 additions and 5 deletions

View File

@ -142,7 +142,7 @@ static const char *cocoa_hotlist_path( void )
{ {
struct browser_window *bw = [[(NetSurfApp *)NSApp frontTab] browser]; struct browser_window *bw = [[(NetSurfApp *)NSApp frontTab] browser];
if (bw && bw->current_content) { if (bw && bw->current_content) {
const char *url = content_get_url( bw->current_content ); const char *url = nsurl_access(content_get_url( bw->current_content ));
hotlist_add_page( url ); hotlist_add_page( url );
} }
} }

View File

@ -521,7 +521,7 @@ static browser_mouse_state cocoa_mouse_flags_for_event( NSEvent *evt )
browser_window_get_contextual_content( browser, point.x, point.y, &cont); browser_window_get_contextual_content( browser, point.x, point.y, &cont);
if (cont.object != NULL) { if (cont.object != NULL) {
NSString *imageURL = [NSString stringWithUTF8String: content_get_url( cont.object )]; NSString *imageURL = [NSString stringWithUTF8String: nsurl_access(content_get_url( cont.object ))];
[[popupMenu addItemWithTitle: NSLocalizedString( @"Open image in new tab", @"Context menu" ) [[popupMenu addItemWithTitle: NSLocalizedString( @"Open image in new tab", @"Context menu" )
action: @selector(cmOpenURLInTab:) action: @selector(cmOpenURLInTab:)

View File

@ -145,10 +145,10 @@
/* try to load local files directly. */ /* try to load local files directly. */
char *scheme; char *scheme;
if (url_scheme(content_get_url(content), &scheme) != URL_FUNC_OK) if (url_scheme(nsurl_access(content_get_url(content)), &scheme) != URL_FUNC_OK)
return; return;
if (strcmp(scheme, "file") == 0) if (strcmp(scheme, "file") == 0)
path = url_to_path(content_get_url(content)); path = url_to_path(nsurl_access(content_get_url(content)));
free(scheme); free(scheme);
if (path == NULL) { if (path == NULL) {

View File

@ -38,7 +38,7 @@
- (IBAction) useCurrentPageAsHomepage: (id) sender; - (IBAction) useCurrentPageAsHomepage: (id) sender;
{ {
struct browser_window *bw = [[(NetSurfApp *)NSApp frontTab] browser]; struct browser_window *bw = [[(NetSurfApp *)NSApp frontTab] browser];
const char *url = content_get_url( bw->current_content ); const char *url = nsurl_access(content_get_url( bw->current_content ));
[self setHomepageURL: [NSString stringWithUTF8String: url]]; [self setHomepageURL: [NSString stringWithUTF8String: url]];
} }