From 3afd9c97310d58c0c6588d18887244328590731e Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Tue, 7 May 2013 14:41:40 +0100 Subject: 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. --- gtk/scaffolding.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'gtk/scaffolding.c') diff --git a/gtk/scaffolding.c b/gtk/scaffolding.c index 4097837a9..8f1f4447e 100644 --- a/gtk/scaffolding.c +++ b/gtk/scaffolding.c @@ -1423,7 +1423,7 @@ MULTIHANDLER(reload) return TRUE; /* clear potential search effects */ - browser_window_search_destroy_context(bw); + browser_window_search_clear(bw); nsgtk_search_set_forward_state(true, bw); nsgtk_search_set_back_state(true, bw); @@ -1442,7 +1442,7 @@ MULTIHANDLER(back) return TRUE; /* clear potential search effects */ - browser_window_search_destroy_context(bw); + browser_window_search_clear(bw); nsgtk_search_set_forward_state(true, bw); nsgtk_search_set_back_state(true, bw); @@ -1462,7 +1462,7 @@ MULTIHANDLER(forward) return TRUE; /* clear potential search effects */ - browser_window_search_destroy_context(bw); + browser_window_search_clear(bw); nsgtk_search_set_forward_state(true, bw); nsgtk_search_set_back_state(true, bw); @@ -2431,7 +2431,7 @@ void nsgtk_scaffolding_toggle_search_bar_visibility(nsgtk_scaffolding *g) g_object_get(G_OBJECT(g->search->bar), "visible", &vis, NULL); if (vis) { if (bw != NULL) - browser_window_search_destroy_context(bw); + browser_window_search_clear(bw); nsgtk_search_set_forward_state(true, bw); nsgtk_search_set_back_state(true, bw); gtk_widget_hide(GTK_WIDGET(g->search->bar)); @@ -2468,7 +2468,7 @@ void nsgtk_scaffolding_set_top_level(struct gui_window *gw) nsgtk_window_update_back_forward(sc); /* clear effects of potential searches */ - browser_window_search_destroy_context(bw); + browser_window_search_clear(bw); nsgtk_search_set_forward_state(true, bw); nsgtk_search_set_back_state(true, bw); -- cgit v1.2.3