From 39ad1632eb78e8c632d3e66711d09f2bb982a4e8 Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Fri, 1 Oct 2004 00:06:49 +0000 Subject: [project @ 2004-10-01 00:06:49 by jmb] Send HTTP referer header. This is _only_ sent when a link is clicked (theoretically, at least). svn path=/import/netsurf/; revision=1296 --- riscos/window.c | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) (limited to 'riscos/window.c') diff --git a/riscos/window.c b/riscos/window.c index 0ca060353..dd0d9dfad 100644 --- a/riscos/window.c +++ b/riscos/window.c @@ -762,6 +762,20 @@ void gui_window_set_url(struct gui_window *g, const char *url) } } +/** + * Get the contents of a window's address bar. + * + * \param g gui_window to update + * \return The url in the address bar or NULL + */ +char *gui_window_get_url(struct gui_window *g) +{ + if (!g->toolbar) + return NULL; + + return ro_gui_get_icon_string(g->toolbar->toolbar_handle, + ICON_TOOLBAR_URL); +} /** * Forces all windows to be set to the current theme @@ -818,7 +832,7 @@ void ro_gui_window_update_dimensions(struct gui_window *g, int yscroll) { return; } state.yscroll -= yscroll; - g->old_height = -1; + g->old_height = -1; ro_gui_window_open(g, (wimp_open *)&state); /* gui_window_redraw_window(g); */ } @@ -1085,7 +1099,7 @@ void ro_gui_toolbar_click(struct gui_window *g, wimp_pointer *pointer) if (option_homepage_url && option_homepage_url[0]) { if (pointer->buttons == wimp_CLICK_SELECT) { browser_window_go_post(g->bw, option_homepage_url, - 0, 0, true); + 0, 0, true, false); } else { browser_window_create(option_homepage_url, NULL); } @@ -1094,7 +1108,7 @@ void ro_gui_toolbar_click(struct gui_window *g, wimp_pointer *pointer) "file://Docs/intro_%s", option_language); if (pointer->buttons == wimp_CLICK_SELECT) { - browser_window_go_post(g->bw, url, 0, 0, true); + browser_window_go_post(g->bw, url, 0, 0, true, false); } else { browser_window_create(url, NULL); } @@ -1447,7 +1461,7 @@ bool ro_gui_window_keypress(struct gui_window *g, int key, bool toolbar) res = url_normalize(toolbar_url, &url); if (res == URL_FUNC_OK) { gui_window_set_url(g, url); - browser_window_go(g->bw, url); + browser_window_go(g->bw, url, false); free(url); } return true; -- cgit v1.2.3