summaryrefslogtreecommitdiff
path: root/atari
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2012-10-17 14:20:18 +0100
committerMichael Drake <tlsa@netsurf-browser.org>2012-10-17 14:20:18 +0100
commit35eb251244ee360cedef6ec1143e65b59da604a8 (patch)
treeb1f508161b6d7502abd534d786650ca7507373a5 /atari
parent26ac642ef9f6bb439f10a7fc3188823ba1f7bffd (diff)
downloadnetsurf-35eb251244ee360cedef6ec1143e65b59da604a8.tar.gz
netsurf-35eb251244ee360cedef6ec1143e65b59da604a8.tar.bz2
Fix "error setting certificate verify locations" problem when the Choices file doesn't exist. Now there's a single place for front ends to set options overrides. Fix nsoption_setnull_charp leak.
Diffstat (limited to 'atari')
-rwxr-xr-xatari/gui.c24
1 files changed, 16 insertions, 8 deletions
diff --git a/atari/gui.c b/atari/gui.c
index a2dac21d3..c2158e05e 100755
--- a/atari/gui.c
+++ b/atari/gui.c
@@ -553,12 +553,12 @@ gui_window_remove_caret(struct gui_window *w)
void
gui_window_set_icon(struct gui_window *g, hlcache_handle *icon)
-{
- struct bitmap *bmp_icon;
+{
+ struct bitmap *bmp_icon;
+
+ bmp_icon = (icon != NULL) ? content_get_bitmap(icon) : NULL;
- bmp_icon = (icon != NULL) ? content_get_bitmap(icon) : NULL;
-
- window_set_icon(g, bmp_icon);
+ window_set_icon(g, bmp_icon);
}
void
@@ -911,6 +911,17 @@ nsurl *gui_get_resource_url(const char *path)
return url;
}
+/* Documented in desktop/options.h */
+void gui_options_init_defaults(void)
+{
+ /* Set defaults for absent option strings */
+ nsoption_setnull_charp(cookie_file, strdup("cookies"));
+
+ if (nsoption_charp(cookie_file) == NULL) {
+ die("Failed initialising string options");
+ }
+}
+
static void gui_init(int argc, char** argv)
{
char buf[PATH_MAX];
@@ -961,9 +972,6 @@ static void gui_init(int argc, char** argv)
urldb_load(nsoption_charp(url_file));
}
- if (nsoption_charp(cookie_file) == NULL ){
- nsoption_set_charp(cookie_file, (char*)"cookies");
- }
LOG(("Loading cookies from: %s", nsoption_charp(cookie_file) ));
if( strlen(nsoption_charp(cookie_file)) ){
urldb_load_cookies(nsoption_charp(cookie_file));