mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-12-23 20:46:50 +03:00
Remove Hubbub and Wapcaplet initialisation and finalisation.
svn path=/trunk/netsurf/; revision=10980
This commit is contained in:
parent
632f7df653
commit
5eaeaed909
10
amiga/gui.c
10
amiga/gui.c
@ -119,9 +119,6 @@
|
||||
#include <math.h>
|
||||
#include <string.h>
|
||||
|
||||
/* C link libraries */
|
||||
#include <hubbub/hubbub.h>
|
||||
|
||||
char *default_stylesheet_url;
|
||||
char *quirks_stylesheet_url;
|
||||
char *adblock_stylesheet_url;
|
||||
@ -441,11 +438,6 @@ void gui_init(int argc, char** argv)
|
||||
quirks_stylesheet_url = "file:///PROGDIR:Resources/quirks.css";
|
||||
adblock_stylesheet_url = "file:///PROGDIR:Resources/adblock.css";
|
||||
|
||||
if(hubbub_initialise("PROGDIR:Resources/Aliases", ns_realloc, NULL) != HUBBUB_OK)
|
||||
{
|
||||
die(messages_get("NoMemory"));
|
||||
}
|
||||
|
||||
nscss_screen_dpi = INTTOFIX(72);
|
||||
scroll_widget_fg_colour = 0x00aaaaaa;
|
||||
scroll_widget_bg_colour = 0x00833c3c;
|
||||
@ -2035,8 +2027,6 @@ void gui_quit(void)
|
||||
ami_global_history_free();
|
||||
sslcert_cleanup();
|
||||
|
||||
hubbub_finalise(ns_realloc,NULL);
|
||||
|
||||
if(IApplication && ami_appid)
|
||||
UnregisterApplication(ami_appid, NULL);
|
||||
|
||||
|
@ -42,8 +42,6 @@
|
||||
|
||||
extern "C" {
|
||||
|
||||
#include <hubbub/hubbub.h>
|
||||
|
||||
#include "content/content.h"
|
||||
#include "content/content_protected.h"
|
||||
#include "content/fetch.h"
|
||||
@ -630,13 +628,6 @@ void gui_init(int argc, char** argv)
|
||||
#endif
|
||||
LOG(("Using '%s' as AdBlock CSS URL", adblock_stylesheet_url));
|
||||
|
||||
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"));
|
||||
}
|
||||
|
||||
urldb_load(option_url_file);
|
||||
urldb_load_cookies(option_cookie_file);
|
||||
|
||||
@ -773,7 +764,6 @@ void gui_quit(void)
|
||||
CALLED();
|
||||
urldb_save_cookies(option_cookie_jar);
|
||||
urldb_save(option_url_file);
|
||||
hubbub_finalise(myrealloc,NULL);
|
||||
//options_save_tree(hotlist,option_hotlist_file,messages_get("TreeHotlist"));
|
||||
|
||||
free(default_stylesheet_url);
|
||||
|
@ -49,16 +49,6 @@
|
||||
bool netsurf_quit = false;
|
||||
bool verbose_log = false;
|
||||
|
||||
static void *netsurf_lwc_alloc(void *ptr, size_t len, void *pw)
|
||||
{
|
||||
if (len == 0) {
|
||||
free(ptr);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return realloc(ptr, len);
|
||||
}
|
||||
|
||||
static void netsurf_lwc_iterator(lwc_string *str, void *pw)
|
||||
{
|
||||
LOG(("%.*s", (int) lwc_string_length(str), lwc_string_data(str)));
|
||||
@ -153,8 +143,6 @@ nserror netsurf_init(int *pargc,
|
||||
|
||||
messages_load(messages);
|
||||
|
||||
lwc_initialise(netsurf_lwc_alloc, NULL, 0);
|
||||
|
||||
url_init();
|
||||
|
||||
setlocale(LC_ALL, "C");
|
||||
|
@ -27,8 +27,6 @@
|
||||
#include <stdbool.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <hubbub/hubbub.h>
|
||||
|
||||
#include <libnsfb.h>
|
||||
#include <libnsfb_plot.h>
|
||||
#include <libnsfb_event.h>
|
||||
@ -445,11 +443,6 @@ gui_init(int argc, char** argv)
|
||||
char buf[PATH_MAX];
|
||||
nsfb_t *nsfb;
|
||||
|
||||
fb_find_resource(buf, "Aliases", "./framebuffer/res/Aliases");
|
||||
LOG(("Using '%s' as Aliases file", buf));
|
||||
if (hubbub_initialise(buf, ns_realloc, NULL) != HUBBUB_OK)
|
||||
die("Unable to initialise HTML parsing library.\n");
|
||||
|
||||
option_core_select_menu = true;
|
||||
|
||||
/* set up stylesheet urls */
|
||||
@ -572,9 +565,6 @@ gui_quit(void)
|
||||
urldb_save_cookies(option_cookie_jar);
|
||||
|
||||
framebuffer_finalise();
|
||||
|
||||
/* We don't care if this fails as we're about to exit, anyway */
|
||||
hubbub_finalise(ns_realloc, NULL);
|
||||
}
|
||||
|
||||
/* called back when click in browser window */
|
||||
|
@ -37,7 +37,6 @@
|
||||
#include <gdk/gdkkeysyms.h>
|
||||
#include <gtk/gtk.h>
|
||||
#include <glade/glade.h>
|
||||
#include <hubbub/hubbub.h>
|
||||
#include <glib.h>
|
||||
#include <glib/gi18n.h>
|
||||
|
||||
@ -432,15 +431,6 @@ static void gui_init(int argc, char** argv, char **respath)
|
||||
/* check user options */
|
||||
check_options(respath);
|
||||
|
||||
/* Character encoding mapping file *must* be available */
|
||||
resource_filename = findresource(respath, "Aliases");
|
||||
if (resource_filename == NULL)
|
||||
die("Unable to locate file for character encoding mapping\n");
|
||||
LOG(("Using '%s' as Aliases file", resource_filename));
|
||||
if (hubbub_initialise(resource_filename, ns_realloc, NULL) != HUBBUB_OK)
|
||||
die("Unable to initialise HTML parsing library.\n");
|
||||
free(resource_filename);
|
||||
|
||||
/* Obtain resources path location.
|
||||
*
|
||||
* Uses the directory the languages file was found in,
|
||||
@ -686,8 +676,6 @@ void gui_quit(void)
|
||||
free(search_default_ico_location);
|
||||
free(toolbar_indices_file_location);
|
||||
gtk_fetch_filetype_fin();
|
||||
/* We don't care if this fails as we're about to die, anyway */
|
||||
hubbub_finalise(ns_realloc, NULL);
|
||||
}
|
||||
|
||||
|
||||
|
@ -33,7 +33,6 @@
|
||||
#include <features.h>
|
||||
#include <unixlib/local.h>
|
||||
#include <curl/curl.h>
|
||||
#include <hubbub/hubbub.h>
|
||||
#include "oslib/font.h"
|
||||
#include "oslib/help.h"
|
||||
#include "oslib/hourglass.h"
|
||||
@ -317,10 +316,6 @@ static void gui_init(int argc, char** argv)
|
||||
ro_plot_patterned_lines = false;
|
||||
}
|
||||
|
||||
if (hubbub_initialise("NetSurf:Resources.Aliases", ns_realloc, NULL) !=
|
||||
HUBBUB_OK)
|
||||
die("Failed to initialise HTML parsing library.");
|
||||
|
||||
/* Set defaults for absent option strings */
|
||||
if (!option_theme)
|
||||
option_theme = strdup("Aletheia");
|
||||
@ -812,8 +807,6 @@ void gui_quit(void)
|
||||
free(default_stylesheet_url);
|
||||
free(quirks_stylesheet_url);
|
||||
free(adblock_stylesheet_url);
|
||||
/* We don't care if this fails */
|
||||
hubbub_finalise(ns_realloc, NULL);
|
||||
xhourglass_off();
|
||||
}
|
||||
|
||||
|
@ -30,8 +30,6 @@
|
||||
#define _WIN32_IE (0x0501)
|
||||
#include <commctrl.h>
|
||||
|
||||
#include <hubbub/hubbub.h>
|
||||
|
||||
#include "content/urldb.h"
|
||||
#include "content/fetch.h"
|
||||
#include "css/utils.h"
|
||||
@ -2518,28 +2516,17 @@ void gui_cert_verify(const char *url, const struct ssl_cert_info *certs,
|
||||
void gui_quit(void)
|
||||
{
|
||||
LOG(("gui_quit"));
|
||||
|
||||
hubbub_finalise(ns_realloc, NULL);
|
||||
}
|
||||
|
||||
static void gui_init(int argc, char** argv)
|
||||
{
|
||||
char buf[PATH_MAX], sbuf[PATH_MAX];
|
||||
int len;
|
||||
hubbub_error he;
|
||||
struct browser_window *bw;
|
||||
const char *addr = NETSURF_HOMEPAGE;
|
||||
|
||||
LOG(("argc %d, argv %p", argc, argv));
|
||||
|
||||
nsws_find_resource(buf, "Aliases", "./windows/res/Aliases");
|
||||
LOG(("Using '%s' as Aliases file", buf));
|
||||
|
||||
he = hubbub_initialise(buf, ns_realloc, NULL);
|
||||
LOG(("hubbub init %d", he));
|
||||
if (he != HUBBUB_OK)
|
||||
die("Unable to initialise HTML parsing library.\n");
|
||||
|
||||
/* set up stylesheet urls */
|
||||
getcwd(sbuf, PATH_MAX);
|
||||
len = strlen(sbuf);
|
||||
|
Loading…
Reference in New Issue
Block a user