From 8c60d38769b360742e520e288617c4ba1a4fea0f Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Sun, 11 Nov 2012 20:14:18 +0000 Subject: Can't clone a content that gets reflowed for a viewport size. --- image/svg.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/image/svg.c b/image/svg.c index 54a48083b..76be76ac2 100644 --- a/image/svg.c +++ b/image/svg.c @@ -138,6 +138,9 @@ static void svg_reformat(struct content *c, int width, int height) svgtiny_parse(svg->diagram, source_data, source_size, nsurl_access(content_get_url(c)), width, height); + + svg->current_width = width; + svg->current_height = height; } c->width = svg->diagram->width; @@ -335,7 +338,7 @@ static const content_handler svg_content_handler = { .redraw = svg_redraw, .clone = svg_clone, .type = svg_content_type, - .no_share = false, + .no_share = true }; static const char *svg_types[] = { -- cgit v1.2.3 From adcbfb9789acf7035d973c35bcc65999261a75e8 Mon Sep 17 00:00:00 2001 From: Chris Young Date: Sun, 11 Nov 2012 22:49:18 +0000 Subject: Fix options GUI cleanup (credit: Gazelle) --- amiga/gui_options.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/amiga/gui_options.c b/amiga/gui_options.c index b7c69ffeb..21ca8b73d 100755 --- a/amiga/gui_options.c +++ b/amiga/gui_options.c @@ -355,19 +355,19 @@ void ami_gui_opts_free(void) { int i; - for(i = 0; i++; i < OPTS_LAST) + for(i = 0; i < OPTS_LAST; i++) if(gadlab[i]) FreeVec((APTR)gadlab[i]); - for(i = 0; i++; i < OPTS_MAX_TABS) + for(i = 0; i < OPTS_MAX_TABS; i++) if(tabs[i]) FreeVec((APTR)tabs[i]); - for(i = 0; i++; i < OPTS_MAX_SCREEN) + for(i = 0; i < OPTS_MAX_SCREEN; i++) if(screenopts[i]) FreeVec((APTR)screenopts[i]); - for(i = 0; i++; i < OPTS_MAX_PROXY) + for(i = 0; i < OPTS_MAX_PROXY; i++) if(proxyopts[i]) FreeVec((APTR)proxyopts[i]); - for(i = 0; i++; i < OPTS_MAX_NATIVEBM) + for(i = 0; i < OPTS_MAX_NATIVEBM; i++) if(nativebmopts[i]) FreeVec((APTR)nativebmopts[i]); ami_gui_opts_websearch_free(websearch_list); -- cgit v1.2.3 From 967d22afe5aef519e3fcc858747705895e0a3e6b Mon Sep 17 00:00:00 2001 From: Chris Young Date: Sun, 11 Nov 2012 23:05:25 +0000 Subject: These were allocated with c lib functions, not AllocVec --- amiga/gui_options.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/amiga/gui_options.c b/amiga/gui_options.c index 21ca8b73d..27b3c6314 100755 --- a/amiga/gui_options.c +++ b/amiga/gui_options.c @@ -356,19 +356,19 @@ void ami_gui_opts_free(void) int i; for(i = 0; i < OPTS_LAST; i++) - if(gadlab[i]) FreeVec((APTR)gadlab[i]); + if(gadlab[i]) free((APTR)gadlab[i]); for(i = 0; i < OPTS_MAX_TABS; i++) - if(tabs[i]) FreeVec((APTR)tabs[i]); + if(tabs[i]) free((APTR)tabs[i]); for(i = 0; i < OPTS_MAX_SCREEN; i++) - if(screenopts[i]) FreeVec((APTR)screenopts[i]); + if(screenopts[i]) free((APTR)screenopts[i]); for(i = 0; i < OPTS_MAX_PROXY; i++) - if(proxyopts[i]) FreeVec((APTR)proxyopts[i]); + if(proxyopts[i]) free((APTR)proxyopts[i]); for(i = 0; i < OPTS_MAX_NATIVEBM; i++) - if(nativebmopts[i]) FreeVec((APTR)nativebmopts[i]); + if(nativebmopts[i]) free((APTR)nativebmopts[i]); ami_gui_opts_websearch_free(websearch_list); } -- cgit v1.2.3 From 6641b082f8b003dbc887003776c060f3d53c95c7 Mon Sep 17 00:00:00 2001 From: Chris Young Date: Sun, 11 Nov 2012 23:17:00 +0000 Subject: Fix the display of the drag save icon --- amiga/gui.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/amiga/gui.c b/amiga/gui.c index 37f054776..293379283 100755 --- a/amiga/gui.c +++ b/amiga/gui.c @@ -1365,24 +1365,24 @@ void ami_handle_msg(void) width=bbox->Width; height=bbox->Height; - if(gwin->mouse_state & BROWSER_MOUSE_DRAG_ON && - ((gwin->bw->drag_type == DRAGGING_SELECTION) || - ami_autoscroll == TRUE)) + if(gwin->mouse_state & BROWSER_MOUSE_DRAG_ON) { ami_drag_icon_move(); - if((gwin->win->MouseX < bbox->Left) && - ((gwin->win->MouseX - bbox->Left) > -AMI_DRAG_THRESHOLD)) - drag_x_move = gwin->win->MouseX - bbox->Left; - if((gwin->win->MouseX > (bbox->Left + bbox->Width)) && - ((gwin->win->MouseX - (bbox->Left + bbox->Width)) < AMI_DRAG_THRESHOLD)) - drag_x_move = gwin->win->MouseX - (bbox->Left + bbox->Width); - if((gwin->win->MouseY < bbox->Top) && - ((gwin->win->MouseY - bbox->Top) > -AMI_DRAG_THRESHOLD)) - drag_y_move = gwin->win->MouseY - bbox->Top; - if((gwin->win->MouseY > (bbox->Top + bbox->Height)) && - ((gwin->win->MouseY - (bbox->Top + bbox->Height)) < AMI_DRAG_THRESHOLD)) - drag_y_move = gwin->win->MouseY - (bbox->Top + bbox->Height); + if(ami_autoscroll == TRUE) { + if((gwin->win->MouseX < bbox->Left) && + ((gwin->win->MouseX - bbox->Left) > -AMI_DRAG_THRESHOLD)) + drag_x_move = gwin->win->MouseX - bbox->Left; + if((gwin->win->MouseX > (bbox->Left + bbox->Width)) && + ((gwin->win->MouseX - (bbox->Left + bbox->Width)) < AMI_DRAG_THRESHOLD)) + drag_x_move = gwin->win->MouseX - (bbox->Left + bbox->Width); + if((gwin->win->MouseY < bbox->Top) && + ((gwin->win->MouseY - bbox->Top) > -AMI_DRAG_THRESHOLD)) + drag_y_move = gwin->win->MouseY - bbox->Top; + if((gwin->win->MouseY > (bbox->Top + bbox->Height)) && + ((gwin->win->MouseY - (bbox->Top + bbox->Height)) < AMI_DRAG_THRESHOLD)) + drag_y_move = gwin->win->MouseY - (bbox->Top + bbox->Height); + } } if((x>=xs) && (y>=ys) && (x