From 2f67de688966b09136f1964f0317d29daa1cde92 Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Sat, 18 Oct 2014 17:56:45 +0100 Subject: It's silly to pass private core data around the front end, then fish out the frond then data from there, so don't. --- riscos/gui.h | 2 +- riscos/window.c | 12 ++++-------- 2 files changed, 5 insertions(+), 9 deletions(-) (limited to 'riscos') diff --git a/riscos/gui.h b/riscos/gui.h index e4a99ebc5..95b59c124 100644 --- a/riscos/gui.h +++ b/riscos/gui.h @@ -143,7 +143,7 @@ void ro_gui_window_quit(void); /* void ro_gui_window_close_all(void); */ #define ro_gui_window_close_all ro_gui_window_quit /* no need for a separate fn */ void ro_gui_throb(void); -void ro_gui_window_default_options(struct browser_window *bw); +void ro_gui_window_default_options(struct gui_window *gui); struct gui_window *ro_gui_window_lookup(wimp_w window); struct gui_window *ro_gui_toolbar_lookup(wimp_w window); bool ro_gui_window_to_window_pos(struct gui_window *g, int x, int y, diff --git a/riscos/window.c b/riscos/window.c index 125d54ce8..123b32322 100644 --- a/riscos/window.c +++ b/riscos/window.c @@ -2957,7 +2957,7 @@ bool ro_gui_window_menu_select(wimp_w w, wimp_i i, wimp_menu *menu, break; case BROWSER_SAVE_VIEW: if (bw != NULL) { - ro_gui_window_default_options(bw); + ro_gui_window_default_options(g); ro_gui_save_options(); } break; @@ -4534,16 +4534,12 @@ void ro_gui_window_clone_options( * \param bw the browser window to read options from */ -void ro_gui_window_default_options(struct browser_window *bw) +void ro_gui_window_default_options(struct gui_window *gui) { struct gui_window *gui; - assert(bw); - - /* Get our GUI - */ - gui = bw->window; - if (!gui) return; + if (gui == NULL) + return; /* Save the basic options */ -- cgit v1.2.3