summaryrefslogtreecommitdiff
path: root/atari/search.c
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2012-07-27 14:08:17 +0100
committerMichael Drake <tlsa@netsurf-browser.org>2012-07-27 14:08:17 +0100
commit72fe92d9ca0d3ba06c56cc258575e42102d502c6 (patch)
tree21169416bde287d6defc6d644299369a7e521707 /atari/search.c
parent41f88e693798a186f27a92f9ad087447a62f78d5 (diff)
parent7d011c62ff249161dfb03ee8ecf0716d41d3d353 (diff)
downloadnetsurf-72fe92d9ca0d3ba06c56cc258575e42102d502c6.tar.gz
netsurf-72fe92d9ca0d3ba06c56cc258575e42102d502c6.tar.bz2
Merge branch 'master' of git://git.netsurf-browser.org/netsurf
Diffstat (limited to 'atari/search.c')
-rw-r--r--atari/search.c24
1 files changed, 19 insertions, 5 deletions
diff --git a/atari/search.c b/atari/search.c
index 2717652a6..4d6f239bc 100644
--- a/atari/search.c
+++ b/atari/search.c
@@ -238,24 +238,38 @@ void search_destroy( struct gui_window * gw )
SEARCH_FORM_SESSION open_browser_search( struct gui_window * gw )
{
char * title;
- SEARCH_FORM_SESSION sfs;
+ SEARCH_FORM_SESSION sfs;
+ GRECT pos, treesize;
OBJECT * tree = get_tree(SEARCH);
if( tree == NULL ){
return( NULL );
- }
+ }
+
sfs = calloc(1, sizeof(struct s_search_form_session));
if( sfs == NULL )
return( NULL );
+
title = (char*)messages_get("FindTextNS");
if( title == NULL )
title = (char*)"Find text ...";
- search_destroy( gw );
- current = sfs;
+ search_destroy( gw );
+
+ /* setup dipslay position: right corner */
+ treesize.g_x = 0;
+ treesize.g_y = 0;
+ treesize.g_w = tree->ob_width;
+ treesize.g_h = tree->ob_height;
+ wind_calc_grect(WC_BORDER, WAT_FORM, &treesize, &pos);
+ pos.g_x = app.w - pos.g_w;
+ pos.g_y = app.h - pos.g_h;
+
+
+ current = sfs;
sfs->bw = gw->browser->bw;
sfs->formwind = mt_FormCreate( &app, tree, WAT_FORM,
NULL, title,
- NULL, true, false);
+ &pos, true, false);
ObjcAttachFormFunc( sfs->formwind, SEARCH_BT_SEARCH, evnt_bt_srch_click, NULL);
ObjcAttachFormFunc( sfs->formwind, SEARCH_CB_CASESENSE, evnt_cb_click, NULL);