From 63d7247a9cace6cc729441508c0cfd82f043ff4d Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Mon, 27 May 2013 14:18:01 +0100 Subject: fix mismatched option name and variable names block_ads should be block_advertisments to match option name toolbar_status_width should be toolbar_status_size to match option name --- amiga/gui.c | 2 +- amiga/gui_options.c | 6 +++--- atari/settings.c | 4 ++-- framebuffer/gui.c | 2 +- gtk/dialogs/preferences.c | 2 +- gtk/gui.c | 4 ++-- gtk/scaffolding.c | 2 +- gtk/window.c | 4 ++-- render/html_css.c | 2 +- riscos/configure/con_content.c | 4 ++-- riscos/window.c | 4 ++-- windows/prefs.c | 4 ++-- 12 files changed, 20 insertions(+), 20 deletions(-) diff --git a/amiga/gui.c b/amiga/gui.c index 8342b8dc7..dcbf90b51 100644 --- a/amiga/gui.c +++ b/amiga/gui.c @@ -3673,7 +3673,7 @@ ULONG ami_get_border_gadget_balance(struct gui_window_2 *gwin, ULONG *size1, ULO available_width = gwin->win->Width - scrn->WBorLeft - sz; - gad1percent = nsoption_int(toolbar_status_width) / 10000.0; + gad1percent = nsoption_int(toolbar_status_size) / 10000.0; *size1 = (ULONG)(available_width * gad1percent); *size2 = (ULONG)(available_width * (1 - gad1percent)); diff --git a/amiga/gui_options.c b/amiga/gui_options.c index bd37acd1e..102036ded 100755 --- a/amiga/gui_options.c +++ b/amiga/gui_options.c @@ -579,7 +579,7 @@ void ami_gui_opts_open(void) GA_ID, GID_OPTS_HIDEADS, GA_RelVerify, TRUE, GA_Text, gadlab[GID_OPTS_HIDEADS], - GA_Selected, nsoption_bool(block_ads), + GA_Selected, nsoption_bool(block_advertisements), CheckBoxEnd, LayoutEnd, // content blocking LAYOUT_AddChild,VGroupObject, @@ -1531,9 +1531,9 @@ void ami_gui_opts_use(bool save) GetAttr(GA_Selected,gow->objects[GID_OPTS_HIDEADS],(ULONG *)&data); if (data) { - nsoption_set_bool(block_ads, true); + nsoption_set_bool(block_advertisements, true); } else { - nsoption_set_bool(block_ads, false); + nsoption_set_bool(block_advertisements, false); } GetAttr(INTEGER_Number,gow->objects[GID_OPTS_HISTORY],(ULONG *)&nsoption_int(expire_url)); diff --git a/atari/settings.c b/atari/settings.c index 1fc425a39..5c3604f00 100644 --- a/atari/settings.c +++ b/atari/settings.c @@ -131,7 +131,7 @@ static void display_settings(void) set_text( SETTINGS_EDIT_HOMEPAGE, nsoption_charp(homepage_url), INPUT_HOMEPAGE_URL_MAX_LEN ); - if( nsoption_bool(block_ads) ) { + if( nsoption_bool(block_advertisements) ) { OBJ_CHECK( SETTINGS_CB_HIDE_ADVERTISEMENT ); } else { OBJ_UNCHECK( SETTINGS_CB_HIDE_ADVERTISEMENT ); @@ -644,7 +644,7 @@ static void apply_settings(void) /* "Browser" tab: */ nsoption_set_bool(target_blank, !OBJ_SELECTED(SETTINGS_CB_DISABLE_POPUP_WINDOWS)); - nsoption_set_bool(block_ads, + nsoption_set_bool(block_advertisements, OBJ_SELECTED(SETTINGS_CB_HIDE_ADVERTISEMENT)); nsoption_set_charp(accept_language, gemtk_obj_get_text(dlgtree, SETTINGS_BT_SEL_LOCALE)); diff --git a/framebuffer/gui.c b/framebuffer/gui.c index 7e2ff2bc1..80322ecc9 100644 --- a/framebuffer/gui.c +++ b/framebuffer/gui.c @@ -1415,7 +1415,7 @@ create_normal_browser_window(struct gui_window *gw, int furniture_width) gw->window = fbtk_create_window(fbtk, 0, 0, 0, 0, 0); - statusbar_width = nsoption_int(toolbar_status_width) * + statusbar_width = nsoption_int(toolbar_status_size) * fbtk_get_width(gw->window) / 10000; /* toolbar */ diff --git a/gtk/dialogs/preferences.c b/gtk/dialogs/preferences.c index 430554caf..ca4ac2ef7 100644 --- a/gtk/dialogs/preferences.c +++ b/gtk/dialogs/preferences.c @@ -374,7 +374,7 @@ SPINBUTTON_SIGNALS(spinDiscCacheAge, disc_cache_age, 1.0) TOGGLEBUTTON_SIGNALS(checkDisablePopups, disable_popups) /* hide adverts */ -TOGGLEBUTTON_SIGNALS(checkHideAdverts, block_ads) +TOGGLEBUTTON_SIGNALS(checkHideAdverts, block_advertisements) /* enable javascript */ TOGGLEBUTTON_SIGNALS(checkEnableJavascript, enable_javascript) diff --git a/gtk/gui.c b/gtk/gui.c index 3408bb9ac..657770db6 100644 --- a/gtk/gui.c +++ b/gtk/gui.c @@ -292,8 +292,8 @@ static void check_options(char **respath) * The GTK front end now correctly uses it as a proportion of window * width. Here we assume that a value of less than 15% is wrong * and set to the default two thirds. */ - if (nsoption_int(toolbar_status_width) < 1500) { - nsoption_set_int(toolbar_status_width, 6667); + if (nsoption_int(toolbar_status_size) < 1500) { + nsoption_set_int(toolbar_status_size, 6667); } /* user options should be stored in the users home directory */ diff --git a/gtk/scaffolding.c b/gtk/scaffolding.c index 01f7fe5c2..cf5bbed85 100644 --- a/gtk/scaffolding.c +++ b/gtk/scaffolding.c @@ -1286,7 +1286,7 @@ MULTIHANDLER(savewindowsize) int x,y,w,h; if (GTK_IS_PANED(g->status_pane)) { - nsoption_set_int(toolbar_status_width, + nsoption_set_int(toolbar_status_size, gtk_paned_get_position(g->status_pane)); } gtk_window_get_position(g->window, &x, &y); diff --git a/gtk/window.c b/gtk/window.c index 44b88d241..5edace8f3 100644 --- a/gtk/window.c +++ b/gtk/window.c @@ -593,12 +593,12 @@ static gboolean nsgtk_window_size_allocate_event(GtkWidget *widget, if (g->paned != NULL) { /* Set status bar / scroll bar proportion according to - * option_toolbar_status_width */ + * option_toolbar_status_size */ /* TODO: Probably want to detect when the user adjusts the * status bar width, remember that proportion for the * window, and use that here. */ gtk_paned_set_position(g->paned, - (nsoption_int(toolbar_status_width) * + (nsoption_int(toolbar_status_size) * allocation->width) / 10000); } diff --git a/render/html_css.c b/render/html_css.c index fad642461..bf20dcf14 100644 --- a/render/html_css.c +++ b/render/html_css.c @@ -554,7 +554,7 @@ nserror html_css_new_stylesheets(html_content *c) LOG(("%d fetches active", c->base.active)); - if (nsoption_bool(block_ads)) { + if (nsoption_bool(block_advertisements)) { ns_error = hlcache_handle_retrieve(html_adblock_stylesheet_url, 0, content_get_url(&c->base), NULL, html_convert_css_callback, diff --git a/riscos/configure/con_content.c b/riscos/configure/con_content.c index 122b0e3a5..d4f3e46bb 100644 --- a/riscos/configure/con_content.c +++ b/riscos/configure/con_content.c @@ -44,7 +44,7 @@ bool ro_gui_options_content_initialise(wimp_w w) { /* set the current values */ ro_gui_set_icon_selected_state(w, CONTENT_BLOCK_ADVERTISEMENTS, - nsoption_bool(block_ads)); + nsoption_bool(block_advertisements)); ro_gui_set_icon_selected_state(w, CONTENT_BLOCK_POPUPS, nsoption_bool(block_popups)); ro_gui_set_icon_selected_state(w, CONTENT_NO_PLUGINS, @@ -88,7 +88,7 @@ void ro_gui_options_content_default(wimp_pointer *pointer) bool ro_gui_options_content_ok(wimp_w w) { - nsoption_set_bool(block_ads, + nsoption_set_bool(block_advertisements, ro_gui_get_icon_selected_state(w, CONTENT_BLOCK_ADVERTISEMENTS)); nsoption_set_bool(block_popups, diff --git a/riscos/window.c b/riscos/window.c index e7b3699b7..772a0d1b1 100644 --- a/riscos/window.c +++ b/riscos/window.c @@ -521,7 +521,7 @@ struct gui_window *gui_create_browser_window(struct browser_window *bw, /* Add in a toolbar and status bar */ g->status_bar = ro_gui_status_bar_create(g->window, - nsoption_int(toolbar_status_width)); + nsoption_int(toolbar_status_size)); g->toolbar = ro_toolbar_create(NULL, g->window, THEME_STYLE_BROWSER_TOOLBAR, TOOLBAR_FLAGS_NONE, &ro_gui_window_toolbar_callbacks, g, @@ -4712,7 +4712,7 @@ void ro_gui_window_default_options(struct browser_window *bw) ro_toolbar_get_display_throbber(gui->toolbar)); } if (gui->status_bar != NULL) - nsoption_set_int(toolbar_status_width, + nsoption_set_int(toolbar_status_size, ro_gui_status_bar_get_width(gui->status_bar)); } diff --git a/windows/prefs.c b/windows/prefs.c index 360a54011..93a30b00f 100644 --- a/windows/prefs.c +++ b/windows/prefs.c @@ -583,7 +583,7 @@ static BOOL CALLBACK options_general_dialog_handler(HWND hwnd, /* advert blocking */ sub = GetDlgItem(hwnd, IDC_PREFS_ADVERTS); SendMessage(sub, BM_SETCHECK, - (WPARAM) ((nsoption_bool(block_ads)) ? + (WPARAM) ((nsoption_bool(block_advertisements)) ? BST_CHECKED : BST_UNCHECKED), 0); /* Referrer sending */ @@ -615,7 +615,7 @@ static BOOL CALLBACK options_general_dialog_handler(HWND hwnd, nsoption_set_bool(suppress_images, (IsDlgButtonChecked(hwnd, IDC_PREFS_IMAGES) == BST_CHECKED) ? true : false); - nsoption_set_bool(block_ads, (IsDlgButtonChecked(hwnd, + nsoption_set_bool(block_advertisements, (IsDlgButtonChecked(hwnd, IDC_PREFS_ADVERTS) == BST_CHECKED) ? true : false); nsoption_set_bool(send_referer, (IsDlgButtonChecked(hwnd, -- cgit v1.2.3