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
This commit is contained in:
Vincent Sanders 2013-05-27 14:18:01 +01:00
parent 4ae69da5ea
commit 63d7247a9c
12 changed files with 20 additions and 20 deletions

View File

@ -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));

View File

@ -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));

View File

@ -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));

View File

@ -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 */

View File

@ -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)

View File

@ -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 */

View File

@ -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);

View File

@ -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);
}

View File

@ -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,

View File

@ -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,

View File

@ -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));
}

View File

@ -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,