summaryrefslogtreecommitdiff
path: root/beos/gui.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'beos/gui.cpp')
-rw-r--r--beos/gui.cpp32
1 files changed, 20 insertions, 12 deletions
diff --git a/beos/gui.cpp b/beos/gui.cpp
index 33337d8ff..3ee47c9e9 100644
--- a/beos/gui.cpp
+++ b/beos/gui.cpp
@@ -1059,15 +1059,17 @@ bool path_add_part(char *path, int length, const char *newpart)
return true;
}
-static struct gui_table beos_gui_table = {
+static struct gui_clipboard_table beos_clipboard_table = {
+ .get = gui_get_clipboard,
+ .set = gui_set_clipboard,
+};
+
+static struct gui_browser_table beos_browser_table = {
.poll = gui_poll,
.quit = gui_quit,
.get_resource_url = gui_get_resource_url,
.launch_url = gui_launch_url,
-
- .get_clipboard = gui_get_clipboard,
- .set_clipboard = gui_set_clipboard,
};
@@ -1076,6 +1078,13 @@ int main(int argc, char** argv)
{
nserror ret;
BPath options;
+ struct gui_table beos_gui_table = {
+ .browser = &beos_browser_table,
+ .window = beos_window_table,
+ .clipboard = &beos_clipboard_table,
+ .download = beos_download_table,
+ };
+
if (find_directory(B_USER_SETTINGS_DIRECTORY, &options, true) == B_OK) {
options.Append("x-vnd.NetSurf");
}
@@ -1101,10 +1110,6 @@ int main(int argc, char** argv)
/* common initialisation */
BPath messages = get_messages_path();
-
- beos_gui_table.window = beos_gui_window_table;
- beos_gui_table.download = beos_gui_download_table;
-
ret = netsurf_init(messages.Path(), &beos_gui_table);
if (ret != NSERROR_OK) {
die("NetSurf failed to initialise");
@@ -1124,6 +1129,13 @@ int gui_init_replicant(int argc, char** argv)
{
nserror ret;
BPath options;
+ struct gui_table beos_gui_table = {
+ .browser = &beos_browser_table,
+ .window = beos_window_table,
+ .clipboard = &beos_clipboard_table,
+ .download = beos_download_table,
+ };
+
if (find_directory(B_USER_SETTINGS_DIRECTORY, &options, true) == B_OK) {
options.Append("x-vnd.NetSurf");
}
@@ -1145,10 +1157,6 @@ int gui_init_replicant(int argc, char** argv)
/* common initialisation */
BPath messages = get_messages_path();
-
- beos_gui_table.window = beos_gui_window_table;
- beos_gui_table.download = beos_gui_download_table;
-
ret = netsurf_init(messages.Path(), &beos_gui_table);
if (ret != NSERROR_OK) {
// FIXME: must not die when in replicant!