diff options
author | François Revol <revol@free.fr> | 2013-12-07 01:26:39 +0100 |
---|---|---|
committer | François Revol <revol@free.fr> | 2013-12-07 01:26:39 +0100 |
commit | 62f7cfb04b646c39f77857890c4ad84880c4d509 (patch) | |
tree | 8ec9bb774a3d457095dbe69c63639888630ef28f /beos | |
parent | d6561e51e0540302537a5101485726c5c37894d8 (diff) | |
download | netsurf-62f7cfb04b646c39f77857890c4ad84880c4d509.tar.gz netsurf-62f7cfb04b646c39f77857890c4ad84880c4d509.tar.bz2 |
Fix Haiku build
Fix build of the BeOS code due to recent untested options commits.
Diffstat (limited to 'beos')
-rw-r--r-- | beos/gui.cpp | 32 | ||||
-rw-r--r-- | beos/scaffolding.cpp | 3 | ||||
-rw-r--r-- | beos/window.cpp | 3 |
3 files changed, 30 insertions, 8 deletions
diff --git a/beos/gui.cpp b/beos/gui.cpp index ffaccc83b..fac0265f1 100644 --- a/beos/gui.cpp +++ b/beos/gui.cpp @@ -38,6 +38,7 @@ #include <Mime.h> #include <Path.h> #include <Roster.h> +#include <Screen.h> #include <String.h> extern "C" { @@ -453,7 +454,10 @@ set_colour_from_ui(struct nsoption_s *opts, ((c.green << 8) & 0x00ff00) | ((c.red) & 0x0000ff)); } - return def_colour; + + opts[option].value.c = def_colour; + + return NSERROR_OK; } /** @@ -544,8 +548,8 @@ int main(int argc, char** argv) die("NetSurf failed to initialise"); } - gui_init(argc, argv); - gui_init2(argc, argv); + gui_init(argc, argv); + gui_init2(argc, argv); netsurf_main_loop(); @@ -557,6 +561,7 @@ int main(int argc, char** argv) /** called when replicated from NSBaseView::Instantiate() */ int gui_init_replicant(int argc, char** argv) { + nserror ret; BPath options; if (find_directory(B_USER_SETTINGS_DIRECTORY, &options, true) == B_OK) { options.Append("x-vnd.NetSurf"); @@ -569,8 +574,22 @@ int gui_init_replicant(int argc, char** argv) */ nslog_init(nslog_stream_configure, &argc, argv); - /* initialise netsurf */ - netsurf_init(&argc, &argv, options.Path(), messages); + // FIXME: use options as readonly for replicants + /* user options setup */ + ret = nsoption_init(set_defaults, &nsoptions, &nsoptions_default); + if (ret != NSERROR_OK) { + // FIXME: must not die when in replicant! + die("Options failed to initialise"); + } + nsoption_read(options.Path(), NULL); + nsoption_commandline(&argc, argv, NULL); + + /* common initialisation */ + ret = netsurf_init(messages); + if (ret != NSERROR_OK) { + // FIXME: must not die when in replicant! + die("NetSurf failed to initialise"); + } gui_init(argc, argv); gui_init2(argc, argv); @@ -593,7 +612,8 @@ void gui_init(int argc, char** argv) } // ui_color() gives hardcoded values before BApplication is created. - nsbeos_update_system_ui_colors(); + //FIXME: + //nsbeos_update_system_ui_colors(); fetch_rsrc_register(); diff --git a/beos/scaffolding.cpp b/beos/scaffolding.cpp index 7834db419..252a816dc 100644 --- a/beos/scaffolding.cpp +++ b/beos/scaffolding.cpp @@ -702,7 +702,8 @@ void nsbeos_scaffolding_dispatch_event(nsbeos_scaffolding *scaffold, BMessage *m break; } case B_UI_SETTINGS_CHANGED: - nsbeos_update_system_ui_colors(); + //FIXME: + //nsbeos_update_system_ui_colors(); nsbeos_scaffolding_update_colors(scaffold); break; case B_NETPOSITIVE_OPEN_URL: diff --git a/beos/window.cpp b/beos/window.cpp index 64ef616bb..5c5df96b3 100644 --- a/beos/window.cpp +++ b/beos/window.cpp @@ -650,7 +650,8 @@ void nsbeos_dispatch_event(BMessage *message) case B_MOUSE_WHEEL_CHANGED: break; case B_UI_SETTINGS_CHANGED: - nsbeos_update_system_ui_colors(); + //FIXME: + //nsbeos_update_system_ui_colors(); break; case 'nsLO': // login { |