summaryrefslogtreecommitdiff
path: root/atari/search.c
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2013-05-07 14:41:40 +0100
committerMichael Drake <tlsa@netsurf-browser.org>2013-05-07 14:41:40 +0100
commit3afd9c97310d58c0c6588d18887244328590731e (patch)
tree133917633f801613e8742d8b313faee3c4f47e71 /atari/search.c
parent0647d69a8b8663fcc09af118dde6b256624fe232 (diff)
downloadnetsurf-3afd9c97310d58c0c6588d18887244328590731e.tar.gz
netsurf-3afd9c97310d58c0c6588d18887244328590731e.tar.bz2
Remove search context from browser window, simplify search interface for front ends.
Added content interface for search. Removed bw->cur_search search context. Desktop layer now does nothing except pass search requests from front end onto the bw's current_content via the content interface. Search API reduced to a pair of functions at each level: {desktop|content|html|textplain}_search and {desktop|content|html|textplain}_search_clear Updated front ends to use simplified search API. Only tested GTK and RO builds. These confine the search stuff to render/. However search still uses struct selection. The handling for which is still spread over desktop/ and render/. Also the render/search code itself still fiddles inside html and textplain privates.
Diffstat (limited to 'atari/search.c')
-rw-r--r--atari/search.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/atari/search.c b/atari/search.c
index 17241d1ae..6d8f53bec 100644
--- a/atari/search.c
+++ b/atari/search.c
@@ -224,7 +224,7 @@ void nsatari_search_session_destroy(struct s_search_form_session *s)
{
if (s != NULL) {
LOG((""));
- browser_window_search_destroy_context(s->bw);
+ browser_window_search_clear(s->bw);
free(s);
}
}
@@ -270,7 +270,7 @@ void nsatari_search_perform(struct s_search_form_session *s, OBJECT *obj,
if(search_session_compare(s, obj)){
- browser_window_search_destroy_context(s->bw);
+ browser_window_search_clear(s->bw);
apply_form(obj, &s->state);
} else {
@@ -282,11 +282,9 @@ void nsatari_search_perform(struct s_search_form_session *s, OBJECT *obj,
else
s->state.flags &= (~SEARCH_FLAG_FORWARDS);
- if( browser_window_search_verify_new(s->bw, &nsatari_search_callbacks, s) ){
- LOG(("searching for: %s\n", gemtk_obj_get_text(obj, TOOLBAR_TB_SRCH)));
- browser_window_search_step(s->bw, s->state.flags,
- gemtk_obj_get_text(obj, TOOLBAR_TB_SRCH));
- }
+ browser_window_search(s->bw, &nsatari_search_callbacks, s,
+ s->state.flags,
+ gemtk_obj_get_text(obj, TOOLBAR_TB_SRCH));
}
@@ -305,7 +303,7 @@ struct s_search_form_session * nsatari_search_session_create(OBJECT * obj,
apply_form(obj, &sfs->state);
- browser_window_search_destroy_context(bw);
+ browser_window_search_clear(bw);
return(sfs);
}