From 65eadf642de44f2ffe6f3590d5f429fcbbe7933e Mon Sep 17 00:00:00 2001 From: Ole Loots Date: Thu, 21 Jun 2012 21:51:43 +0000 Subject: [PATCH] Handle do not trackoption and fix a call to snprintf(). svn path=/trunk/netsurf/; revision=13979 --- atari/settings.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/atari/settings.c b/atari/settings.c index 639f1b463..2732fe3a5 100644 --- a/atari/settings.c +++ b/atari/settings.c @@ -464,7 +464,7 @@ form_event( WINDOW *win, int index, int external, void *unused2) static void toggle_objects( void ) { - // enable / disable objects depending on radio button values. + /* enable / disable (refresh) objects depending on radio button values: */ FORMEVENT(CHOICES_CB_USE_PROXY); FORMEVENT(CHOICES_CB_PROXY_AUTH); FORMEVENT(CHOICES_BT_SEL_FONT_RENDERER); @@ -496,6 +496,11 @@ static void display_settings( void ) } else { OBJ_UNCHECK( CHOICES_CB_SEND_HTTP_REFERRER ); } + if( nsoption_bool(do_not_track) ){ + OBJ_CHECK( CHOICES_CB_SEND_DO_NOT_TRACK ); + } else { + OBJ_UNCHECK( CHOICES_CB_SEND_DO_NOT_TRACK ); + } set_text( CHOICES_BT_SEL_LOCALE, nsoption_charp(accept_language) ? nsoption_charp(accept_language) : (char*)"en", @@ -578,7 +583,7 @@ static void display_settings( void ) /* "Style" tab: */ tmp_option_font_min_size = nsoption_int(font_min_size); - snprintf( spare, "%3d", nsoption_int(font_min_size) ); + snprintf( spare, 255, "%3d", nsoption_int(font_min_size) ); set_text( CHOICES_EDIT_MIN_FONT_SIZE, spare , 3 ); tmp_option_font_size = nsoption_int(font_size); @@ -668,6 +673,8 @@ static void apply_settings( void ) atoi(ObjcString( dlgtree, CHOICES_EDIT_HISTORY_AGE, NULL))); nsoption_set_bool(send_referer, OBJ_SELECTED(CHOICES_CB_SEND_HTTP_REFERRER)); + nsoption_set_bool(do_not_track, + OBJ_SELECTED(CHOICES_CB_SEND_HTTP_REFERRER)); nsoption_set_charp(homepage_url, ObjcString( dlgtree, CHOICES_EDIT_HOMEPAGE, NULL)); }