summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--beos/beos_gui.cpp31
l---------beos/res/Aliases1
2 files changed, 32 insertions, 0 deletions
diff --git a/beos/beos_gui.cpp b/beos/beos_gui.cpp
index fe0cba020..3f7f803f3 100644
--- a/beos/beos_gui.cpp
+++ b/beos/beos_gui.cpp
@@ -42,6 +42,11 @@
#include <String.h>
extern "C" {
+
+#ifdef WITH_HUBBUB
+#include <hubbub/hubbub.h>
+#endif
+
#include "content/content.h"
#include "content/fetch.h"
#include "content/fetchers/fetch_curl.h"
@@ -78,6 +83,11 @@ extern "C" {
#include "beos/beos_fetch_rsrc.h"
+#ifdef WITH_HUBBUB
+static void *myrealloc(void *ptr, size_t len, void *pw);
+#endif
+
+
/* Where to search for shared resources. Must have trailing / */
#define RESPATH "/boot/apps/netsurf/res/"
@@ -520,6 +530,15 @@ void gui_init(int argc, char** argv)
#endif
LOG(("Using '%s' as AdBlock CSS URL", adblock_stylesheet_url));
+#ifdef WITH_HUBBUB
+ find_resource(buf, "Aliases", "./beos/res/Aliases");
+ LOG(("Using '%s' as aliases file", buf));
+ if(hubbub_initialise(buf,myrealloc,NULL) != HUBBUB_OK)
+ {
+ die(messages_get("NoMemory"));
+ }
+#endif
+
urldb_load(option_url_file);
urldb_load_cookies(option_cookie_file);
@@ -734,6 +753,11 @@ void gui_quit(void)
CALLED();
urldb_save_cookies(option_cookie_jar);
urldb_save(option_url_file);
+#ifdef WITH_HUBBUB
+ hubbub_finalise(myrealloc,NULL);
+#endif
+ //options_save_tree(hotlist,option_hotlist_file,messages_get("TreeHotlist"));
+
free(default_stylesheet_url);
free(adblock_stylesheet_url);
free(option_cookie_file);
@@ -1112,3 +1136,10 @@ bool cookies_update(const char *domain, const struct cookie_data *data)
{
return true;
}
+
+#ifdef WITH_HUBBUB
+static void *myrealloc(void *ptr, size_t len, void *pw)
+{
+ return realloc(ptr, len);
+}
+#endif
diff --git a/beos/res/Aliases b/beos/res/Aliases
new file mode 120000
index 000000000..a95a734da
--- /dev/null
+++ b/beos/res/Aliases
@@ -0,0 +1 @@
+../../!NetSurf/Resources/Aliases \ No newline at end of file