diff options
author | Vincent Sanders <vince@kyllikki.org> | 2014-05-10 10:22:10 +0100 |
---|---|---|
committer | Vincent Sanders <vince@kyllikki.org> | 2014-05-10 10:22:10 +0100 |
commit | 16b11e7238dea2c74a713b6f601d5f506bdaadcf (patch) | |
tree | d23dab3fc90645ac976b001e09538dbff4017f5f /beos/gui.cpp | |
parent | 429d6e20f7989bb65736fb6f0058c33add7b0ac5 (diff) | |
download | netsurf-16b11e7238dea2c74a713b6f601d5f506bdaadcf.tar.gz netsurf-16b11e7238dea2c74a713b6f601d5f506bdaadcf.tar.bz2 |
ensure operations tables are registered as early as possible.
Diffstat (limited to 'beos/gui.cpp')
-rw-r--r-- | beos/gui.cpp | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/beos/gui.cpp b/beos/gui.cpp index 21bbf11f1..4077a8580 100644 --- a/beos/gui.cpp +++ b/beos/gui.cpp @@ -1024,7 +1024,7 @@ int main(int argc, char** argv) { nserror ret; BPath options; - struct gui_table beos_gui_table = { + struct netsurf_table beos_table = { &beos_browser_table, beos_window_table, beos_download_table, @@ -1032,6 +1032,11 @@ int main(int argc, char** argv) &beos_fetch_table }; + ret = netsurf_register(&beos_table); + if (ret != NSERROR_OK) { + die("NetSurf operation table failed registration"); + } + if (find_directory(B_USER_SETTINGS_DIRECTORY, &options, true) == B_OK) { options.Append("x-vnd.NetSurf"); } @@ -1057,7 +1062,7 @@ int main(int argc, char** argv) /* common initialisation */ BPath messages = get_messages_path(); - ret = netsurf_init(messages.Path(), &beos_gui_table); + ret = netsurf_init(messages.Path()); if (ret != NSERROR_OK) { die("NetSurf failed to initialise"); } @@ -1076,7 +1081,7 @@ int gui_init_replicant(int argc, char** argv) { nserror ret; BPath options; - struct gui_table beos_gui_table = { + struct netsurf_table beos_table = { &beos_browser_table, beos_window_table, beos_download_table, @@ -1084,6 +1089,11 @@ int gui_init_replicant(int argc, char** argv) &beos_fetch_table }; + ret = netsurf_register(&beos_table); + if (ret != NSERROR_OK) { + die("NetSurf operation table failed registration"); + } + if (find_directory(B_USER_SETTINGS_DIRECTORY, &options, true) == B_OK) { options.Append("x-vnd.NetSurf"); } @@ -1105,7 +1115,7 @@ int gui_init_replicant(int argc, char** argv) /* common initialisation */ BPath messages = get_messages_path(); - ret = netsurf_init(messages.Path(), &beos_gui_table); + ret = netsurf_init(messages.Path()); if (ret != NSERROR_OK) { // FIXME: must not die when in replicant! die("NetSurf failed to initialise"); |