From 00af899230a655f978be456884b452cafdb2f70f Mon Sep 17 00:00:00 2001 From: Richard Wilson Date: Sat, 7 Apr 2007 23:08:31 +0000 Subject: Open window targets with a new name in a new window. Fix handling of Adjust-click on a form submit when new window opening is disabled. svn path=/trunk/netsurf/; revision=3248 --- desktop/frames.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'desktop/frames.c') diff --git a/desktop/frames.c b/desktop/frames.c index da9ef7489..8861c7a5c 100644 --- a/desktop/frames.c +++ b/desktop/frames.c @@ -80,9 +80,12 @@ void browser_window_create_iframes(struct browser_window *bw, window->no_resize = true; window->margin_width = cur->margin_width; window->margin_height = cur->margin_height; - if (cur->name) + if (cur->name) { window->name = strdup(cur->name); - + if (!cur->name) + warn_user("NoMemory", 0); + } + /* linking */ window->box = cur->box; window->parent = bw; @@ -189,14 +192,22 @@ void browser_window_create_frameset(struct browser_window *bw, window->frame_height = frame->height; window->margin_width = frame->margin_width; window->margin_height = frame->margin_height; - if (frame->name) + if (frame->name) { window->name = strdup(frame->name); + if (!window->name) + warn_user("NoMemory", 0); + } /* linking */ window->parent = bw; /* gui window */ window->window = gui_create_browser_window(window, bw); + + if (window->name) + LOG(("Created frame '%s'", window->name)); + else + LOG(("Created frame (unnamed)")); } } -- cgit v1.2.3