summaryrefslogtreecommitdiff
path: root/atari/gui.c
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2014-11-02 22:30:45 +0000
committerVincent Sanders <vince@kyllikki.org>2014-11-02 22:30:45 +0000
commitc14ddad660d3c07f8dbdc8f8db902e5767821d9c (patch)
tree3cc9e9b437b9409185dbde7f9dce236c5b31b18e /atari/gui.c
parent03abea12a76db9be29c6a56e453cadebc05983d6 (diff)
downloadnetsurf-c14ddad660d3c07f8dbdc8f8db902e5767821d9c.tar.gz
netsurf-c14ddad660d3c07f8dbdc8f8db902e5767821d9c.tar.bz2
change url setting api to take an nsurl instead of a text string
Diffstat (limited to 'atari/gui.c')
-rw-r--r--atari/gui.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/atari/gui.c b/atari/gui.c
index cb071a161..c077df895 100644
--- a/atari/gui.c
+++ b/atari/gui.c
@@ -115,7 +115,7 @@ EVMULT_OUT aes_event_out;
short aes_msg_out[8];
bool gui_window_get_scroll(struct gui_window *w, int *sx, int *sy);
-static nserror gui_window_set_url(struct gui_window *w, const char *url);
+static nserror gui_window_set_url(struct gui_window *w, nsurl *url);
/**
* Core atari event processing.
@@ -220,7 +220,7 @@ gui_window_create(struct browser_window *bw,
option_window_x, option_window_y,
option_window_width, option_window_height
};
- gui_window_set_url(gw, "");
+ gui_window_set_url(gw, corestring_nsurl_about_blank);
gui_window_set_pointer(gw, BROWSER_POINTER_DEFAULT);
gui_set_input_gui_window(gw);
window_open(gw->root, gw, pos);
@@ -553,24 +553,24 @@ void gui_window_set_pointer(struct gui_window *gw, gui_pointer_shape shape)
}
-static nserror gui_window_set_url(struct gui_window *w, const char *url)
+static nserror gui_window_set_url(struct gui_window *w, nsurl *url)
{
int l;
if (w == NULL)
return;
- l = strlen(url)+1;
+ l = strlen(nsurl_access(url))+1;
if (w->url == NULL) {
w->url = malloc(l);
} else {
w->url = realloc(w->url, l);
}
- strncpy(w->url, url, l);
+ strncpy(w->url, nsurl_access(url), l);
w->url[l] = 0;
if(input_window == w->root->active_gui_window) {
- toolbar_set_url(w->root->toolbar, url);
+ toolbar_set_url(w->root->toolbar, nsurl_access(url));
}
return NSERROR_OK;