summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2013-05-28 16:44:46 +0100
committerVincent Sanders <vince@kyllikki.org>2013-05-28 16:44:46 +0100
commita92e5930ffbcb178a2d2420ee2f6d4834ffa90e1 (patch)
treeb3284a8aaadc287ecb3397f989fc9e4d53dd4191
parentfcc61ea37437fbfd163c5a96a7119bbcf69073e1 (diff)
downloadnetsurf-a92e5930ffbcb178a2d2420ee2f6d4834ffa90e1.tar.gz
netsurf-a92e5930ffbcb178a2d2420ee2f6d4834ffa90e1.tar.bz2
fixup issues with new options API merge
-rw-r--r--amiga/clipboard.c4
-rwxr-xr-xamiga/font.c6
-rw-r--r--amiga/gui.c16
-rwxr-xr-xamiga/gui_options.c29
-rw-r--r--amiga/menu.c2
-rw-r--r--amiga/theme.c2
-rw-r--r--atari/deskmenu.c2
-rw-r--r--atari/settings.c4
-rw-r--r--beos/gui.cpp2
-rw-r--r--riscos/buffer.c2
-rw-r--r--riscos/configure/con_image.c8
-rw-r--r--riscos/dialog.c2
-rw-r--r--riscos/gui.c2
-rw-r--r--riscos/image.c4
-rw-r--r--utils/nsoption.h1
-rw-r--r--windows/gui.c2
-rw-r--r--windows/prefs.c3
17 files changed, 46 insertions, 45 deletions
diff --git a/amiga/clipboard.c b/amiga/clipboard.c
index d0772f1b0..fd42f4d61 100644
--- a/amiga/clipboard.c
+++ b/amiga/clipboard.c
@@ -238,7 +238,7 @@ void gui_set_clipboard(const char *buffer, size_t length,
{
if(!(PushChunk(iffh, ID_FTXT, ID_FORM, IFFSIZE_UNKNOWN)))
{
- if(nsoption_bool(utf8_clipboard))
+ if(nsoption_bool(clipboard_write_utf8))
{
if(!(PushChunk(iffh, 0, ID_CSET, 32)))
{
@@ -254,7 +254,7 @@ void gui_set_clipboard(const char *buffer, size_t length,
}
if(!(PushChunk(iffh, 0, ID_CHRS, IFFSIZE_UNKNOWN))) {
- if(nsoption_bool(utf8_clipboard)) {
+ if(nsoption_bool(clipboard_write_utf8)) {
WriteChunkBytes(iffh, buffer, length);
} else {
if(utf8_to_local_encoding(buffer, length, &text) == UTF8_CONVERT_OK) {
diff --git a/amiga/font.c b/amiga/font.c
index 69001a28d..f10db53e4 100755
--- a/amiga/font.c
+++ b/amiga/font.c
@@ -881,10 +881,10 @@ void ami_font_setdevicedpi(int id)
{
DisplayInfoHandle dih;
struct DisplayInfo dinfo;
- ULONG ydpi = nsoption_int(amiga_ydpi);
- ULONG xdpi = nsoption_int(amiga_ydpi);
+ ULONG ydpi = nsoption_int(screen_ydpi);
+ ULONG xdpi = nsoption_int(screen_ydpi);
- nscss_screen_dpi = INTTOFIX(nsoption_int(amiga_ydpi));
+ nscss_screen_dpi = INTTOFIX(nsoption_int(screen_ydpi));
if(id && (nsoption_int(monitor_aspect_x) != 0) && (nsoption_int(monitor_aspect_y) != 0))
{
diff --git a/amiga/gui.c b/amiga/gui.c
index 9737ed087..4ce629b73 100644
--- a/amiga/gui.c
+++ b/amiga/gui.c
@@ -131,6 +131,8 @@
#include <math.h>
#include <string.h>
+define AMINS_SCROLLERPEN NUMDRIPENS
+
#define NSA_KBD_SCROLL_PX 10
/* Extra mouse button defines to match those in intuition/intuition.h */
@@ -668,10 +670,10 @@ void ami_openscreen(void)
if (nsoption_charp(use_pubscreen) == NULL)
{
- if((nsoption_charp(modeid)) &&
- (strncmp(nsoption_charp(modeid), "0x", 2) == 0))
+ if((nsoption_charp(screen_modeid)) &&
+ (strncmp(nsoption_charp(screen_modeid), "0x", 2) == 0))
{
- id = strtoul(nsoption_charp(modeid), NULL, 0);
+ id = strtoul(nsoption_charp(screen_modeid), NULL, 0);
}
else
{
@@ -687,8 +689,8 @@ void ami_openscreen(void)
char *modeid = malloc(20);
id = screenmodereq->sm_DisplayID;
sprintf(modeid, "0x%lx", id);
- nsoption_set_charp(modeid, modeid);
- nsoption_write(current_user_options);
+ nsoption_set_charp(screen_modeid, modeid);
+ nsoption_write(current_user_options, NULL, NULL);
}
FreeAslRequest(screenmodereq);
}
@@ -3196,7 +3198,7 @@ struct gui_window *gui_create_browser_window(struct browser_window *bw,
CLICKTAB_Labels, &g->shared->tab_list,
TAG_DONE);
- if(nsoption_bool(new_tab_active))
+ if(nsoption_bool(new_tab_is_active))
{
RefreshSetGadgetAttrs((struct Gadget *)g->shared->objects[GID_TABS],g->shared->win,NULL,
CLICKTAB_Current,g->tab,
@@ -3209,7 +3211,7 @@ struct gui_window *gui_create_browser_window(struct browser_window *bw,
g->shared->tabs++;
g->shared->next_tab++;
- if(nsoption_bool(new_tab_active)) ami_switch_tab(g->shared,false);
+ if(nsoption_bool(new_tab_is_active)) ami_switch_tab(g->shared,false);
ami_update_buttons(g->shared);
diff --git a/amiga/gui_options.c b/amiga/gui_options.c
index 102036ded..16d6fc1f5 100755
--- a/amiga/gui_options.c
+++ b/amiga/gui_options.c
@@ -435,9 +435,10 @@ void ami_gui_opts_open(void)
screennamedisabled = TRUE;
}
- if((nsoption_charp(modeid)) && (strncmp(nsoption_charp(modeid),"0x",2) == 0))
+ if((nsoption_charp(screen_modeid)) &&
+ (strncmp(nsoption_charp(screen_modeid),"0x",2) == 0))
{
- screenmodeid = strtoul(nsoption_charp(modeid),NULL,0);
+ screenmodeid = strtoul(nsoption_charp(screen_modeid),NULL,0);
}
if(nsoption_bool(http_proxy))
@@ -743,7 +744,7 @@ void ami_gui_opts_open(void)
GA_ID, GID_OPTS_PTROS,
GA_RelVerify, TRUE,
GA_Text, gadlab[GID_OPTS_PTROS],
- GA_Selected, nsoption_bool(use_os_pointers),
+ GA_Selected, nsoption_bool(os_mouse_pointers),
CheckBoxEnd,
LayoutEnd, // mouse
CHILD_WeightedHeight,0,
@@ -1163,7 +1164,7 @@ void ami_gui_opts_open(void)
GA_ID, GID_OPTS_TAB_ACTIVE,
GA_RelVerify, TRUE,
GA_Text, gadlab[GID_OPTS_TAB_ACTIVE],
- GA_Selected, !nsoption_bool(new_tab_active),
+ GA_Selected, !nsoption_bool(new_tab_is_active),
CheckBoxEnd,
LAYOUT_AddChild, gow->objects[GID_OPTS_TAB_LAST] = CheckBoxObject,
GA_ID, GID_OPTS_TAB_LAST,
@@ -1274,7 +1275,7 @@ void ami_gui_opts_open(void)
GA_ID, GID_OPTS_CLIPBOARD,
GA_RelVerify, TRUE,
GA_Text, gadlab[GID_OPTS_CLIPBOARD],
- GA_Selected, nsoption_bool(utf8_clipboard),
+ GA_Selected, nsoption_bool(clipboard_write_utf8),
CheckBoxEnd,
LayoutEnd, // clipboard
CHILD_WeightedHeight, 0,
@@ -1590,7 +1591,7 @@ void ami_gui_opts_use(bool save)
{
char *modeid = malloc(20);
sprintf(modeid,"0x%lx", id);
- nsoption_set_charp(modeid, modeid);
+ nsoption_set_charp(screen_modeid, modeid);
}
GetAttr(GA_Selected,gow->objects[GID_OPTS_WIN_SIMPLE],(ULONG *)&data);
@@ -1614,9 +1615,9 @@ void ami_gui_opts_use(bool save)
GetAttr(GA_Selected,gow->objects[GID_OPTS_PTROS],(ULONG *)&data);
if (data) {
- nsoption_set_bool(use_os_pointers, true);
+ nsoption_set_bool(os_mouse_pointers, true);
} else {
- nsoption_set_bool(use_os_pointers, false);
+ nsoption_set_bool(os_mouse_pointers, false);
}
GetAttr(CHOOSER_Selected,gow->objects[GID_OPTS_PROXY],(ULONG *)&data);
@@ -1667,7 +1668,7 @@ void ami_gui_opts_use(bool save)
nsoption_set_bool(animate_images, true);
}
- GetAttr(INTEGER_Number,gow->objects[GID_OPTS_DPI_Y],(ULONG *)&nsoption_int(amiga_ydpi));
+ GetAttr(INTEGER_Number,gow->objects[GID_OPTS_DPI_Y],(ULONG *)&nsoption_int(screen_ydpi));
ami_font_setdevicedpi(id); // id set above
GetAttr(GETFONT_TextAttr,gow->objects[GID_OPTS_FONT_SANS],(ULONG *)&data);
@@ -1740,9 +1741,9 @@ void ami_gui_opts_use(bool save)
GetAttr(GA_Selected,gow->objects[GID_OPTS_TAB_ACTIVE],(ULONG *)&data);
if (data) {
- nsoption_set_bool(new_tab_active, false);
+ nsoption_set_bool(new_tab_is_active, false);
} else {
- nsoption_set_bool(new_tab_active, true);
+ nsoption_set_bool(new_tab_is_active, true);
}
GetAttr(GA_Selected,gow->objects[GID_OPTS_TAB_LAST],(ULONG *)&data);
@@ -1784,9 +1785,9 @@ void ami_gui_opts_use(bool save)
GetAttr(GA_Selected,gow->objects[GID_OPTS_CLIPBOARD],(ULONG *)&data);
if (data) {
- nsoption_set_bool(utf8_clipboard, true);
+ nsoption_set_bool(clipboard_write_utf8, true);
} else {
- nsoption_set_bool(utf8_clipboard, false);
+ nsoption_set_bool(clipboard_write_utf8, false);
}
GetAttr(GA_Selected,gow->objects[GID_OPTS_CONTEXTMENU],(ULONG *)&data);
@@ -1868,7 +1869,7 @@ void ami_gui_opts_use(bool save)
}
if(save == true) {
- nsoption_write(current_user_options);
+ nsoption_write(current_user_options, NULL, NULL);
ami_font_savescanner(); /* just in case it has changed and been used only */
}
diff --git a/amiga/menu.c b/amiga/menu.c
index c7c3c4671..5cd7e6aa0 100644
--- a/amiga/menu.c
+++ b/amiga/menu.c
@@ -953,7 +953,7 @@ static void ami_menu_item_settings_snapshot(struct Hook *hook, APTR window, stru
static void ami_menu_item_settings_save(struct Hook *hook, APTR window, struct IntuiMessage *msg)
{
- nsoption_write(current_user_options);
+ nsoption_write(current_user_options, NULL, NULL);
}
static void ami_menu_item_arexx_execute(struct Hook *hook, APTR window, struct IntuiMessage *msg)
diff --git a/amiga/theme.c b/amiga/theme.c
index ca5e2b622..a0755b23a 100644
--- a/amiga/theme.c
+++ b/amiga/theme.c
@@ -193,7 +193,7 @@ void ami_update_pointer(struct Window *win, gui_pointer_shape shape)
{
if(drag_save_data) return;
- if(nsoption_bool(use_os_pointers))
+ if(nsoption_bool(os_mouse_pointers))
{
switch(shape)
{
diff --git a/atari/deskmenu.c b/atari/deskmenu.c
index e4bfa98ba..4300498f9 100644
--- a/atari/deskmenu.c
+++ b/atari/deskmenu.c
@@ -389,7 +389,7 @@ static void __CDECL menu_savewin(short item, short title, void *data)
nsoption_set_int(window_height, rect.g_h);
nsoption_set_int(window_x, rect.g_x);
nsoption_set_int(window_y, rect.g_y);
- nsoption_write((const char*)&options);
+ nsoption_write((const char*)&options, NULL, NULL);
}
}
diff --git a/atari/settings.c b/atari/settings.c
index 5c3604f00..10aceb985 100644
--- a/atari/settings.c
+++ b/atari/settings.c
@@ -113,8 +113,8 @@ static void save_settings(void)
{
apply_settings();
// Save settings
- nsoption_write( (const char*)&options );
- nsoption_read( (const char*)&options );
+ nsoption_write( (const char*)&options, NULL, NULL);
+ nsoption_read( (const char*)&options , NULL);
close_settings();
form_alert(1, "[1][Some options require an netsurf restart!][OK]");
deskmenu_update();
diff --git a/beos/gui.cpp b/beos/gui.cpp
index 5e0f3fd83..766782259 100644
--- a/beos/gui.cpp
+++ b/beos/gui.cpp
@@ -637,7 +637,7 @@ void gui_init(int argc, char** argv)
find_resource(buf, "Choices", "%/Choices");
LOG(("Using '%s' as Preferences file", buf));
options_file_location = strdup(buf);
- nsoption_read(buf);
+ nsoption_read(buf, NULL);
/* check what the font settings are, setting them to a default font
diff --git a/riscos/buffer.c b/riscos/buffer.c
index a1b99f493..56c245882 100644
--- a/riscos/buffer.c
+++ b/riscos/buffer.c
@@ -274,7 +274,7 @@ void ro_gui_buffer_close(void)
_swix(Tinct_Plot, _IN(2) | _IN(3) | _IN(4) | _IN(7),
(char *)(buffer + 1),
clipping.x0, clipping.y0,
- nsoption_int(fg_plot_style));
+ nsoption_int(plot_fg_quality));
else
xosspriteop_put_sprite_user_coords(osspriteop_PTR,
buffer, (osspriteop_id)(buffer + 1),
diff --git a/riscos/configure/con_image.c b/riscos/configure/con_image.c
index 147f5d684..4982423a3 100644
--- a/riscos/configure/con_image.c
+++ b/riscos/configure/con_image.c
@@ -77,11 +77,11 @@ bool ro_gui_options_image_initialise(wimp_w w)
/* set the current values */
for (i = 0; (i < 4); i++) {
- if ((unsigned int)nsoption_int(fg_plot_style) == tinct_options[i])
+ if ((unsigned int)nsoption_int(plot_fg_quality) == tinct_options[i])
ro_gui_set_icon_string(w, IMAGE_FOREGROUND_FIELD,
image_quality_menu->entries[i].
data.indirected_text.text, true);
- if ((unsigned int)nsoption_int(bg_plot_style) == tinct_options[i])
+ if ((unsigned int)nsoption_int(plot_bg_quality) == tinct_options[i])
ro_gui_set_icon_string(w, IMAGE_BACKGROUND_FIELD,
image_quality_menu->entries[i].
data.indirected_text.text, true);
@@ -252,8 +252,8 @@ void ro_gui_options_update_shading(wimp_w w)
bool ro_gui_options_image_ok(wimp_w w)
{
ro_gui_options_image_read(w,
- (unsigned int *)&nsoption_int(bg_plot_style),
- (unsigned int *)&nsoption_int(fg_plot_style));
+ (unsigned int *)&nsoption_int(plot_bg_quality),
+ (unsigned int *)&nsoption_int(plot_fg_quality));
nsoption_set_int(minimum_gif_delay,
ro_gui_get_icon_decimal(w, IMAGE_SPEED_FIELD, 2));
diff --git a/riscos/dialog.c b/riscos/dialog.c
index b00aee687..0726cb335 100644
--- a/riscos/dialog.c
+++ b/riscos/dialog.c
@@ -664,7 +664,7 @@ void ro_gui_dialog_close_persistent(wimp_w parent) {
void ro_gui_save_options(void)
{
- nsoption_write("<NetSurf$ChoicesSave>");
+ nsoption_write("<NetSurf$ChoicesSave>", NULL, NULL);
}
bool ro_gui_dialog_zoom_apply(wimp_w w) {
diff --git a/riscos/gui.c b/riscos/gui.c
index f82ce742d..79b07be42 100644
--- a/riscos/gui.c
+++ b/riscos/gui.c
@@ -965,7 +965,7 @@ void ro_gui_signal(int sig)
xhourglass_on();
xhourglass_colours(0x0000ffff, 0x000000ff, &old_sand, &old_glass);
- nsoption_dump(stderr);
+ nsoption_dump(stderr, NULL);
/*rufl_dump_state();*/
#ifndef __ELF__
diff --git a/riscos/image.c b/riscos/image.c
index ae2534f4c..56feb2b96 100644
--- a/riscos/image.c
+++ b/riscos/image.c
@@ -69,8 +69,8 @@ bool image_redraw(osspriteop_area *area, int x, int y, int req_width,
req_height *= 2;
width *= 2;
height *= 2;
- tinct_options = background ? nsoption_int(bg_plot_style) :
- nsoption_int(fg_plot_style);
+ tinct_options = background ? nsoption_int(plot_bg_quality) :
+ nsoption_int(plot_fg_quality);
switch (type) {
case IMAGE_PLOT_TINCT_ALPHA:
return image_redraw_tinct(header, x, y,
diff --git a/utils/nsoption.h b/utils/nsoption.h
index 3ace847b9..32e9e6634 100644
--- a/utils/nsoption.h
+++ b/utils/nsoption.h
@@ -47,7 +47,6 @@
#include <stdbool.h>
#include "utils/errors.h"
-typedef uint32_t colour;
/* allow targets to include any necessary headers of their own */
#define NSOPTION_BOOL(NAME, DEFAULT)
diff --git a/windows/gui.c b/windows/gui.c
index 159e8f0c1..f8d57fd33 100644
--- a/windows/gui.c
+++ b/windows/gui.c
@@ -931,7 +931,7 @@ nsws_window_command(HWND hwnd,
nsoption_set_int(window_y, r.top);
nsoption_set_int(window_width, r.right - r.left);
nsoption_set_int(window_height, r.bottom - r.top);
- nsoption_write(options_file_location);
+ nsoption_write(options_file_location, NULL, NULL);
break;
}
diff --git a/windows/prefs.c b/windows/prefs.c
index 93a30b00f..e933cc10d 100644
--- a/windows/prefs.c
+++ b/windows/prefs.c
@@ -675,7 +675,6 @@ void nsws_prefs_dialog_init(HINSTANCE hinst, HWND parent)
win_perror("PropertySheet");
} else if (ret > 0) {
/* user saved changes */
- nsoption_write(options_file_location);
+ nsoption_write(options_file_location, NULL, NULL);
}
-
}