From a481e5965a922e5257fe591b7c35691d1e5d3c93 Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Fri, 21 Nov 2014 12:32:46 +0000 Subject: remove atari need to use browser internal data structures --- atari/deskmenu.c | 17 +---------------- atari/gui.c | 9 +++++++++ 2 files changed, 10 insertions(+), 16 deletions(-) (limited to 'atari') diff --git a/atari/deskmenu.c b/atari/deskmenu.c index e5522ea68..c151ef559 100644 --- a/atari/deskmenu.c +++ b/atari/deskmenu.c @@ -22,7 +22,7 @@ #include "utils/log.h" #include "utils/messages.h" #include "utils/nsoption.h" -#include "desktop/browser_private.h" +#include "desktop/browser.h" #include "desktop/save_complete.h" #include "atari/res/netsurf.rsh" @@ -242,22 +242,7 @@ 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 ); - - /* trigger on-focus event (select all text): */ - window_set_focus(gw->root, URL_WIDGET, NULL); - - /* delete selection: */ - toolbar_key_input(gw->root->toolbar, NK_DEL); } static void __CDECL menu_open_file(short item, short title, void *data) diff --git a/atari/gui.c b/atari/gui.c index b56e110bc..3cd22e649 100644 --- a/atari/gui.c +++ b/atari/gui.c @@ -242,6 +242,15 @@ gui_window_create(struct browser_window *bw, gw->next = NULL; } + /* Loose focus: */ + window_set_focus(gw->root, WIDGET_NONE, NULL ); + + /* trigger on-focus event (select all text): */ + window_set_focus(gw->root, URL_WIDGET, NULL); + + /* delete selection: */ + toolbar_key_input(gw->root->toolbar, NK_DEL); + return( gw ); } -- cgit v1.2.3