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. --- cocoa/SearchWindowController.m | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'cocoa') diff --git a/cocoa/SearchWindowController.m b/cocoa/SearchWindowController.m index 858ed0e0d..06147fa1a 100644 --- a/cocoa/SearchWindowController.m +++ b/cocoa/SearchWindowController.m @@ -76,15 +76,13 @@ static struct gui_search_callbacks cocoa_search_callbacks = { if (selectAll) flags |= SEARCH_FLAG_SHOWALL; struct browser_window *bw = [browser browser]; - if (bw != NULL && browser_window_search_verify_new( bw, &cocoa_search_callbacks, self )) { - browser_window_search_step( bw, flags, [searchString UTF8String] ); - } + browser_window_search( bw, &cocoa_search_callbacks, self, flags, [searchString UTF8String] ); } - (IBAction) searchStringDidChange: (id) sender; { struct browser_window *bw = [browser browser]; - browser_window_search_destroy_context( bw ); + browser_window_search_clear( bw ); [self setCanGoBack: YES]; [self setCanGoForward: YES]; -- cgit v1.2.3