mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-12-22 20:16:54 +03:00
add backing store storage path to browser initialisation
This commit is contained in:
parent
05932293f6
commit
64f607760b
@ -5294,7 +5294,7 @@ int main(int argc, char** argv)
|
||||
|
||||
if (ami_locate_resource(messages, "Messages") == false)
|
||||
die("Cannot open Messages file");
|
||||
ret = netsurf_init(messages);
|
||||
ret = netsurf_init(messages, NULL);
|
||||
if (ret != NSERROR_OK) {
|
||||
die("NetSurf failed to initialise");
|
||||
}
|
||||
|
@ -1126,7 +1126,7 @@ int main(int argc, char** argv)
|
||||
|
||||
/* common initialisation */
|
||||
LOG(("Initialising core..."));
|
||||
ret = netsurf_init(messages);
|
||||
ret = netsurf_init(messages, NULL);
|
||||
if (ret != NSERROR_OK) {
|
||||
die("NetSurf failed to initialise");
|
||||
}
|
||||
|
@ -1062,7 +1062,7 @@ int main(int argc, char** argv)
|
||||
|
||||
/* common initialisation */
|
||||
BPath messages = get_messages_path();
|
||||
ret = netsurf_init(messages.Path());
|
||||
ret = netsurf_init(messages.Path(), NULL);
|
||||
if (ret != NSERROR_OK) {
|
||||
die("NetSurf failed to initialise");
|
||||
}
|
||||
@ -1115,7 +1115,7 @@ int gui_init_replicant(int argc, char** argv)
|
||||
|
||||
/* common initialisation */
|
||||
BPath messages = get_messages_path();
|
||||
ret = netsurf_init(messages.Path());
|
||||
ret = netsurf_init(messages.Path(), NULL);
|
||||
if (ret != NSERROR_OK) {
|
||||
// FIXME: must not die when in replicant!
|
||||
die("NetSurf failed to initialise");
|
||||
|
@ -217,7 +217,7 @@ int main( int argc, char **argv )
|
||||
nsoption_commandline(&argc, argv, NULL);
|
||||
|
||||
/* common initialisation */
|
||||
error = netsurf_init(messages);
|
||||
error = netsurf_init(messages, NULL);
|
||||
if (error != NSERROR_OK) {
|
||||
die("NetSurf failed to initialise");
|
||||
}
|
||||
|
@ -128,7 +128,7 @@ nserror netsurf_register(struct netsurf_table *table)
|
||||
}
|
||||
|
||||
/* exported interface documented in desktop/netsurf.h */
|
||||
nserror netsurf_init(const char *messages)
|
||||
nserror netsurf_init(const char *messages, const char *store_path)
|
||||
{
|
||||
nserror ret;
|
||||
struct utsname utsname;
|
||||
@ -197,8 +197,7 @@ nserror netsurf_init(const char *messages)
|
||||
hlcache_parameters.llcache.store.hysteresis = (hlcache_parameters.llcache.store.limit * 20) / 100;;
|
||||
|
||||
/* set the path to the backing store */
|
||||
/** \todo set the backing store path properly */
|
||||
hlcache_parameters.llcache.store.path = "/tmp/ns";
|
||||
hlcache_parameters.llcache.store.path = store_path;
|
||||
|
||||
/* image handler bitmap cache */
|
||||
ret = image_cache_init(&image_cache_parameters);
|
||||
|
@ -43,7 +43,7 @@ nserror netsurf_register(struct netsurf_table *table);
|
||||
* @param messages path to translation mesage file.
|
||||
* @return NSERROR_OK on success or error code on faliure.
|
||||
*/
|
||||
nserror netsurf_init(const char *messages);
|
||||
nserror netsurf_init(const char *messages, const char *store_path);
|
||||
|
||||
/**
|
||||
* Run event loop.
|
||||
|
@ -1837,7 +1837,7 @@ main(int argc, char** argv)
|
||||
|
||||
/* common initialisation */
|
||||
messages = filepath_find(respaths, "Messages");
|
||||
ret = netsurf_init(messages);
|
||||
ret = netsurf_init(messages, NULL);
|
||||
free(messages);
|
||||
if (ret != NSERROR_OK) {
|
||||
die("NetSurf failed to initialise");
|
||||
|
@ -1211,7 +1211,7 @@ int main(int argc, char** argv)
|
||||
messages = filepath_find(respaths, "Messages");
|
||||
|
||||
/* core initialisation */
|
||||
ret = netsurf_init(messages);
|
||||
ret = netsurf_init(messages, NULL);
|
||||
free(messages);
|
||||
if (ret != NSERROR_OK) {
|
||||
fprintf(stderr, "NetSurf core failed to initialise (%s)\n",
|
||||
|
@ -155,7 +155,7 @@ main(int argc, char **argv)
|
||||
|
||||
/* common initialisation */
|
||||
messages = filepath_find(respaths, "Messages");
|
||||
ret = netsurf_init(messages);
|
||||
ret = netsurf_init(messages, NULL);
|
||||
free(messages);
|
||||
if (ret != NSERROR_OK) {
|
||||
die("NetSurf failed to initialise");
|
||||
|
@ -2542,7 +2542,7 @@ int main(int argc, char** argv)
|
||||
}
|
||||
|
||||
/* common initialisation */
|
||||
ret = netsurf_init(path);
|
||||
ret = netsurf_init(path, NULL);
|
||||
if (ret != NSERROR_OK) {
|
||||
die("NetSurf failed to initialise");
|
||||
}
|
||||
|
@ -164,7 +164,7 @@ WinMain(HINSTANCE hInstance, HINSTANCE hLastInstance, LPSTR lpcli, int ncmd)
|
||||
|
||||
/* common initialisation */
|
||||
messages = filepath_find(respaths, "messages");
|
||||
ret = netsurf_init(messages);
|
||||
ret = netsurf_init(messages, NULL);
|
||||
free(messages);
|
||||
if (ret != NSERROR_OK) {
|
||||
free(options_file_location);
|
||||
|
Loading…
Reference in New Issue
Block a user