From 6823d229eaacbf9e7ad5e7d8ca9904e6e1a9dd05 Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Sat, 25 Oct 2014 15:58:39 +0100 Subject: Reduce usage of bw internals. Add some TODOs for m0n0 to look at. --- atari/deskmenu.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/atari/deskmenu.c b/atari/deskmenu.c index 24f4caaed..427f38ad0 100644 --- a/atari/deskmenu.c +++ b/atari/deskmenu.c @@ -242,8 +242,13 @@ static void __CDECL menu_open_url(short item, short title, void *data) NULL, NULL, &bw); + /* TODO: Should not be accessing inside bw. */ gw = bw->window; } + + /* TODO: Can we do this stuff in gui_window_create, which is called + * in browser_window_create ? */ + /* Loose focus: */ window_set_focus(gw->root, WIDGET_NONE, NULL ); @@ -315,7 +320,8 @@ static void __CDECL menu_save_page(short item, short title, void *data) } while ((is_folder == false) && (path != NULL)); if( path != NULL ){ - save_complete(input_window->browser->bw->current_content, path, NULL); + save_complete(browser_window_get_content( + input_window->browser->bw), path, NULL); } } @@ -513,9 +519,9 @@ static void __CDECL menu_add_bookmark(short item, short title, void *data) { LOG(("%s", __FUNCTION__)); if (input_window) { - if( input_window->browser->bw->current_content != NULL ){ + if( browser_window_has_content(input_window->browser->bw) ){ atari_hotlist_add_page( - nsurl_access(hlcache_handle_get_url(input_window->browser->bw->current_content)), + nsurl_access(browser_window_get_url(input_window->browser->bw)), NULL ); } -- cgit v1.2.3