minor edits
This commit is contained in:
parent
51f7304486
commit
4664d6a1d4
|
@ -42,12 +42,7 @@ static nserror set_defaults(struct nsoption_s *defaults)
|
|||
struct nsurl *url;
|
||||
nserror error;
|
||||
|
||||
if (nsoption_charp(homepage_url) != NULL) {
|
||||
error = nsurl_create(nsoption_charp(homepage_url), &url);
|
||||
} else {
|
||||
NSLog(@"opening default page %s", NETSURF_HOMEPAGE);
|
||||
error = nsurl_create(NETSURF_HOMEPAGE, &url);
|
||||
}
|
||||
error = nsurl_create("https://www.startpage.com", &url);
|
||||
|
||||
if (error == NSERROR_OK) {
|
||||
error = browser_window_create(BW_CREATE_HISTORY, url, NULL, NULL, NULL);
|
||||
|
|
|
@ -9,6 +9,7 @@ struct browser_window;
|
|||
id scrollView;
|
||||
id urlBar;
|
||||
struct browser_window *browser;
|
||||
id plotView;
|
||||
}
|
||||
|
||||
-(id)initWithBrowser: (struct browser_window*)aBrowser;
|
||||
|
|
|
@ -1,8 +1,10 @@
|
|||
/* All Rights reserved */
|
||||
|
||||
#include <AppKit/AppKit.h>
|
||||
#include "BrowserWindowController.h"
|
||||
#include "PlotView.h"
|
||||
#import <AppKit/AppKit.h>
|
||||
#import "BrowserWindowController.h"
|
||||
#import "PlotView.h"
|
||||
#import "netsurf/browser_window.h"
|
||||
#import "utils/nsurl.h"
|
||||
|
||||
@implementation BrowserWindowController
|
||||
|
||||
|
@ -14,7 +16,7 @@
|
|||
}
|
||||
|
||||
-(void)awakeFromNib {
|
||||
PlotView *plotView = [[PlotView alloc] initWithFrame: NSMakeRect(0, 0, 1000, 1000)];
|
||||
plotView = [[PlotView alloc] initWithFrame: NSMakeRect(0, 0, 1000, 1000)];
|
||||
[plotView setBrowser: browser];
|
||||
[[scrollView contentView] addSubview: plotView];
|
||||
NSLog(@"Browser window loaded");
|
||||
|
@ -22,6 +24,17 @@
|
|||
|
||||
-(id)back: (id)sender {
|
||||
NSLog(@"Browser backward");
|
||||
[plotView display];
|
||||
bool ready = browser_window_redraw_ready(browser);
|
||||
if (ready) {
|
||||
NSLog(@"redraw ready!");
|
||||
}
|
||||
if (browser_window_has_content(browser)) {
|
||||
NSLog(@"has content");
|
||||
}
|
||||
struct nsurl *url = browser_window_access_url(browser);
|
||||
NSLog(@"url: '%s'", nsurl_access(url));
|
||||
|
||||
}
|
||||
|
||||
-(id)forward: (id)sender {
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
|
||||
// Return the MIME type of the specified file. Returned string can be inval on next req.
|
||||
static const char *gnustep_fetch_filetype(const char *unix_path) {
|
||||
NSLog(@"gnustep_fetch_filetype");
|
||||
static char filetype[100];
|
||||
filetype[0] = '\0';
|
||||
return filetype;
|
||||
|
|
|
@ -14,7 +14,7 @@ static nserror gnustep_misc_schedule(int t, void (*callback)(void *p), void *p)
|
|||
NSLog(@"gnustep_misc_schedule in %dms", t);
|
||||
NetsurfCallback *nsCallback = [NetsurfCallback newOrScheduledWithFunctionPointer:
|
||||
callback parameter: p];
|
||||
if (t < 1) {
|
||||
if (t < 0) {
|
||||
[nsCallback cancel];
|
||||
return NSERROR_OK;
|
||||
} else {
|
||||
|
|
|
@ -70,6 +70,7 @@ static nserror gnustep_window_event(struct gui_window *gw, enum gui_window_event
|
|||
NSLog(@"GW_EVENT_STOP_THROBBER");
|
||||
break;
|
||||
default:
|
||||
NSLog(@"Unknown window event.");
|
||||
break;
|
||||
}
|
||||
return NSERROR_OK;
|
||||
|
|
Loading…
Reference in New Issue