From b51816c222dded2095fc2d5c1581575540095f43 Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Tue, 14 Aug 2012 13:41:30 +0100 Subject: Clean up search gui callbacks. --- atari/search.c | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) (limited to 'atari/search.c') diff --git a/atari/search.c b/atari/search.c index 4d6f239bc..f2e2383f0 100644 --- a/atari/search.c +++ b/atari/search.c @@ -30,7 +30,7 @@ static void nsatari_search_add_recent(const char *string, void *p); void nsatari_search_set_forward_state(bool active, void *p); void nsatari_search_set_back_state(bool active, void *p); -static struct search_callbacks nsatari_search_callbacks = { +static struct gui_search_callbacks nsatari_search_callbacks = { nsatari_search_set_forward_state, nsatari_search_set_back_state, nsatari_search_set_status, @@ -238,34 +238,34 @@ 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 ); - - /* 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; + 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, -- cgit v1.2.3