remove atari need to use browser internal data structures

This commit is contained in:
Vincent Sanders 2014-11-21 12:32:46 +00:00
parent 3ff4846c1a
commit a481e5965a
2 changed files with 10 additions and 16 deletions

View File

@ -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)

View File

@ -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 );
}