summaryrefslogtreecommitdiff
path: root/riscos/save.c
diff options
context:
space:
mode:
authorSteve Fryatt <stevef@netsurf-browser.org>2013-09-08 15:51:29 +0100
committerSteve Fryatt <stevef@netsurf-browser.org>2013-09-08 15:51:29 +0100
commitf3f2c5b481c519d0ef4e501aa07c70baaaf7d86f (patch)
treeeac1b9e47e4824e35bc223bf16118c706e7589e3 /riscos/save.c
parentee8fb6f39f3014cf4e4c17a28904850a58f2f4f3 (diff)
downloadnetsurf-f3f2c5b481c519d0ef4e501aa07c70baaaf7d86f.tar.gz
netsurf-f3f2c5b481c519d0ef4e501aa07c70baaaf7d86f.tar.bz2
gui_current_drag_type now only used for data transfer protocol routing; fix button bar drag handler.
Remove all references to gui_current_drag_type outside of gui.c which are not related to routing DataSaveAck messages. Update button bar drag code so that it uses ro_mouse.
Diffstat (limited to 'riscos/save.c')
-rw-r--r--riscos/save.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/riscos/save.c b/riscos/save.c
index ffda9c69a..511af91f5 100644
--- a/riscos/save.c
+++ b/riscos/save.c
@@ -306,7 +306,6 @@ void ro_gui_save_start_drag(wimp_pointer *pointer)
y = (istate.icon.extent.y1 + istate.icon.extent.y0)/2 +
wstate.visible.y1 - wstate.yscroll;
}
- gui_current_drag_type = GUI_DRAG_SAVE;
ro_mouse_drag_start(ro_gui_save_drag_end, NULL, NULL, NULL);
gui_save_sourcew = pointer->w;
saving_from_dialog = true;
@@ -384,7 +383,6 @@ void gui_drag_save_object(gui_save_type save_type, hlcache_handle *c,
save_leafname, LEAFNAME_MAX,
icon_buf, sizeof(icon_buf));
- gui_current_drag_type = GUI_DRAG_SAVE;
ro_mouse_drag_start(ro_gui_save_drag_end, NULL, NULL, NULL);
ro_gui_drag_icon(pointer.pos.x, pointer.pos.y, icon_buf);
@@ -433,7 +431,6 @@ void gui_drag_save_selection(struct gui_window *g, const char *selection)
save_leafname, LEAFNAME_MAX,
icon_buf, sizeof(icon_buf));
- gui_current_drag_type = GUI_DRAG_SAVE;
ro_mouse_drag_start(ro_gui_save_drag_end, NULL, NULL, NULL);
ro_gui_drag_icon(pointer.pos.x, pointer.pos.y, icon_buf);
@@ -478,7 +475,6 @@ void ro_gui_drag_save_link(gui_save_type save_type, const char *url,
ro_gui_save_set_state(NULL, save_type, url, save_leafname, LEAFNAME_MAX,
icon_buf, sizeof(icon_buf));
- gui_current_drag_type = GUI_DRAG_SAVE;
ro_mouse_drag_start(ro_gui_save_drag_end, NULL, NULL, NULL);
ro_gui_drag_icon(pointer.pos.x, pointer.pos.y, icon_buf);
@@ -646,11 +642,8 @@ static void ro_gui_save_drag_end(wimp_dragged *drag, void *data)
dest_ok = browser_window_drop_file_at_point(g->bw,
pos.x, pos.y, NULL);
}
- if (!dest_ok) {
- /* cancel the drag operation */
- gui_current_drag_type = GUI_DRAG_NONE;
+ if (!dest_ok)
return;
- }
}
if (!saving_from_dialog) {
@@ -700,6 +693,8 @@ static void ro_gui_save_drag_end(wimp_dragged *drag, void *data)
ro_message_send_message_to_window(wimp_USER_MESSAGE_RECORDED, &message,
pointer.w, pointer.i, ro_gui_save_bounced, NULL);
+ gui_current_drag_type = GUI_DRAG_SAVE;
+
free(local_name);
}