From e1c41ba7121435a454b766ccfcba8bed905047bf Mon Sep 17 00:00:00 2001 From: Chris Young Date: Sun, 14 Feb 2010 12:51:30 +0000 Subject: [PATCH] New window/tab now opens a blank window/tab rather than one showing the current URL svn path=/trunk/netsurf/; revision=10051 --- amiga/gui.c | 14 ++++++++------ amiga/menu.c | 4 ++-- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/amiga/gui.c b/amiga/gui.c index 30f1e836a..02f68d70d 100755 --- a/amiga/gui.c +++ b/amiga/gui.c @@ -1296,14 +1296,14 @@ void ami_handle_msg(void) { case 'n': if(option_kiosk_mode == false) - browser_window_create(gwin->bw->current_content->url, - gwin->bw, 0, true, false); + browser_window_create(NULL, gwin->bw, + 0, true, false); break; case 't': if(option_kiosk_mode == false) - browser_window_create(gwin->bw->current_content->url, - gwin->bw, 0, true, true); + browser_window_create(NULL, gwin->bw, + 0, true, true); break; case 'k': @@ -1877,6 +1877,9 @@ void ami_switch_tab(struct gui_window_2 *gwin,bool redraw) if(!gwin->bw->current_content) { + RefreshSetGadgetAttrs((struct Gadget *)gwin->objects[GID_URL], + gwin->win, NULL, STRINGA_TextVal, "", TAG_DONE); + p96RectFill(gwin->win->RPort, bbox->Left, bbox->Top, bbox->Width+bbox->Left, bbox->Height+bbox->Top, 0xffffffff); return; @@ -1895,8 +1898,7 @@ void ami_switch_tab(struct gui_window_2 *gwin,bool redraw) gui_window_set_scroll(gwin->bw->window,gwin->bw->window->scrollx,gwin->bw->window->scrolly); gwin->redraw_scroll = false; - if(gwin->bw->current_content) - browser_window_refresh_url_bar(gwin->bw,gwin->bw->current_content->url, + browser_window_refresh_url_bar(gwin->bw,gwin->bw->current_content->url, gwin->bw->frag_id); } } diff --git a/amiga/menu.c b/amiga/menu.c index a4fd1eccf..624c21071 100755 --- a/amiga/menu.c +++ b/amiga/menu.c @@ -427,11 +427,11 @@ void ami_menupick(ULONG code,struct gui_window_2 *gwin,struct MenuItem *item) switch(itemnum) { case 0: // new window - bw = browser_window_create(gwin->bw->current_content->url,gwin->bw, 0, true, openwin); + bw = browser_window_create(NULL, gwin->bw, 0, true, openwin); break; case 1: // new tab - bw = browser_window_create(gwin->bw->current_content->url,gwin->bw, 0, true, opentab); + bw = browser_window_create(NULL, gwin->bw, 0, true, opentab); break; case 3: // open local file