summaryrefslogtreecommitdiff
path: root/cocoa
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2014-05-10 10:22:10 +0100
committerVincent Sanders <vince@kyllikki.org>2014-05-10 10:22:10 +0100
commit16b11e7238dea2c74a713b6f601d5f506bdaadcf (patch)
treed23dab3fc90645ac976b001e09538dbff4017f5f /cocoa
parent429d6e20f7989bb65736fb6f0058c33add7b0ac5 (diff)
downloadnetsurf-16b11e7238dea2c74a713b6f601d5f506bdaadcf.tar.gz
netsurf-16b11e7238dea2c74a713b6f601d5f506bdaadcf.tar.bz2
ensure operations tables are registered as early as possible.
Diffstat (limited to 'cocoa')
-rw-r--r--cocoa/NetsurfApp.m9
1 files changed, 7 insertions, 2 deletions
diff --git a/cocoa/NetsurfApp.m b/cocoa/NetsurfApp.m
index 45d31a122..3a9572309 100644
--- a/cocoa/NetsurfApp.m
+++ b/cocoa/NetsurfApp.m
@@ -184,7 +184,7 @@ int main( int argc, char **argv )
{
nsurl *url;
nserror error;
- struct gui_table cocoa_gui_table = {
+ struct netsurf_table cocoa_table = {
.browser = cocoa_browser_table,
.window = cocoa_window_table,
.clipboard = cocoa_clipboard_table,
@@ -194,6 +194,11 @@ int main( int argc, char **argv )
};
cocoa_autorelease();
+
+ error = netsurf_register(&cocoa_table);
+ if (error != NSERROR_OK) {
+ die("NetSurf operation table failed registration");
+ }
const char * const messages = [[[NSBundle mainBundle] pathForResource: @"Messages" ofType: @""] UTF8String];
const char * const options = cocoa_get_options_file();
@@ -212,7 +217,7 @@ int main( int argc, char **argv )
nsoption_commandline(&argc, argv, NULL);
/* common initialisation */
- error = netsurf_init(messages, &cocoa_gui_table);
+ error = netsurf_init(messages);
if (error != NSERROR_OK) {
die("NetSurf failed to initialise");
}