r13529 vince - in /branches/vince/netsurf-options/amiga: bitmap.c clipboard.c context_menu.c download.c file.c font.c gui_options.c plotters.c print.c stringview/urlhistory.c theme.c tree.c

netsurf at semichrome.net netsurf at semichrome.net
Sun Mar 18 22:20:03 GMT 2012


Author: vince
Date: Sun Mar 18 17:20:03 2012
New Revision: 13529

URL: http://source.netsurf-browser.org?rev=13529&view=rev
Log:
complete amiga option conversion

Modified:
    branches/vince/netsurf-options/amiga/bitmap.c
    branches/vince/netsurf-options/amiga/clipboard.c
    branches/vince/netsurf-options/amiga/context_menu.c
    branches/vince/netsurf-options/amiga/download.c
    branches/vince/netsurf-options/amiga/file.c
    branches/vince/netsurf-options/amiga/font.c
    branches/vince/netsurf-options/amiga/gui_options.c
    branches/vince/netsurf-options/amiga/plotters.c
    branches/vince/netsurf-options/amiga/print.c
    branches/vince/netsurf-options/amiga/stringview/urlhistory.c
    branches/vince/netsurf-options/amiga/theme.c
    branches/vince/netsurf-options/amiga/tree.c

Modified: branches/vince/netsurf-options/amiga/bitmap.c
URL: http://source.netsurf-browser.org/branches/vince/netsurf-options/amiga/bitmap.c?rev=13529&r1=13528&r2=13529&view=diff
==============================================================================
--- branches/vince/netsurf-options/amiga/bitmap.c (original)
+++ branches/vince/netsurf-options/amiga/bitmap.c Sun Mar 18 17:20:03 2012
@@ -378,7 +378,7 @@
 								bitmap->width, bitmap->height);
 		}
 
-		if(option_cache_bitmaps == 2)
+		if(nsoption_int(cache_bitmaps) == 2)
 		{
 			bitmap->nativebm = tbm;
 			bitmap->nativebmwidth = bitmap->width;
@@ -400,7 +400,7 @@
 			uint32 flags = 0;
 
 			if(bitmap->opaque) flags |= COMPFLAG_IgnoreDestAlpha;
-			if(option_scale_quality) flags |= COMPFLAG_SrcFilter;
+			if(nsoption_bool(scale_quality)) flags |= COMPFLAG_SrcFilter;
 
 			CompositeTags(comptype,tbm,scaledbm,
 						COMPTAG_ScaleX,COMP_FLOAT_TO_FIX(width/bitmap->width),
@@ -442,7 +442,7 @@
 		tbm = scaledbm;
 		bitmap->nativebm = NULL;
 
-		if(option_cache_bitmaps >= 1)
+		if(nsoption_int(cache_bitmaps) >= 1)
 		{
 			bitmap->nativebm = tbm;
 			bitmap->nativebmwidth = width;

Modified: branches/vince/netsurf-options/amiga/clipboard.c
URL: http://source.netsurf-browser.org/branches/vince/netsurf-options/amiga/clipboard.c?rev=13529&r1=13528&r2=13529&view=diff
==============================================================================
--- branches/vince/netsurf-options/amiga/clipboard.c (original)
+++ branches/vince/netsurf-options/amiga/clipboard.c Sun Mar 18 17:20:03 2012
@@ -85,7 +85,7 @@
 {
 	if(!g) return;
 	if(!g->shared->win) return;
-	if(option_kiosk_mode == true) return;
+	if(nsoption_bool(kiosk_mode) == true) return;
 
 	OnMenu(g->shared->win, AMI_MENU_CLEAR);
 	OnMenu(g->shared->win, AMI_MENU_COPY);
@@ -98,7 +98,7 @@
 {
 	if(!g) return;
 	if(!g->shared->win) return;
-	if(option_kiosk_mode == true) return;
+	if(nsoption_bool(kiosk_mode) == true) return;
 
 	OffMenu(g->shared->win, AMI_MENU_CLEAR);
 	OffMenu(g->shared->win, AMI_MENU_CUT);
@@ -170,7 +170,7 @@
 	{
 		if(!(PushChunk(iffh,ID_FTXT,ID_FORM,IFFSIZE_UNKNOWN)))
 		{
-			if(option_utf8_clipboard || ami_utf8_clipboard)
+			if(nsoption_bool(utf8_clipboard) || ami_utf8_clipboard)
 			{
 				if(!(PushChunk(iffh,0,ID_CSET,32)))
 				{
@@ -219,7 +219,7 @@
 {
 	char *buffer;
 
-	if(option_utf8_clipboard || ami_utf8_clipboard)
+	if(nsoption_bool(utf8_clipboard) || ami_utf8_clipboard)
 	{
 		WriteChunkBytes(iffh,text,length);
 	}

Modified: branches/vince/netsurf-options/amiga/context_menu.c
URL: http://source.netsurf-browser.org/branches/vince/netsurf-options/amiga/context_menu.c?rev=13529&r1=13528&r2=13529&view=diff
==============================================================================
--- branches/vince/netsurf-options/amiga/context_menu.c (original)
+++ branches/vince/netsurf-options/amiga/context_menu.c Sun Mar 18 17:20:03 2012
@@ -555,9 +555,9 @@
 {
 	int top, left, width, height;
 
-	if(option_context_menu == false) return FALSE;
-
-	if((option_kiosk_mode == false) && (trap == FALSE))
+	if(nsoption_bool(context_menu) == false) return FALSE;
+
+	if((nsoption_bool(kiosk_mode) == false) && (trap == FALSE))
 	{
 		if(browser_window_back_available(gwin->bw) &&
 				ami_gadget_hit(gwin->objects[GID_BACK],
@@ -871,7 +871,7 @@
 			break;
 
 			case CMID_NAVHOME:
-				browser_window_go(gwin->bw, option_homepage_url, NULL, true);
+				browser_window_go(gwin->bw, nsoption_charp(homepage_url), NULL, true);
 			break;
 
 			case CMID_NAVBACK:

Modified: branches/vince/netsurf-options/amiga/download.c
URL: http://source.netsurf-browser.org/branches/vince/netsurf-options/amiga/download.c?rev=13529&r1=13528&r2=13529&view=diff
==============================================================================
--- branches/vince/netsurf-options/amiga/download.c (original)
+++ branches/vince/netsurf-options/amiga/download.c Sun Mar 18 17:20:03 2012
@@ -233,7 +233,7 @@
 
 	if(!dw) return;
 
-	if(option_download_notify)
+	if(nsoption_bool(download_notify))
 	{
 		Notify(ami_appid, APPNOTIFY_Title, messages_get("amiDownloadComplete"),
 				APPNOTIFY_PubScreenName, "FRONT",
@@ -366,7 +366,7 @@
 	int64 oldsize = 0;
 	char *overwritetext;
 
-	if(option_ask_overwrite == false) return TRUE;
+	if(nsoption_bool(ask_overwrite) == false) return TRUE;
 
 	lock = Lock(file, ACCESS_READ);
 

Modified: branches/vince/netsurf-options/amiga/file.c
URL: http://source.netsurf-browser.org/branches/vince/netsurf-options/amiga/file.c?rev=13529&r1=13528&r2=13529&view=diff
==============================================================================
--- branches/vince/netsurf-options/amiga/file.c (original)
+++ branches/vince/netsurf-options/amiga/file.c Sun Mar 18 17:20:03 2012
@@ -197,7 +197,7 @@
 	savereq = (struct FileRequester *)AllocAslRequestTags(ASL_FileRequest,
 							ASLFR_DoSaveMode, TRUE,
 							ASLFR_RejectIcons, TRUE,
-							ASLFR_InitialDrawer, option_download_dir,
+							ASLFR_InitialDrawer, nsoption_charp(download_dir),
 							TAG_DONE);
 
 	aslhookfunc.h_Entry = (void *)&ami_file_asl_mime_hook;

Modified: branches/vince/netsurf-options/amiga/font.c
URL: http://source.netsurf-browser.org/branches/vince/netsurf-options/amiga/font.c?rev=13529&r1=13528&r2=13529&view=diff
==============================================================================
--- branches/vince/netsurf-options/amiga/font.c (original)
+++ branches/vince/netsurf-options/amiga/font.c Sun Mar 18 17:20:03 2012
@@ -400,23 +400,23 @@
 	switch(fontfamily)
 	{
 		case PLOT_FONT_FAMILY_SANS_SERIF:
-			fontname = option_font_sans;
+			fontname = nsoption_charp(font_sans);
 		break;
 		case PLOT_FONT_FAMILY_SERIF:
-			fontname = option_font_serif;
+			fontname = nsoption_charp(font_serif);
 		break;
 		case PLOT_FONT_FAMILY_MONOSPACE:
-			fontname = option_font_mono;
+			fontname = nsoption_charp(font_mono);
 		break;
 		case PLOT_FONT_FAMILY_CURSIVE:
-			fontname = option_font_cursive;
+			fontname = nsoption_charp(font_cursive);
 		break;
 		case PLOT_FONT_FAMILY_FANTASY:
-			fontname = option_font_fantasy;
+			fontname = nsoption_charp(font_fantasy);
 		break;
 		case NSA_UNICODE_FONT:
 		default:
-			fontname = option_font_unicode;
+			fontname = nsoption_charp(font_unicode);
 		break;
 	}
 
@@ -779,12 +779,12 @@
 {
 	DisplayInfoHandle dih;
 	struct DisplayInfo dinfo;
-	ULONG ydpi = option_amiga_ydpi;
-	ULONG xdpi = option_amiga_ydpi;
-
-	nscss_screen_dpi = INTTOFIX(option_amiga_ydpi);
-
-	if(id && (option_monitor_aspect_x != 0) && (option_monitor_aspect_y != 0))
+	ULONG ydpi = nsoption_int(amiga_ydpi);
+	ULONG xdpi = nsoption_int(amiga_ydpi);
+
+	nscss_screen_dpi = INTTOFIX(nsoption_int(amiga_ydpi));
+
+	if(id && (nsoption_int(monitor_aspect_x) != 0) && (nsoption_int(monitor_aspect_y) != 0))
 	{
 		if(dih = FindDisplayInfo(id))
 		{
@@ -794,12 +794,12 @@
 				int xres = dinfo.Resolution.x;
 				int yres = dinfo.Resolution.y;
 
-				if((option_monitor_aspect_x != 4) || (option_monitor_aspect_y != 3))
+				if((nsoption_int(monitor_aspect_x) != 4) || (nsoption_int(monitor_aspect_y) != 3))
 				{
 					/* AmigaOS sees 4:3 modes as square in the DisplayInfo database,
 					 * so we correct other modes to "4:3 equiv" here. */
-					xres = (xres * option_monitor_aspect_x) / 4;
-					yres = (yres * option_monitor_aspect_y) / 3;
+					xres = (xres * nsoption_int(monitor_aspect_x)) / 4;
+					yres = (yres * nsoption_int(monitor_aspect_y)) / 3;
 				}
 
 				xdpi = (yres * ydpi) / xres;

Modified: branches/vince/netsurf-options/amiga/gui_options.c
URL: http://source.netsurf-browser.org/branches/vince/netsurf-options/amiga/gui_options.c?rev=13529&r1=13528&r2=13529&view=diff
==============================================================================
--- branches/vince/netsurf-options/amiga/gui_options.c (original)
+++ branches/vince/netsurf-options/amiga/gui_options.c Sun Mar 18 17:20:03 2012
@@ -376,7 +376,7 @@
 	BOOL screenmodedisabled = FALSE, screennamedisabled = FALSE;
 	BOOL proxyhostdisabled = TRUE, proxyauthdisabled = TRUE;
 	BOOL disableanims, animspeeddisabled = FALSE, acceptlangdisabled = FALSE;
-	BOOL scaleselected = option_scale_quality, scaledisabled = FALSE;
+	BOOL scaleselected = nsoption_bool(scale_quality), scaledisabled = FALSE;
 	BOOL download_notify_disabled = FALSE;
 	char animspeed[10];
 	struct TextAttr fontsans, fontserif, fontmono, fontcursive, fontfantasy, fontunicode;
@@ -388,9 +388,9 @@
 		return;
 	}
 
-	if(option_use_pubscreen && option_use_pubscreen[0] != '\0')
+	if(nsoption_charp(use_pubscreen))
 	{
-		if(strcmp(option_use_pubscreen,"Workbench") == 0)
+		if(strcmp(nsoption_charp(use_pubscreen),"Workbench") == 0)
 		{
 			screenoptsselected = 1;
 			screennamedisabled = TRUE;
@@ -408,15 +408,15 @@
 		screennamedisabled = TRUE;
 	}
 
-	if((option_modeid) && (strncmp(option_modeid,"0x",2) == 0))
+	if((nsoption_charp(modeid)) && (strncmp(nsoption_charp(modeid),"0x",2) == 0))
 	{
-		screenmodeid = strtoul(option_modeid,NULL,0);
-	}
-
-	if(option_http_proxy)
+		screenmodeid = strtoul(nsoption_charp(modeid),NULL,0);
+	}
+
+	if(nsoption_bool(http_proxy))
 	{
-		proxytype = option_http_proxy_auth + 1;
-		switch(option_http_proxy_auth)
+		proxytype = nsoption_int(http_proxy_auth) + 1;
+		switch(nsoption_int(http_proxy_auth))
 		{
 			case OPTION_HTTP_PROXY_AUTH_BASIC:
 			case OPTION_HTTP_PROXY_AUTH_NTLM:
@@ -427,9 +427,9 @@
 		}
 	}
 
-	sprintf(animspeed,"%.2f",(float)(option_minimum_gif_delay/100.0));
-
-	if(option_animate_images)
+	sprintf(animspeed,"%.2f",(float)(nsoption_int(minimum_gif_delay)/100.0));
+
+	if(nsoption_bool(animate_images))
 	{
 		disableanims = FALSE;
 		animspeeddisabled = FALSE;
@@ -440,7 +440,7 @@
 		animspeeddisabled = TRUE;
 	}
 
-	if(option_accept_lang_locale)
+	if(nsoption_bool(accept_lang_locale))
 		acceptlangdisabled = TRUE;
 	else
 		acceptlangdisabled = FALSE;
@@ -454,15 +454,15 @@
 	if(ApplicationBase->lib_Version < 53)
 	{
 		download_notify_disabled = TRUE;
-		option_download_notify = FALSE;
-	}
-
-	fontsans.ta_Name = ASPrintf("%s.font",option_font_sans);
-	fontserif.ta_Name = ASPrintf("%s.font",option_font_serif);
-	fontmono.ta_Name = ASPrintf("%s.font",option_font_mono);
-	fontcursive.ta_Name = ASPrintf("%s.font",option_font_cursive);
-	fontfantasy.ta_Name = ASPrintf("%s.font",option_font_fantasy);
-	fontunicode.ta_Name = ASPrintf("%s.font",option_font_unicode);
+		nsoption_set_bool(download_notify, FALSE);
+	}
+
+	fontsans.ta_Name = ASPrintf("%s.font", nsoption_charp(font_sans));
+	fontserif.ta_Name = ASPrintf("%s.font", nsoption_charp(font_serif));
+	fontmono.ta_Name = ASPrintf("%s.font", nsoption_charp(font_mono));
+	fontcursive.ta_Name = ASPrintf("%s.font", nsoption_charp(font_cursive));
+	fontfantasy.ta_Name = ASPrintf("%s.font", nsoption_charp(font_fantasy));
+	fontunicode.ta_Name = ASPrintf("%s.font", nsoption_charp(font_unicode));
 
 	fontsans.ta_Style = 0;
 	fontserif.ta_Style = 0;
@@ -522,7 +522,7 @@
 									LAYOUT_AddChild, gow->objects[GID_OPTS_HOMEPAGE] = StringObject,
 										GA_ID, GID_OPTS_HOMEPAGE,
 										GA_RelVerify, TRUE,
-										STRINGA_TextVal, option_homepage_url,
+										STRINGA_TextVal, nsoption_charp(homepage_url),
 										STRINGA_BufferPos,0,
 									StringEnd,
 									CHILD_Label, LabelObject,
@@ -556,7 +556,7 @@
       	              						GA_ID, GID_OPTS_HIDEADS,
          	           						GA_RelVerify, TRUE,
          	           						GA_Text, gadlab[GID_OPTS_HIDEADS],
-  				      		            	GA_Selected, option_block_ads,
+         	           						GA_Selected, nsoption_bool(block_ads),
             	    					CheckBoxEnd,
 									LayoutEnd, // content blocking
 									LAYOUT_AddChild,VGroupObject,
@@ -567,14 +567,14 @@
 											GA_ID, GID_OPTS_CONTENTLANG,
 											GA_RelVerify, TRUE,
 											GA_Disabled, acceptlangdisabled,
-											STRINGA_TextVal, option_accept_language,
+											STRINGA_TextVal, nsoption_charp(accept_language),
 											STRINGA_BufferPos,0,
 										StringEnd,
 										LAYOUT_AddChild, gow->objects[GID_OPTS_FROMLOCALE] = CheckBoxObject,
 											GA_ID, GID_OPTS_FROMLOCALE,
 											GA_Text, gadlab[GID_OPTS_FROMLOCALE],
 											GA_RelVerify, TRUE,
-											GA_Selected, option_accept_lang_locale,
+											GA_Selected, nsoption_bool(accept_lang_locale),
 										ButtonEnd,
 									//	CHILD_WeightedWidth, 0,
 									LayoutEnd, // content language
@@ -588,7 +588,7 @@
 										LAYOUT_AddChild, gow->objects[GID_OPTS_HISTORY] = IntegerObject,
 											GA_ID, GID_OPTS_CACHE_DISC,
 											GA_RelVerify, TRUE,
-											INTEGER_Number, option_expire_url,
+											INTEGER_Number, nsoption_int(expire_url),
 											INTEGER_Minimum, 0,
 											INTEGER_Maximum, 366,
 											INTEGER_Arrows, TRUE,
@@ -612,13 +612,13 @@
       	              					GA_ID, GID_OPTS_REFERRAL,
          	           					GA_RelVerify, TRUE,
          	           					GA_Text, gadlab[GID_OPTS_REFERRAL],
-  				      		            GA_Selected, option_send_referer,
+         	           					GA_Selected, nsoption_bool(send_referer),
             	    				CheckBoxEnd,
 		                			LAYOUT_AddChild, gow->objects[GID_OPTS_FASTSCROLL] = CheckBoxObject,
       	              					GA_ID, GID_OPTS_FASTSCROLL,
          	           					GA_RelVerify, TRUE,
          	           					GA_Text, gadlab[GID_OPTS_FASTSCROLL],
-  				      		            GA_Selected, option_faster_scroll,
+         	           					GA_Selected, nsoption_bool(faster_scroll),
             	    				CheckBoxEnd,
 								LayoutEnd, // misc
 								CHILD_WeightedHeight, 0,
@@ -655,7 +655,7 @@
 												GA_ID, GID_OPTS_SCREENNAME,
 												GA_RelVerify, TRUE,
 												GA_Disabled,screennamedisabled,
-												STRINGA_TextVal, option_use_pubscreen,
+												STRINGA_TextVal, nsoption_bool(use_pubscreen),
 												STRINGA_BufferPos,0,
 											StringEnd,
 										LayoutEnd,
@@ -670,7 +670,7 @@
 									LAYOUT_AddChild, gow->objects[GID_OPTS_THEME] = GetFileObject,
 										GA_ID, GID_OPTS_THEME,
 										GA_RelVerify, TRUE,
-										GETFILE_Drawer, option_theme,
+										GETFILE_Drawer, nsoption_charp(theme),
 										GETFILE_DrawersOnly, TRUE,
 										GETFILE_ReadOnly, TRUE,
 										GETFILE_FullFileExpand, FALSE,
@@ -685,13 +685,13 @@
       	              					GA_ID, GID_OPTS_PTRTRUE,
          	           					GA_RelVerify, TRUE,
          	           					GA_Text, gadlab[GID_OPTS_PTRTRUE],
-  				      		            GA_Selected, option_truecolour_mouse_pointers,
+         	           					GA_Selected, nsoption_bool(truecolour_mouse_pointers),
             	    				CheckBoxEnd,
 		                			LAYOUT_AddChild, gow->objects[GID_OPTS_PTROS] = CheckBoxObject,
       	              					GA_ID, GID_OPTS_PTROS,
          	           					GA_RelVerify, TRUE,
          	           					GA_Text, gadlab[GID_OPTS_PTROS],
-  				      		            GA_Selected, option_use_os_pointers,
+         	           					GA_Selected, nsoption_bool(use_os_pointers),
             	    				CheckBoxEnd,
 								LayoutEnd, // mouse
 								CHILD_WeightedHeight,0,
@@ -725,14 +725,14 @@
 											GA_ID, GID_OPTS_PROXY_HOST,
 											GA_RelVerify, TRUE,
 											GA_Disabled, proxyhostdisabled,
-											STRINGA_TextVal, option_http_proxy_host,
+											STRINGA_TextVal, nsoption_charp(http_proxy_host),
 											STRINGA_BufferPos,0,
 										StringEnd,
 										LAYOUT_AddChild, gow->objects[GID_OPTS_PROXY_PORT] = IntegerObject,
 											GA_ID, GID_OPTS_PROXY_PORT,
 											GA_RelVerify, TRUE,
 											GA_Disabled, proxyhostdisabled,
-											INTEGER_Number, option_http_proxy_port,
+											INTEGER_Number, nsoption_charp(http_proxy_port),
 											INTEGER_Minimum, 1,
 											INTEGER_Maximum, 65535,
 											INTEGER_Arrows, FALSE,
@@ -750,7 +750,7 @@
 										GA_ID, GID_OPTS_PROXY_USER,
 										GA_RelVerify, TRUE,
 										GA_Disabled, proxyauthdisabled,
-										STRINGA_TextVal, option_http_proxy_auth_user,
+										STRINGA_TextVal, nsoption_charp(http_proxy_auth_user),
 										STRINGA_BufferPos,0,
 									StringEnd,
 									CHILD_Label, LabelObject,
@@ -760,7 +760,7 @@
 										GA_ID, GID_OPTS_PROXY_PASS,
 										GA_RelVerify, TRUE,
 										GA_Disabled, proxyauthdisabled,
-										STRINGA_TextVal, option_http_proxy_auth_pass,
+										STRINGA_TextVal, nsoption_charp(http_proxy_auth_pass),
 										STRINGA_BufferPos,0,
 									StringEnd,
 									CHILD_Label, LabelObject,
@@ -775,7 +775,7 @@
 									LAYOUT_AddChild, gow->objects[GID_OPTS_FETCHMAX] = IntegerObject,
 										GA_ID, GID_OPTS_FETCHMAX,
 										GA_RelVerify, TRUE,
-										INTEGER_Number, option_max_fetchers,
+										INTEGER_Number, nsoption_int(max_fetchers),
 										INTEGER_Minimum, 1,
 										INTEGER_Maximum, 99,
 										INTEGER_Arrows, TRUE,
@@ -787,7 +787,7 @@
 									LAYOUT_AddChild, gow->objects[GID_OPTS_FETCHHOST] = IntegerObject,
 										GA_ID, GID_OPTS_FETCHHOST,
 										GA_RelVerify, TRUE,
-										INTEGER_Number, option_max_fetchers_per_host,
+										INTEGER_Number, nsoption_int(max_fetchers_per_host),
 										INTEGER_Minimum, 1,
 										INTEGER_Maximum, 99,
 										INTEGER_Arrows, TRUE,
@@ -799,7 +799,7 @@
 									LAYOUT_AddChild, gow->objects[GID_OPTS_FETCHCACHE] = IntegerObject,
 										GA_ID, GID_OPTS_FETCHCACHE,
 										GA_RelVerify, TRUE,
-										INTEGER_Number, option_max_cached_fetch_handles,
+										INTEGER_Number, nsoption_int(max_cached_fetch_handles),
 										INTEGER_Minimum, 1,
 										INTEGER_Maximum, 99,
 										INTEGER_Arrows, TRUE,
@@ -827,7 +827,7 @@
 										GA_RelVerify, TRUE,
 										CHOOSER_PopUp, TRUE,
 										CHOOSER_LabelArray, nativebmopts,
-										CHOOSER_Selected, option_cache_bitmaps,
+										CHOOSER_Selected, nsoption_int(cache_bitmaps),
 									ChooserEnd,
 									CHILD_Label, LabelObject,
 										LABEL_Text, gadlab[GID_OPTS_NATIVEBM],
@@ -880,7 +880,7 @@
 										LAYOUT_AddChild, gow->objects[GID_OPTS_DPI_Y] = IntegerObject,
 											GA_ID, GID_OPTS_DPI_Y,
 											GA_RelVerify, TRUE,
-											INTEGER_Number, option_amiga_ydpi,
+											INTEGER_Number, nsoption_int(amiga_ydpi),
 											INTEGER_Minimum, 60,
 											INTEGER_Maximum, 150,
 											INTEGER_Arrows, TRUE,
@@ -967,7 +967,7 @@
 										GA_RelVerify, TRUE,
 										CHOOSER_PopUp, TRUE,
 										CHOOSER_LabelArray, fontopts,
-										CHOOSER_Selected, option_font_default - PLOT_FONT_FAMILY_SANS_SERIF,
+										CHOOSER_Selected, nsoption_int(font_default) - PLOT_FONT_FAMILY_SANS_SERIF,
 									ChooserEnd,
 									CHILD_Label, LabelObject,
 										LABEL_Text, gadlab[GID_OPTS_FONT_DEFAULT],
@@ -983,7 +983,7 @@
 										LAYOUT_AddChild, gow->objects[GID_OPTS_FONT_SIZE] = IntegerObject,
 											GA_ID, GID_OPTS_FONT_SIZE,
 											GA_RelVerify, TRUE,
-											INTEGER_Number, option_font_size / 10,
+											INTEGER_Number, nsoption_int(font_size) / 10,
 											INTEGER_Minimum, 1,
 											INTEGER_Maximum, 99,
 											INTEGER_Arrows, TRUE,
@@ -1001,7 +1001,7 @@
 										LAYOUT_AddChild, gow->objects[GID_OPTS_FONT_MINSIZE] = IntegerObject,
 											GA_ID, GID_OPTS_FONT_MINSIZE,
 											GA_RelVerify, TRUE,
-											INTEGER_Number, option_font_min_size / 10,
+											INTEGER_Number, nsoption_int(font_min_size) / 10,
 											INTEGER_Minimum, 1,
 											INTEGER_Maximum, 99,
 											INTEGER_Arrows, TRUE,
@@ -1033,7 +1033,7 @@
 										LAYOUT_AddChild, gow->objects[GID_OPTS_CACHE_MEM] = IntegerObject,
 											GA_ID, GID_OPTS_CACHE_MEM,
 											GA_RelVerify, TRUE,
-											INTEGER_Number, option_memory_cache_size / 1048576,
+											INTEGER_Number, nsoption_int(memory_cache_size) / 1048576,
 											INTEGER_Minimum, 0,
 											INTEGER_Maximum, 2048,
 											INTEGER_Arrows, TRUE,
@@ -1058,7 +1058,7 @@
 											GA_ID, GID_OPTS_CACHE_DISC,
 											GA_RelVerify, TRUE,
 											GA_Disabled, TRUE,
-											INTEGER_Number, option_disc_cache_age,
+											INTEGER_Number, nsoption_int(disc_cache_age),
 											INTEGER_Minimum, 0,
 											INTEGER_Maximum, 366,
 											INTEGER_Arrows, TRUE,
@@ -1091,20 +1091,20 @@
          	           						GA_RelVerify, TRUE,
 											GA_Disabled, FALSE,
          	           						GA_Text, gadlab[GID_OPTS_OVERWRITE],
-	  				      		            GA_Selected, option_ask_overwrite,
+         	           						GA_Selected, nsoption_bool(ask_overwrite),
     	        	    				CheckBoxEnd,
 			                			LAYOUT_AddChild, gow->objects[GID_OPTS_NOTIFY] = CheckBoxObject,
       	    	          					GA_ID, GID_OPTS_NOTIFY,
          	    	       					GA_RelVerify, TRUE,
 											GA_Disabled, download_notify_disabled,
          	           						GA_Text, gadlab[GID_OPTS_NOTIFY],
-  					      		            GA_Selected, option_download_notify,
+         	           						GA_Selected, nsoption_bool(download_notify),
 										CheckBoxEnd,
 									LayoutEnd,
 									LAYOUT_AddChild, gow->objects[GID_OPTS_DLDIR] = GetFileObject,
 										GA_ID, GID_OPTS_DLDIR,
 										GA_RelVerify, TRUE,
-										GETFILE_Drawer, option_download_dir,
+										GETFILE_Drawer, nsoption_charp(download_dir),
 										GETFILE_DrawersOnly, TRUE,
 										GETFILE_ReadOnly, TRUE,
 										GETFILE_FullFileExpand, FALSE,
@@ -1123,19 +1123,19 @@
       	              						GA_ID, GID_OPTS_TAB_ACTIVE,
          	        	   					GA_RelVerify, TRUE,
          	     	      					GA_Text, gadlab[GID_OPTS_TAB_ACTIVE],
-  				      		            	GA_Selected, !option_new_tab_active,
+         	     	      					GA_Selected, !nsoption_bool(new_tab_active),
             	    					CheckBoxEnd,
 										LAYOUT_AddChild, gow->objects[GID_OPTS_TAB_LAST] = CheckBoxObject,
       	              						GA_ID, GID_OPTS_TAB_LAST,
          	           						GA_RelVerify, TRUE,
          	           						GA_Text, gadlab[GID_OPTS_TAB_LAST],
-  				      			            GA_Selected, option_new_tab_last,
+         	           						GA_Selected, nsoption_bool(new_tab_last),
             	    					CheckBoxEnd,
 										LAYOUT_AddChild, gow->objects[GID_OPTS_TAB_2] = CheckBoxObject,
       	              						GA_ID, GID_OPTS_TAB_2,
          	           						GA_RelVerify, TRUE,
          	           						GA_Text, gadlab[GID_OPTS_TAB_2],
-  				      			            GA_Selected, option_button_2_tab,
+         	           						GA_Selected, nsoption_bool(button_2_tab),
             	    					CheckBoxEnd,
 									LayoutEnd, // tabbed browsing
 
@@ -1147,19 +1147,19 @@
     	  	              					GA_ID, GID_OPTS_STARTUP_NO_WIN,
         	 	           					GA_RelVerify, TRUE,
 											GA_Text, gadlab[GID_OPTS_STARTUP_NO_WIN],
-  						      	            GA_Selected, option_startup_no_window,
+        	 	           					GA_Selected, nsoption_bool(startup_no_window),
             		    				CheckBoxEnd,
 		        	        			LAYOUT_AddChild, gow->objects[GID_OPTS_CLOSE_NO_QUIT] = CheckBoxObject,
       		              					GA_ID, GID_OPTS_CLOSE_NO_QUIT,
 											GA_RelVerify, TRUE,
 											GA_Text, gadlab[GID_OPTS_CLOSE_NO_QUIT],
-											GA_Selected, option_close_no_quit,
+											GA_Selected, nsoption_bool(close_no_quit),
 	        	        				CheckBoxEnd,
 		                				LAYOUT_AddChild, gow->objects[GID_OPTS_DOCKY] = CheckBoxObject,
 											GA_ID, GID_OPTS_DOCKY,
         	 	           					GA_RelVerify, TRUE,
          		           					GA_Text, gadlab[GID_OPTS_DOCKY],
-  					      		            GA_Selected, !option_hide_docky_icon,
+         		           					GA_Selected, !nsoption_bool(hide_docky_icon),
 	            		    			CheckBoxEnd,
 									LayoutEnd, // behaviour
 									CHILD_WeightedHeight, 0,
@@ -1175,7 +1175,7 @@
       		              					GA_ID, GID_OPTS_CLIPBOARD,
          		           					GA_RelVerify, TRUE,
          	    	       					GA_Text, gadlab[GID_OPTS_CLIPBOARD],
-  				    	  		            GA_Selected, option_utf8_clipboard,
+         	    	       					GA_Selected, nsoption_bool(utf8_clipboard),
             	    					CheckBoxEnd,
 									LayoutEnd, // clipboard
 									CHILD_WeightedHeight, 0,
@@ -1188,7 +1188,7 @@
 											GA_RelVerify, TRUE,
 											CHOOSER_PopUp, TRUE,
 											CHOOSER_LabelArray, websearch_list,
-											CHOOSER_Selected, option_search_provider,
+											CHOOSER_Selected, nsoption_int(search_provider),
 											CHOOSER_MaxLabels, 40,
 										ChooserEnd,
 										CHILD_Label, LabelObject,
@@ -1207,7 +1207,7 @@
    	    	          					GA_ID, GID_OPTS_CMENU_ENABLE,
        	 	           					GA_RelVerify, TRUE,
    	     	           					GA_Text, gadlab[GID_OPTS_CMENU_ENABLE],
-  				      		            GA_Selected, option_context_menu,
+   	     	           					GA_Selected, nsoption_bool(context_menu),
            	    					CheckBoxEnd,
 								LayoutEnd, // context menus
 								CHILD_WeightedHeight, 0,
@@ -1230,7 +1230,7 @@
 										LAYOUT_AddChild, gow->objects[GID_OPTS_MARGIN_TOP] = IntegerObject,
 											GA_ID, GID_OPTS_MARGIN_TOP,
 											GA_RelVerify, TRUE,
-											INTEGER_Number, option_margin_top,
+											INTEGER_Number, nsoption_int(margin_top),
 											INTEGER_Minimum, 0,
 											INTEGER_Maximum, 99,
 											INTEGER_Arrows, TRUE,
@@ -1248,7 +1248,7 @@
 										LAYOUT_AddChild, gow->objects[GID_OPTS_MARGIN_LEFT] = IntegerObject,
 											GA_ID, GID_OPTS_MARGIN_LEFT,
 											GA_RelVerify, TRUE,
-											INTEGER_Number, option_margin_left,
+											INTEGER_Number, nsoption_int(margin_left),
 											INTEGER_Minimum, 0,
 											INTEGER_Maximum, 99,
 											INTEGER_Arrows, TRUE,
@@ -1266,7 +1266,7 @@
 										LAYOUT_AddChild, gow->objects[GID_OPTS_MARGIN_BOTTOM] = IntegerObject,
 											GA_ID, GID_OPTS_MARGIN_BOTTOM,
 											GA_RelVerify, TRUE,
-											INTEGER_Number, option_margin_bottom,
+											INTEGER_Number, nsoption_int(margin_bottom),
 											INTEGER_Minimum, 0,
 											INTEGER_Maximum, 99,
 											INTEGER_Arrows, TRUE,
@@ -1284,7 +1284,7 @@
 										LAYOUT_AddChild, gow->objects[GID_OPTS_MARGIN_RIGHT] = IntegerObject,
 											GA_ID, GID_OPTS_MARGIN_RIGHT,
 											GA_RelVerify, TRUE,
-											INTEGER_Number, option_margin_right,
+											INTEGER_Number, nsoption_int(margin_right),
 											INTEGER_Minimum, 0,
 											INTEGER_Maximum, 99,
 											INTEGER_Arrows, TRUE,
@@ -1308,7 +1308,7 @@
 										LAYOUT_AddChild, gow->objects[GID_OPTS_EXPORT_SCALE] = IntegerObject,
 											GA_ID, GID_OPTS_EXPORT_SCALE,
 											GA_RelVerify, TRUE,
-											INTEGER_Number, option_export_scale,
+											INTEGER_Number, nsoption_int(export_scale),
 											INTEGER_Minimum, 0,
 											INTEGER_Maximum, 100,
 											INTEGER_Arrows, TRUE,
@@ -1331,19 +1331,19 @@
       	              					GA_ID, GID_OPTS_EXPORT_NOIMAGES,
          	           					GA_RelVerify, TRUE,
          	           					GA_Text, gadlab[GID_OPTS_EXPORT_NOIMAGES],
-  				      		            GA_Selected, option_suppress_images,
+         	           					GA_Selected, nsoption_bool(suppress_images),
             	    				CheckBoxEnd,
 		                			LAYOUT_AddChild, gow->objects[GID_OPTS_EXPORT_NOBKG] = CheckBoxObject,
       	              					GA_ID, GID_OPTS_EXPORT_NOBKG,
          	           					GA_RelVerify, TRUE,
          	           					GA_Text, gadlab[GID_OPTS_EXPORT_NOBKG],
-  				      		            GA_Selected, option_remove_backgrounds,
+         	           					GA_Selected, nsoption_bool(remove_backgrounds),
             	    				CheckBoxEnd,
 		                			LAYOUT_AddChild, gow->objects[GID_OPTS_EXPORT_LOOSEN] = CheckBoxObject,
       	              					GA_ID, GID_OPTS_EXPORT_LOOSEN,
          	           					GA_RelVerify, TRUE,
          	           					GA_Text, gadlab[GID_OPTS_EXPORT_LOOSEN],
-  				      		            GA_Selected, option_enable_loosening,
+         	           					GA_Selected, nsoption_bool(enable_loosening),
             	    				CheckBoxEnd,
 								LayoutEnd, // appearance
 								CHILD_WeightedHeight, 0,
@@ -1355,14 +1355,14 @@
       	              					GA_ID, GID_OPTS_EXPORT_COMPRESS,
          	           					GA_RelVerify, TRUE,
          	           					GA_Text, gadlab[GID_OPTS_EXPORT_COMPRESS],
-  				      		            GA_Selected, option_enable_PDF_compression,
+         	           					GA_Selected, nsoption_bool(enable_PDF_compression),
             	    				CheckBoxEnd,
 		                			LAYOUT_AddChild, gow->objects[GID_OPTS_EXPORT_PASSWORD] = CheckBoxObject,
       	              					GA_ID, GID_OPTS_EXPORT_PASSWORD,
          	           					GA_RelVerify, TRUE,
 										GA_Disabled, TRUE,
          	           					GA_Text, gadlab[GID_OPTS_EXPORT_PASSWORD],
-  				      		            GA_Selected, option_enable_PDF_password,
+         	           					GA_Selected, nsoption_bool(enable_PDF_password),
             	    				CheckBoxEnd,
 								LayoutEnd, // export
 								CHILD_WeightedHeight, 0,
@@ -1406,244 +1406,303 @@
 	char *dot;
 
 	GetAttr(STRINGA_TextVal,gow->objects[GID_OPTS_HOMEPAGE],(ULONG *)&data);
-	if(option_homepage_url) free(option_homepage_url);
-	option_homepage_url = (char *)strdup((char *)data);
+	nsoption_set_charp(homepage_url, (char *)strdup((char *)data));
 
 	GetAttr(STRINGA_TextVal,gow->objects[GID_OPTS_CONTENTLANG],(ULONG *)&data);
-	if(option_accept_language) free(option_accept_language);
-	option_accept_language = (char *)strdup((char *)data);
+	nsoption_set_charp(accept_language, (char *)strdup((char *)data));
 
 	GetAttr(GA_Selected, gow->objects[GID_OPTS_FROMLOCALE],(ULONG *)&data);
-	if(data) option_accept_lang_locale = true;
-		else option_accept_lang_locale = false;
+	if (data) {
+		nsoption_set_bool(accept_lang_locale, true);
+	} else {
+		nsoption_set_bool(accept_lang_locale, false);
+	}
 
 	GetAttr(GA_Selected,gow->objects[GID_OPTS_HIDEADS],(ULONG *)&data);
-	if(data) option_block_ads = true;
-		else option_block_ads = false;
-
-	GetAttr(INTEGER_Number,gow->objects[GID_OPTS_HISTORY],(ULONG *)&option_expire_url);
+	if (data) {
+		nsoption_set_bool(block_ads, true);
+	} else {
+		nsoption_set_bool(block_ads, false);
+	}
+
+	GetAttr(INTEGER_Number,gow->objects[GID_OPTS_HISTORY],(ULONG *)&nsoption_int(expire_url));
 
 	GetAttr(GA_Selected,gow->objects[GID_OPTS_REFERRAL],(ULONG *)&data);
-	if(data) option_send_referer = true;
-		else option_send_referer = false;
+	if (data) {
+		nsoption_set_bool(send_referer, true);
+	} else {
+		nsoption_set_bool(send_referer, false);
+	}
 
 	GetAttr(GA_Selected,gow->objects[GID_OPTS_FASTSCROLL],(ULONG *)&data);
-	if(data) option_faster_scroll = true;
-		else option_faster_scroll = false;
+	if (data) {
+		nsoption_set_bool(faster_scroll, true);
+	} else {
+		nsoption_set_bool(faster_scroll, false);
+	}
 
 	GetAttr(RADIOBUTTON_Selected,gow->objects[GID_OPTS_SCREEN],(ULONG *)&data);
 	switch(data)
 	{
 		case 0:
-			if(option_use_pubscreen) free(option_use_pubscreen);
-			option_use_pubscreen = NULL;
-		break;
+			nsoption_set_charp(use_pubscreen, NULL);
+			break;
 
 		case 1:
-			if(option_use_pubscreen) free(option_use_pubscreen);
-			option_use_pubscreen = (char *)strdup("Workbench");
-		break;
+			nsoption_set_charp(use_pubscreen, (char *)strdup("Workbench"));
+			break;
 
 		case 2:
 			GetAttr(STRINGA_TextVal,gow->objects[GID_OPTS_SCREENNAME],(ULONG *)&data);
-			if(option_use_pubscreen) free(option_use_pubscreen);
-			option_use_pubscreen = (char *)strdup((char *)data);
-		break;
+			nsoption_set_charp(use_pubscreen, (char *)strdup((char *)data));
+			break;
 	}
 
 	GetAttr(GETSCREENMODE_DisplayID, gow->objects[GID_OPTS_SCREENMODE], (ULONG *)&id);
 	if(id)
 	{
-		if(option_modeid) free(option_modeid);
-		option_modeid = malloc(20);
-		sprintf(option_modeid,"0x%lx", id);
+		char *modeid = malloc(20);
+		sprintf(modeid,"0x%lx", id);
+		nsoption_set_charp(modeid, modeid);
 	}
 
 	GetAttr(GETFILE_Drawer,gow->objects[GID_OPTS_THEME],(ULONG *)&data);
-	if(option_theme) free(option_theme);
-	option_theme = (char *)strdup((char *)data);
+	nsoption_set_charp(theme, (char *)strdup((char *)data));
 
 	GetAttr(GA_Selected,gow->objects[GID_OPTS_PTRTRUE],(ULONG *)&data);
-	if(data) option_truecolour_mouse_pointers = true;
-		else option_truecolour_mouse_pointers = false;
+	if (data) {
+		nsoption_set_bool(truecolour_mouse_pointers, true);
+	} else {
+		nsoption_set_bool(truecolour_mouse_pointers, false);
+	}
 
 	GetAttr(GA_Selected,gow->objects[GID_OPTS_PTROS],(ULONG *)&data);
-	if(data) option_use_os_pointers = true;
-		else option_use_os_pointers = false;
+	if (data) {
+		nsoption_set_bool(use_os_pointers, true);
+	} else {
+		nsoption_set_bool(use_os_pointers, false);
+	}
 
 	GetAttr(CHOOSER_Selected,gow->objects[GID_OPTS_PROXY],(ULONG *)&data);
 	if(data)
 	{
-		option_http_proxy = true;
-		option_http_proxy_auth = data - 1;
+		nsoption_set_bool(http_proxy, true);
+		nsoption_set_int(http_proxy_auth, data - 1);
 	}
 	else
 	{
-		option_http_proxy = false;
+		nsoption_set_bool(http_proxy, false);
 	}
 
 	GetAttr(STRINGA_TextVal,gow->objects[GID_OPTS_PROXY_HOST],(ULONG *)&data);
-	if(option_http_proxy_host) free(option_http_proxy_host);
-	option_http_proxy_host = (char *)strdup((char *)data);
-
-	GetAttr(INTEGER_Number,gow->objects[GID_OPTS_PROXY_PORT],(ULONG *)&option_http_proxy_port);
+	nsoption_set_charp(http_proxy_host, (char *)strdup((char *)data));
+
+	GetAttr(INTEGER_Number,gow->objects[GID_OPTS_PROXY_PORT],(ULONG *)&nsoption_int(http_proxy_port));
 
 	GetAttr(STRINGA_TextVal,gow->objects[GID_OPTS_PROXY_USER],(ULONG *)&data);
-	if(option_http_proxy_auth_user) free(option_http_proxy_auth_user);
-	option_http_proxy_auth_user = (char *)strdup((char *)data);
+	nsoption_set_charp(http_proxy_auth_user, (char *)strdup((char *)data));
 
 	GetAttr(STRINGA_TextVal,gow->objects[GID_OPTS_PROXY_PASS],(ULONG *)&data);
-	if(option_http_proxy_auth_pass) free(option_http_proxy_auth_pass);
-	option_http_proxy_auth_pass = (char *)strdup((char *)data);
-
-	GetAttr(INTEGER_Number,gow->objects[GID_OPTS_FETCHMAX],(ULONG *)&option_max_fetchers);
-	GetAttr(INTEGER_Number,gow->objects[GID_OPTS_FETCHHOST],(ULONG *)&option_max_fetchers_per_host);
-	GetAttr(INTEGER_Number,gow->objects[GID_OPTS_FETCHCACHE],(ULONG *)&option_max_cached_fetch_handles);
-
-	GetAttr(CHOOSER_Selected,gow->objects[GID_OPTS_NATIVEBM],(ULONG *)&option_cache_bitmaps);
+	nsoption_set_charp(http_proxy_auth_pass, (char *)strdup((char *)data));
+
+	GetAttr(INTEGER_Number,gow->objects[GID_OPTS_FETCHMAX],(ULONG *)&nsoption_int(max_fetchers));
+	GetAttr(INTEGER_Number,gow->objects[GID_OPTS_FETCHHOST],(ULONG *)&nsoption_int(max_fetchers_per_host));
+	GetAttr(INTEGER_Number,gow->objects[GID_OPTS_FETCHCACHE],(ULONG *)&nsoption_int(max_cached_fetch_handles));
+
+	GetAttr(CHOOSER_Selected,gow->objects[GID_OPTS_NATIVEBM],(ULONG *)&nsoption_int(cache_bitmaps));
 
 	GetAttr(GA_Selected,gow->objects[GID_OPTS_SCALEQ],(ULONG *)&data);
-	if(data) option_scale_quality = true;
-		else option_scale_quality = false;
+	if (data) {
+		nsoption_set_bool(scale_quality, true);
+	} else {
+		nsoption_set_bool(scale_quality, false);
+	}
 
 	GetAttr(STRINGA_TextVal,gow->objects[GID_OPTS_ANIMSPEED],(ULONG *)&data);
-	animspeed = strtof((char *)data,NULL);
-	option_minimum_gif_delay = (int)(animspeed * 100);
+	animspeed = strtof((char *)data, NULL);
+	nsoption_set_int(minimum_gif_delay, (int)(animspeed * 100));
 
 	GetAttr(GA_Selected,gow->objects[GID_OPTS_ANIMDISABLE],(ULONG *)&data);
-	if(data) option_animate_images = false;
-		else option_animate_images = true;
-
-	GetAttr(INTEGER_Number,gow->objects[GID_OPTS_DPI_Y],(ULONG *)&option_amiga_ydpi);
+	if(data) { 
+		nsoption_set_bool(animate_images, false);
+	} else { 
+		nsoption_set_bool(animate_images, true);
+	}
+
+	GetAttr(INTEGER_Number,gow->objects[GID_OPTS_DPI_Y],(ULONG *)&nsoption_int(amiga_ydpi));
 	ami_font_setdevicedpi(id); // id set above
 
 	GetAttr(GETFONT_TextAttr,gow->objects[GID_OPTS_FONT_SANS],(ULONG *)&data);
 	tattr = (struct TextAttr *)data;
-	if(option_font_sans) free(option_font_sans);
+
 	if(dot = strrchr(tattr->ta_Name,'.')) *dot = '\0';
-	option_font_sans = (char *)strdup((char *)tattr->ta_Name);
+	nsoption_set_charp(font_sans, (char *)strdup((char *)tattr->ta_Name));
 
 	GetAttr(GETFONT_TextAttr,gow->objects[GID_OPTS_FONT_SERIF],(ULONG *)&data);
 	tattr = (struct TextAttr *)data;
-	if(option_font_serif) free(option_font_serif);
+
 	if(dot = strrchr(tattr->ta_Name,'.')) *dot = '\0';
-	option_font_serif = (char *)strdup((char *)tattr->ta_Name);
+	nsoption_set_charp(font_serif, (char *)strdup((char *)tattr->ta_Name));
 
 	GetAttr(GETFONT_TextAttr,gow->objects[GID_OPTS_FONT_MONO],(ULONG *)&data);
 	tattr = (struct TextAttr *)data;
-	if(option_font_mono) free(option_font_mono);
+
 	if(dot = strrchr(tattr->ta_Name,'.')) *dot = '\0';
-	option_font_mono = (char *)strdup((char *)tattr->ta_Name);
+	nsoption_set_charp(font_mono, (char *)strdup((char *)tattr->ta_Name));
 
 	GetAttr(GETFONT_TextAttr,gow->objects[GID_OPTS_FONT_CURSIVE],(ULONG *)&data);
 	tattr = (struct TextAttr *)data;
-	if(option_font_cursive) free(option_font_cursive);
+
 	if(dot = strrchr(tattr->ta_Name,'.')) *dot = '\0';
-	option_font_cursive = (char *)strdup((char *)tattr->ta_Name);
+	nsoption_set_charp(font_cursive, (char *)strdup((char *)tattr->ta_Name));
 
 	GetAttr(GETFONT_TextAttr,gow->objects[GID_OPTS_FONT_FANTASY],(ULONG *)&data);
 	tattr = (struct TextAttr *)data;
-	if(option_font_fantasy) free(option_font_fantasy);
+
 	if(dot = strrchr(tattr->ta_Name,'.')) *dot = '\0';
-	option_font_fantasy = (char *)strdup((char *)tattr->ta_Name);
+	nsoption_set_charp(font_fantasy, (char *)strdup((char *)tattr->ta_Name));
 
 	GetAttr(GETFONT_TextAttr,gow->objects[GID_OPTS_FONT_UNICODE],(ULONG *)&data);
 	tattr = (struct TextAttr *)data;
-	if(option_font_unicode) free(option_font_unicode);
+
 	if(dot = strrchr(tattr->ta_Name,'.')) *dot = '\0';
-	option_font_unicode = (char *)strdup((char *)tattr->ta_Name);
-
-	GetAttr(CHOOSER_Selected,gow->objects[GID_OPTS_FONT_DEFAULT],(ULONG *)&option_font_default);
-	option_font_default += PLOT_FONT_FAMILY_SANS_SERIF;
-
-	GetAttr(INTEGER_Number,gow->objects[GID_OPTS_FONT_SIZE],(ULONG *)&option_font_size);
-	option_font_size *= 10;
-
-	GetAttr(INTEGER_Number,gow->objects[GID_OPTS_FONT_MINSIZE],(ULONG *)&option_font_min_size);
-	option_font_min_size *= 10;
-
-	GetAttr(INTEGER_Number,gow->objects[GID_OPTS_CACHE_MEM],(ULONG *)&option_memory_cache_size);
-	option_memory_cache_size *= 1048576;
-
-	GetAttr(INTEGER_Number,gow->objects[GID_OPTS_CACHE_DISC],(ULONG *)&option_disc_cache_age);
+	nsoption_set_charp(font_unicode, (char *)strdup((char *)tattr->ta_Name));
+
+	GetAttr(CHOOSER_Selected,gow->objects[GID_OPTS_FONT_DEFAULT],(ULONG *)&nsoption_int(font_default));
+	nsoption_set_int(font_default, nsoption_int(font_default) + PLOT_FONT_FAMILY_SANS_SERIF);
+
+	GetAttr(INTEGER_Number,gow->objects[GID_OPTS_FONT_SIZE],(ULONG *)&nsoption_int(font_size));
+	nsoption_set_int(font_size, nsoption_int(font_size) * 10);
+
+	GetAttr(INTEGER_Number,gow->objects[GID_OPTS_FONT_MINSIZE],(ULONG *)&nsoption_int(font_min_size));
+	nsoption_set_int(font_min_size, nsoption_int(font_min_size) * 10);
+
+	GetAttr(INTEGER_Number,gow->objects[GID_OPTS_CACHE_MEM],(ULONG *)&nsoption_int(memory_cache_size));
+	nsoption_set_int(memory_cache_size, nsoption_int(memory_cache_size) * 1048576);
+
+	GetAttr(INTEGER_Number,gow->objects[GID_OPTS_CACHE_DISC],(ULONG *)&nsoption_int(disc_cache_age));
 
 	GetAttr(GA_Selected,gow->objects[GID_OPTS_OVERWRITE],(ULONG *)&data);
-	if(data) option_ask_overwrite = true;
-		else option_ask_overwrite = false;
+	if (data) { 
+		nsoption_set_bool(ask_overwrite, true);
+	} else {
+		nsoption_set_bool(ask_overwrite, false);
+	}
 
 	GetAttr(GA_Selected,gow->objects[GID_OPTS_NOTIFY],(ULONG *)&data);
-	if(data) option_download_notify = true;
-		else option_download_notify = false;
+	if (data) {
+		nsoption_set_bool(download_notify, true);
+	} else {
+		nsoption_set_bool(download_notify, false);
+	}
 
 	GetAttr(GETFILE_Drawer,gow->objects[GID_OPTS_DLDIR],(ULONG *)&data);
-	if(option_download_dir) free(option_download_dir);
-	option_download_dir = (char *)strdup((char *)data);
+	nsoption_set_charp(download_dir, (char *)strdup((char *)data));
 
 	GetAttr(GA_Selected,gow->objects[GID_OPTS_TAB_ACTIVE],(ULONG *)&data);
-	if(data) option_new_tab_active = false;
-		else option_new_tab_active = true;
+	if (data) {
+		nsoption_set_bool(new_tab_active, false);
+	} else {
+		nsoption_set_bool(new_tab_active, true);
+	}
 
 	GetAttr(GA_Selected,gow->objects[GID_OPTS_TAB_LAST],(ULONG *)&data);
-	if(data) option_new_tab_last = true;
-		else option_new_tab_last = false;
+	if (data) {
+		nsoption_set_bool(new_tab_last, true);
+	} else {
+		nsoption_set_bool(new_tab_last, false);
+	}
 
 	GetAttr(GA_Selected,gow->objects[GID_OPTS_TAB_2],(ULONG *)&data);
-	if(data) option_button_2_tab = true;
-		else option_button_2_tab = false;
-
-	GetAttr(CHOOSER_Selected,gow->objects[GID_OPTS_SEARCH_PROV],(ULONG *)&option_search_provider);
-	search_web_provider_details(option_search_provider);
+	if (data) {
+		nsoption_set_bool(button_2_tab, true);
+	} else {
+		nsoption_set_bool(button_2_tab, false);
+	}
+
+	GetAttr(CHOOSER_Selected,gow->objects[GID_OPTS_SEARCH_PROV],(ULONG *)&nsoption_int(search_provider));
+	search_web_provider_details(nsoption_int(search_provider));
 	search_web_retrieve_ico(false);
 
 	GetAttr(GA_Selected,gow->objects[GID_OPTS_CLIPBOARD],(ULONG *)&data);
-	if(data) option_utf8_clipboard = true;
-		else option_utf8_clipboard = false;
+	if (data) {
+		nsoption_set_bool(utf8_clipboard, true);
+	} else {
+		nsoption_set_bool(utf8_clipboard, false);
+	}
 
 	GetAttr(GA_Selected,gow->objects[GID_OPTS_CMENU_ENABLE],(ULONG *)&data);
-	if(data) option_context_menu = true;
-		else option_context_menu = false;
+	if (data) {
+		nsoption_set_bool(context_menu, true);
+	} else {
+		nsoption_set_bool(context_menu, false);
+	}
 
 	GetAttr(GA_Selected,gow->objects[GID_OPTS_STARTUP_NO_WIN],(ULONG *)&data);
-	if(data) option_startup_no_window = true;
-		else option_startup_no_window = false;
+	if (data) {
+		nsoption_set_bool(startup_no_window, true);
+	} else {
+		nsoption_set_bool(startup_no_window, false);
+	}
 
 	GetAttr(GA_Selected,gow->objects[GID_OPTS_CLOSE_NO_QUIT],(ULONG *)&data);
-	if(data) option_close_no_quit = true;
-		else option_close_no_quit = false;
+	if (data) {
+		nsoption_set_bool(close_no_quit, true);
+	} else { 
+		nsoption_set_bool(close_no_quit, false);
+	}
 
 	GetAttr(GA_Selected,gow->objects[GID_OPTS_DOCKY],(ULONG *)&data);
-	if(data) option_hide_docky_icon = false;
-		else option_hide_docky_icon = true;
-
-	GetAttr(INTEGER_Number,gow->objects[GID_OPTS_MARGIN_TOP],(ULONG *)&option_margin_top);
-
-	GetAttr(INTEGER_Number,gow->objects[GID_OPTS_MARGIN_LEFT],(ULONG *)&option_margin_left);
-
-	GetAttr(INTEGER_Number,gow->objects[GID_OPTS_MARGIN_BOTTOM],(ULONG *)&option_margin_bottom);
-
-	GetAttr(INTEGER_Number,gow->objects[GID_OPTS_MARGIN_RIGHT],(ULONG *)&option_margin_right);
-
-	GetAttr(INTEGER_Number,gow->objects[GID_OPTS_EXPORT_SCALE],(ULONG *)&option_export_scale);
+	if (data) {
+		nsoption_set_bool(hide_docky_icon, false);
+	} else {
+		nsoption_set_bool(hide_docky_icon, true);
+	}
+
+	GetAttr(INTEGER_Number,gow->objects[GID_OPTS_MARGIN_TOP],(ULONG *)&nsoption_int(margin_top));
+
+	GetAttr(INTEGER_Number,gow->objects[GID_OPTS_MARGIN_LEFT],(ULONG *)&nsoption_int(margin_left));
+
+	GetAttr(INTEGER_Number,gow->objects[GID_OPTS_MARGIN_BOTTOM],(ULONG *)&nsoption_int(margin_bottom));
+
+	GetAttr(INTEGER_Number,gow->objects[GID_OPTS_MARGIN_RIGHT],(ULONG *)&nsoption_int(margin_right));
+
+	GetAttr(INTEGER_Number,gow->objects[GID_OPTS_EXPORT_SCALE],(ULONG *)&nsoption_int(export_scale));
 
 	GetAttr(GA_Selected,gow->objects[GID_OPTS_EXPORT_NOIMAGES],(ULONG *)&data);
-	if(data) option_suppress_images = true;
-		else option_suppress_images = false;
+	if (data) {
+		nsoption_set_bool(suppress_images, true);
+	} else {
+		nsoption_set_bool(suppress_images, false);
+	}
 
 	GetAttr(GA_Selected,gow->objects[GID_OPTS_EXPORT_NOBKG],(ULONG *)&data);
-	if(data) option_remove_backgrounds = true;
-		else option_remove_backgrounds = false;
+	if (data) {
+		nsoption_set_bool(remove_backgrounds, true);
+	} else {
+		nsoption_set_bool(remove_backgrounds, false);
+	}
 
 	GetAttr(GA_Selected,gow->objects[GID_OPTS_EXPORT_LOOSEN],(ULONG *)&data);
-	if(data) option_enable_loosening = true;
-		else option_enable_loosening = false;
+	if (data) {
+		nsoption_set_bool(enable_loosening, true);
+	} else {
+		nsoption_set_bool(enable_loosening, false);
+	}
 
 	GetAttr(GA_Selected,gow->objects[GID_OPTS_EXPORT_COMPRESS],(ULONG *)&data);
-	if(data) option_enable_PDF_compression = true;
-		else option_enable_PDF_compression = false;
+	if (data) {
+		nsoption_set_bool(enable_PDF_compression, true);
+	} else {
+		nsoption_set_bool(enable_PDF_compression, false);
+	}
 
 	GetAttr(GA_Selected,gow->objects[GID_OPTS_EXPORT_PASSWORD],(ULONG *)&data);
-	if(data) option_enable_PDF_password = true;
-		else option_enable_PDF_password = false;
+	if (data) {
+		nsoption_set_bool(enable_PDF_password, true);
+	} else {
+		nsoption_set_bool(enable_PDF_password, false);
+	}
 }
 
 void ami_gui_opts_close(void)
@@ -1852,9 +1911,9 @@
 
 	websearchlist = AllocVec(200, MEMF_CLEAR);
 
-	if (option_search_engines_file == NULL) return websearchlist;
-
-	FILE *f = fopen(option_search_engines_file, "r");
+	if (nsoption_charp(search_engines_file) == NULL) return websearchlist;
+
+	FILE *f = fopen(nsoption_charp(search_engines_file), "r");
 	if (f == NULL) return websearchlist;
 
 	while (fgets(buf, sizeof(buf), f) != NULL) {

Modified: branches/vince/netsurf-options/amiga/plotters.c
URL: http://source.netsurf-browser.org/branches/vince/netsurf-options/amiga/plotters.c?rev=13529&r1=13528&r2=13529&view=diff
==============================================================================
--- branches/vince/netsurf-options/amiga/plotters.c (original)
+++ branches/vince/netsurf-options/amiga/plotters.c Sun Mar 18 17:20:03 2012
@@ -121,10 +121,10 @@
 
 	struct BitMap *friend = NULL; /* Required to be NULL for Cairo and ARGB bitmaps */
 
-	if(option_redraw_tile_size_x <= 0) option_redraw_tile_size_x = scrn->Width;
-	if(option_redraw_tile_size_y <= 0) option_redraw_tile_size_y = scrn->Height;
-	if(!width) width = option_redraw_tile_size_x;
-	if(!height) height = option_redraw_tile_size_y;
+	if(nsoption_int(redraw_tile_size_x) <= 0) nsoption_set_int(redraw_tile_size_x, scrn->Width);
+	if(nsoption_int(redraw_tile_size_y) <= 0) nsoption_set_int(redraw_tile_size_y, scrn->Height);
+	if(!width) width = nsoption_int(redraw_tile_size_x);
+	if(!height) height = nsoption_int(redraw_tile_size_y);
 
 	gg->layerinfo = NewLayerInfo();
 	gg->areabuf = AllocVec(100,MEMF_PRIVATE | MEMF_CLEAR);
@@ -206,7 +206,7 @@
 
 	if (style->fill_type != PLOT_OP_TYPE_NONE) { 
 
-		if(option_cairo_renderer < 2)
+		if(nsoption_int(cairo_renderer) < 2)
 		{
 			SetRPAttrs(glob->rp, RPTAG_APenColor,
 				p96EncodeColor(RGBFB_A8B8G8R8, style->fill_colour),
@@ -228,7 +228,7 @@
 	}
 
 	if (style->stroke_type != PLOT_OP_TYPE_NONE) {
-		if(option_cairo_renderer < 2)
+		if(nsoption_int(cairo_renderer) < 2)
 		{
 			glob->rp->PenWidth = style->stroke_width;
 			glob->rp->PenHeight = style->stroke_width;
@@ -301,7 +301,7 @@
 	LOG(("[ami_plotter] Entered ami_line()"));
 	#endif
 
-	if(option_cairo_renderer < 2)
+	if(nsoption_int(cairo_renderer) < 2)
 	{
 		glob->rp->PenWidth = style->stroke_width;
 		glob->rp->PenHeight = style->stroke_width;
@@ -377,7 +377,7 @@
 
 	int k;
 
-	if(option_cairo_renderer < 1)
+	if(nsoption_int(cairo_renderer) < 1)
 	{
 		ULONG cx,cy;
 
@@ -443,7 +443,7 @@
 	}
 
 #ifdef NS_AMIGA_CAIRO
-	if(option_cairo_renderer == 2)
+	if(nsoption_int(cairo_renderer) == 2)
 	{
 		cairo_reset_clip(glob->cr);
 		cairo_rectangle(glob->cr, clip->x0, clip->y0,
@@ -472,7 +472,7 @@
 	LOG(("[ami_plotter] Entered ami_disc()"));
 	#endif
 
-	if(option_cairo_renderer < 2)
+	if(nsoption_int(cairo_renderer) < 2)
 	{
 		if (style->fill_type != PLOT_OP_TYPE_NONE) {
 			SetRPAttrs(glob->rp,
@@ -525,7 +525,7 @@
 	LOG(("[ami_plotter] Entered ami_arc()"));
 	#endif
 
-	if(option_cairo_renderer >= 1)
+	if(nsoption_int(cairo_renderer) >= 1)
 	{
 #ifdef NS_AMIGA_CAIRO
 		ami_cairo_set_colour(glob->cr, style->fill_colour);
@@ -801,7 +801,7 @@
 /* We should probably check if the off-screen bitmap is 32-bit and render
  * using Cairo regardless if it is.  For now, we respect user preferences.
  */
-	if(option_cairo_renderer >= 1)
+	if(nsoption_int(cairo_renderer) >= 1)
 	{
 		unsigned int i;
 		cairo_matrix_t old_ctm, n_ctm;

Modified: branches/vince/netsurf-options/amiga/print.c
URL: http://source.netsurf-browser.org/branches/vince/netsurf-options/amiga/print.c?rev=13529&r1=13528&r2=13529&view=diff
==============================================================================
--- branches/vince/netsurf-options/amiga/print.c (original)
+++ branches/vince/netsurf-options/amiga/print.c Sun Mar 18 17:20:03 2012
@@ -255,7 +255,7 @@
 					GA_RelVerify, TRUE,
 					GA_TabCycle, TRUE,
 					CHOOSER_LabelArray, printers,
-					CHOOSER_Selected, option_printer_unit,
+					CHOOSER_Selected, nsoption_int(printer_unit),
 				ChooserEnd,
 				CHILD_Label, LabelObject,
 					LABEL_Text, gadlab[PGID_PRINTER],
@@ -278,7 +278,7 @@
 						GA_ID, PGID_SCALE,
 						GA_RelVerify, TRUE,
 						GA_TabCycle, TRUE,
-						INTEGER_Number, option_print_scale,
+						INTEGER_Number, nsoption_int(print_scale),
 						INTEGER_Minimum, 0,
 						INTEGER_Maximum, 100,
 						INTEGER_Arrows, TRUE,
@@ -331,6 +331,8 @@
 	uint16 code;
 	struct hlcache_handle *c;
 	int copies;
+	int print_scale;
+	int printer_unit;
 
 	while((result = RA_HandleInput(pw->objects[OID_MAIN],&code)) != WMHI_LASTMSG)
 	{
@@ -341,11 +343,14 @@
 				{
 					case PGID_PRINT:
 						GetAttr(INTEGER_Number, pw->gadgets[PGID_SCALE],
-							(ULONG *)&option_print_scale);
+							(ULONG *)&print_scale);
 						GetAttr(INTEGER_Number, pw->gadgets[PGID_COPIES],
 							(ULONG *)&copies);
 						GetAttr(CHOOSER_Selected, pw->gadgets[PGID_PRINTER],
-							(ULONG *)&option_printer_unit);
+							(ULONG *)&printer_unit);
+
+						nsoption_set_int(print_scale, print_scale);
+						nsoption_set_int(printer_unit, printer_unit);
 
 						c = pw->c;
 						ami_print_close(pw);
@@ -372,7 +377,7 @@
 void ami_print(struct hlcache_handle *c, int copies)
 {
 	double height, print_height;
-	float scale = option_print_scale / 100.0;
+	float scale = nsoption_int(print_scale) / 100.0;
 
 	if(!ami_print_info.msgport) return;
 
@@ -383,7 +388,7 @@
 				ASO_NoTrack, FALSE,
 				TAG_DONE))) return;
 
-	if(OpenDevice("printer.device", option_printer_unit,
+	if(OpenDevice("printer.device", nsoption_int(printer_unit),
 			(struct IORequest *)ami_print_info.PReq, 0))
 	{
 		warn_user("CompError","printer.device");

Modified: branches/vince/netsurf-options/amiga/stringview/urlhistory.c
URL: http://source.netsurf-browser.org/branches/vince/netsurf-options/amiga/stringview/urlhistory.c?rev=13529&r1=13528&r2=13529&view=diff
==============================================================================
--- branches/vince/netsurf-options/amiga/stringview/urlhistory.c (original)
+++ branches/vince/netsurf-options/amiga/stringview/urlhistory.c Sun Mar 18 17:20:03 2012
@@ -106,7 +106,7 @@
 
 void URLHistory_AddPage( const char * urlString )
 {
-	if(!option_url_suggestion) return;
+	if(!nsoption_bool(url_suggestion)) return;
 
 	// Only search if length > 0
 	if( strlen( urlString ) > 0 )

Modified: branches/vince/netsurf-options/amiga/theme.c
URL: http://source.netsurf-browser.org/branches/vince/netsurf-options/amiga/theme.c?rev=13529&r1=13528&r2=13529&view=diff
==============================================================================
--- branches/vince/netsurf-options/amiga/theme.c (original)
+++ branches/vince/netsurf-options/amiga/theme.c Sun Mar 18 17:20:03 2012
@@ -100,17 +100,16 @@
 	char searchico[1024];
 	BPTR lock = 0;
 
-	strcpy(themefile,option_theme);
+	strcpy(themefile,nsoption_charp(theme));
 	AddPart(themefile,"Theme",100);
 
 	lock = Lock(themefile,ACCESS_READ);
 
 	if(!lock)
 	{
-		warn_user("ThemeApplyErr",option_theme);
+		warn_user("ThemeApplyErr",nsoption_charp(theme));
 		strcpy(themefile,"PROGDIR:Resources/Themes/Default/Theme");
-		free(option_theme);
-		option_theme = (char *)strdup("PROGDIR:Resources/Themes/Default");		
+		nsoption_set_charp(theme, (char *)strdup("PROGDIR:Resources/Themes/Default"));
 	}
 	else
 	{
@@ -194,7 +193,7 @@
 	}
 	else
 	{
-		strcat(filename, option_theme);
+		strcat(filename, nsoption_charp(theme));
 		AddPart(filename, messages_get(themestring), 100);
 	}
 }
@@ -209,7 +208,7 @@
 	if(mouseptrcurrent == shape) return;
 	if(drag_save_data) return;
 
-	if(option_use_os_pointers)
+	if(nsoption_bool(use_os_pointers))
 	{
 		switch(shape)
 		{
@@ -287,7 +286,7 @@
 		mouseptrobj[i] = NULL;
 		char ptrfname[1024];
 
-		if(option_truecolour_mouse_pointers)
+		if(nsoption_bool(truecolour_mouse_pointers))
 		{
 			ami_get_theme_filename((char *)&ptrfname,ptrs32[i], false);
 			if(dobj = GetIconTags(ptrfname,ICONGETA_UseFriendBitMap,TRUE,TAG_DONE))
@@ -405,7 +404,7 @@
 	ULONG cur_tab = 0;
 
 	if(!g) return;
-	if(option_kiosk_mode) return;
+	if(nsoption_bool(kiosk_mode)) return;
 
 	if(g->tab_node && (g->shared->tabs > 1))
 	{
@@ -435,7 +434,7 @@
 	ULONG cur_tab = 0;
 
 	if(!g) return;
-	if(option_kiosk_mode) return;
+	if(nsoption_bool(kiosk_mode)) return;
 
 	if(g->tab_node && (g->shared->tabs > 1))
 	{

Modified: branches/vince/netsurf-options/amiga/tree.c
URL: http://source.netsurf-browser.org/branches/vince/netsurf-options/amiga/tree.c?rev=13529&r1=13528&r2=13529&view=diff
==============================================================================
--- branches/vince/netsurf-options/amiga/tree.c (original)
+++ branches/vince/netsurf-options/amiga/tree.c Sun Mar 18 17:20:03 2012
@@ -573,26 +573,26 @@
 		ULONG top = (scrn->Height / 2) - (height / 2);
 		ULONG left = (scrn->Width / 2) - (width / 2);
 
-		if((type == AMI_TREE_HOTLIST) && (option_hotlist_window_xsize > 0))
+		if((type == AMI_TREE_HOTLIST) && (nsoption_int(hotlist_window_xsize) > 0))
 		{
-			top = option_hotlist_window_ypos;
-			left = option_hotlist_window_xpos;
-			width = option_hotlist_window_xsize;
-			height = option_hotlist_window_ysize;
+			top = nsoption_int(hotlist_window_ypos);
+			left = nsoption_int(hotlist_window_xpos);
+			width = nsoption_int(hotlist_window_xsize);
+			height = nsoption_int(hotlist_window_ysize);
 		}
-		else if((type == AMI_TREE_HISTORY) && (option_history_window_xsize > 0))
+		else if((type == AMI_TREE_HISTORY) && (nsoption_int(history_window_xsize) > 0))
 		{
-			top = option_history_window_ypos;
-			left = option_history_window_xpos;
-			width = option_history_window_xsize;
-			height = option_history_window_ysize;
+			top = nsoption_int(history_window_ypos);
+			left = nsoption_int(history_window_xpos);
+			width = nsoption_int(history_window_xsize);
+			height = nsoption_int(history_window_ysize);
 		}
-		else if((type == AMI_TREE_COOKIES) && (option_cookies_window_xsize > 0))
+		else if((type == AMI_TREE_COOKIES) && (nsoption_int(cookies_window_xsize) > 0))
 		{
-			top = option_cookies_window_ypos;
-			left = option_cookies_window_xpos;
-			width = option_cookies_window_xsize;
-			height = option_cookies_window_ysize;
+			top = nsoption_int(cookies_window_ypos);
+			left = nsoption_int(cookies_window_xpos);
+			width = nsoption_int(cookies_window_xsize);
+			height = nsoption_int(cookies_window_ysize);
 		}
 
 		twin->objects[OID_MAIN] = WindowObject,
@@ -1093,22 +1093,22 @@
 									switch(twin->type)
 									{
 										case AMI_TREE_HISTORY:
-											option_history_window_ypos = twin->win->TopEdge;
-											option_history_window_xpos = twin->win->LeftEdge;
-											option_history_window_xsize = twin->win->Width;
-											option_history_window_ysize = twin->win->Height;
+											nsoption_set_int(history_window_ypos, twin->win->TopEdge);
+											nsoption_set_int(history_window_xpos, twin->win->LeftEdge);
+											nsoption_set_int(history_window_xsize, twin->win->Width);
+											nsoption_set_int(history_window_ysize, twin->win->Height);
 										break;
 										case AMI_TREE_COOKIES:
-											option_cookies_window_ypos = twin->win->TopEdge;
-											option_cookies_window_xpos = twin->win->LeftEdge;
-											option_cookies_window_xsize = twin->win->Width;
-											option_cookies_window_ysize = twin->win->Height;
+											nsoption_set_int(cookies_window_ypos, twin->win->TopEdge);
+											nsoption_set_int(cookies_window_xpos, twin->win->LeftEdge);
+											nsoption_set_int(cookies_window_xsize, twin->win->Width);
+											nsoption_set_int(cookies_window_ysize, twin->win->Height);
 										break;
 										case AMI_TREE_HOTLIST:
-											option_hotlist_window_ypos = twin->win->TopEdge;
-											option_hotlist_window_xpos = twin->win->LeftEdge;
-											option_hotlist_window_xsize = twin->win->Width;
-											option_hotlist_window_ysize = twin->win->Height;
+											nsoption_set_int(hotlist_window_ypos, twin->win->TopEdge);
+											nsoption_set_int(hotlist_window_xpos, twin->win->LeftEdge);
+											nsoption_set_int(hotlist_window_xsize, twin->win->Width);
+											nsoption_set_int(hotlist_window_ysize, twin->win->Height);
 										break;
 									}
 								break;
@@ -1248,14 +1248,14 @@
 		y = pos_y;
 	}
 
-	for(tile_y = y; tile_y < (y + height); tile_y += option_redraw_tile_size_y) {
-		tile_h = option_redraw_tile_size_y;
-		if(((y + height) - tile_y) < option_redraw_tile_size_y)
+	for(tile_y = y; tile_y < (y + height); tile_y += nsoption_int(redraw_tile_size_y)) {
+		tile_h = nsoption_int(redraw_tile_size_y);
+		if(((y + height) - tile_y) < nsoption_int(redraw_tile_size_y))
 			tile_h = (y + height) - tile_y;
 
-		for(tile_x = x; tile_x < (x + width); tile_x += option_redraw_tile_size_x) {
-			tile_w = option_redraw_tile_size_x;
-			if(((x + width) - tile_x) < option_redraw_tile_size_x)
+		for(tile_x = x; tile_x < (x + width); tile_x += nsoption_int(redraw_tile_size_x)) {
+			tile_w = nsoption_int(redraw_tile_size_x);
+			if(((x + width) - tile_x) < nsoption_int(redraw_tile_size_x))
 				tile_w = (x + width) - tile_x;
 
 			tree_draw(twin->tree, - tile_x, - tile_y,




More information about the netsurf-commits mailing list