diff options
author | Vincent Sanders <vince@kyllikki.org> | 2014-03-18 22:32:52 +0000 |
---|---|---|
committer | Vincent Sanders <vince@kyllikki.org> | 2014-03-18 22:32:52 +0000 |
commit | 4d4d74c8cd1a77a46cbe0816cf6150f8b4980947 (patch) | |
tree | cdc747443b58963a17b2844da25c7b2fab9deb99 /cocoa | |
parent | fec9f916b640b8ffc18b7ff9f9d04fd742b32ad1 (diff) | |
download | netsurf-4d4d74c8cd1a77a46cbe0816cf6150f8b4980947.tar.gz netsurf-4d4d74c8cd1a77a46cbe0816cf6150f8b4980947.tar.bz2 |
move page search gui callbacks to their own operations table
Diffstat (limited to 'cocoa')
-rw-r--r-- | cocoa/NetsurfApp.m | 2 | ||||
-rw-r--r-- | cocoa/SearchWindowController.h | 2 | ||||
-rw-r--r-- | cocoa/SearchWindowController.m | 9 |
3 files changed, 8 insertions, 5 deletions
diff --git a/cocoa/NetsurfApp.m b/cocoa/NetsurfApp.m index a1f1564ee..cab06a688 100644 --- a/cocoa/NetsurfApp.m +++ b/cocoa/NetsurfApp.m @@ -21,6 +21,7 @@ #import "cocoa/gui.h" #import "cocoa/plotter.h" #import "cocoa/DownloadWindowController.h" +#import "cocoa/SearchWindowController.h" #import "cocoa/selection.h" #import "cocoa/fetch.h" @@ -190,6 +191,7 @@ int main( int argc, char **argv ) .clipboard = cocoa_clipboard_table, .download = cocoa_download_table, .fetch = cocoa_fetch_table, + .search = cocoa_search_table, }; cocoa_autorelease(); diff --git a/cocoa/SearchWindowController.h b/cocoa/SearchWindowController.h index a1aac2e3f..896983b30 100644 --- a/cocoa/SearchWindowController.h +++ b/cocoa/SearchWindowController.h @@ -49,4 +49,6 @@ typedef enum { - (void) search: (SearchDirection)direction; +struct gui_search_table *cocoa_search_table; + @end diff --git a/cocoa/SearchWindowController.m b/cocoa/SearchWindowController.m index 06147fa1a..5d48145f4 100644 --- a/cocoa/SearchWindowController.m +++ b/cocoa/SearchWindowController.m @@ -26,14 +26,13 @@ static void cocoa_search_set_back( bool active, void *p ); static void cocoa_search_set_forward( bool active, void *p ); -static struct gui_search_callbacks cocoa_search_callbacks = { +static struct gui_search_table search_table = { .forward_state = cocoa_search_set_forward, .back_state = cocoa_search_set_back, - .status = NULL, - .hourglass = NULL, - .add_recent = NULL }; +struct gui_search_table *cocoa_search_table = &search_table; + @implementation SearchWindowController @synthesize caseSensitive; @@ -76,7 +75,7 @@ static struct gui_search_callbacks cocoa_search_callbacks = { if (selectAll) flags |= SEARCH_FLAG_SHOWALL; struct browser_window *bw = [browser browser]; - browser_window_search( bw, &cocoa_search_callbacks, self, flags, [searchString UTF8String] ); + browser_window_search( bw, self, flags, [searchString UTF8String] ); } - (IBAction) searchStringDidChange: (id) sender; |