From d18c8ed4521714c3fff3cca64685b8192ca0e075 Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Mon, 13 Jan 2014 22:54:19 +0000 Subject: move teh final optional window operations into the table --- riscos/gui.c | 7 ------- riscos/save.c | 4 ++-- riscos/save.h | 3 +++ riscos/textselection.c | 14 -------------- riscos/textselection.h | 2 ++ riscos/window.c | 7 +++++++ 6 files changed, 14 insertions(+), 23 deletions(-) (limited to 'riscos') diff --git a/riscos/gui.c b/riscos/gui.c index 2854744df..f7caf02da 100644 --- a/riscos/gui.c +++ b/riscos/gui.c @@ -2432,10 +2432,3 @@ bool path_add_part(char *path, int length, const char *newpart) return true; } -void gui_file_gadget_open(struct gui_window *g, hlcache_handle *hl, - struct form_control *gadget) -{ - LOG(("File open dialog rquest for %p/%p", g, gadget)); - /* browser_window_set_gadget_filename(bw, gadget, "filename"); */ -} - diff --git a/riscos/save.c b/riscos/save.c index 4d1740397..59222c49a 100644 --- a/riscos/save.c +++ b/riscos/save.c @@ -357,8 +357,8 @@ bool ro_gui_save_ok(wimp_w w) * \param g gui window */ -void gui_drag_save_object(gui_save_type save_type, hlcache_handle *c, - struct gui_window *g) +void gui_drag_save_object(struct gui_window *g, hlcache_handle *c, + gui_save_type save_type) { wimp_pointer pointer; char icon_buf[20]; diff --git a/riscos/save.h b/riscos/save.h index 34a4a6ba9..0c917664a 100644 --- a/riscos/save.h +++ b/riscos/save.h @@ -27,6 +27,9 @@ #include "oslib/wimp.h" #include "desktop/gui.h" +void gui_drag_save_object(struct gui_window *g, hlcache_handle *c, gui_save_type save_type); +void gui_drag_save_selection(struct gui_window *g, const char *selection); + wimp_w ro_gui_saveas_create(const char *template_name); void ro_gui_saveas_quit(void); void ro_gui_save_prepare(gui_save_type save_type, struct hlcache_handle *h, diff --git a/riscos/textselection.c b/riscos/textselection.c index ab8ea5c3a..73b5246e3 100644 --- a/riscos/textselection.c +++ b/riscos/textselection.c @@ -186,20 +186,6 @@ static void ro_gui_selection_drag_end(wimp_dragged *drag, void *data) browser_window_mouse_track(g->bw, 0, pos.x, pos.y); } - -/** - * Perform tasks after a selection has been cleared. - * - * \param g gui window - */ - -void gui_clear_selection(struct gui_window *g) -{ - /* Refresh any open menu, in case it's the browser window menu. */ - ro_gui_menu_refresh(0); -} - - /** * Core tells front end to put given text in clipboard * diff --git a/riscos/textselection.h b/riscos/textselection.h index c6f96f0e9..a4f436ddc 100644 --- a/riscos/textselection.h +++ b/riscos/textselection.h @@ -26,6 +26,8 @@ #include "oslib/wimp.h" #include "desktop/gui.h" +void gui_start_selection(struct gui_window *g); + typedef void (*ro_gui_selection_prepare_paste_cb)(void *pw); void ro_gui_selection_prepare_paste(wimp_w w, diff --git a/riscos/window.c b/riscos/window.c index feb7f8979..e4c515c36 100644 --- a/riscos/window.c +++ b/riscos/window.c @@ -5265,6 +5265,13 @@ static struct gui_window_table gui_window_table = { .new_content = gui_window_new_content, .start_throbber = gui_window_start_throbber, .stop_throbber = gui_window_stop_throbber, + + /* from save */ + .drag_save_object = gui_drag_save_object, + .drag_save_selection =gui_drag_save_selection, + + /* from textselection */ + .start_selection = gui_start_selection, }; struct gui_window_table *riscos_gui_window_table = &gui_window_table; -- cgit v1.2.3