Access parameters through given Arg parameter instead of accessing
global parameters.
void
setparameter(Client *c, int refresh, ParamName p, const Arg *a)
{
void
setparameter(Client *c, int refresh, ParamName p, const Arg *a)
{
+ GdkRGBA bgcolor = { 0 };
WebKitSettings *s = webkit_web_view_get_settings(c->view);
switch (p) {
WebKitSettings *s = webkit_web_view_get_settings(c->view);
switch (p) {
break;
case DiskCache:
webkit_web_context_set_cache_model(
break;
case DiskCache:
webkit_web_context_set_cache_model(
- webkit_web_view_get_context(c->view),
- curconfig[DiskCache].val.b ?
+ webkit_web_view_get_context(c->view), a->b ?
WEBKIT_CACHE_MODEL_WEB_BROWSER :
WEBKIT_CACHE_MODEL_DOCUMENT_VIEWER);
WEBKIT_CACHE_MODEL_WEB_BROWSER :
WEBKIT_CACHE_MODEL_DOCUMENT_VIEWER);
+ return; /* do not update */
+ webkit_settings_set_enable_dns_prefetching(s, a->b);
+ return; /* do not update */
- webkit_settings_set_default_font_size(
- webkit_web_view_get_settings(c->view),
- curconfig[FontSize].val.i);
- break;
+ webkit_settings_set_default_font_size(s, a->i);
+ return; /* do not update */
case FrameFlattening:
webkit_settings_set_enable_frame_flattening(s, a->b);
break;
case Geolocation:
case FrameFlattening:
webkit_settings_set_enable_frame_flattening(s, a->b);
break;
case Geolocation:
break;
case HideBackground:
break;
case HideBackground:
- return; /* do nothing */
+ if (a->b)
+ webkit_web_view_set_background_color(c->view, &bgcolor);
+ return; /* do not update */
- return; /* do nothing */
+ webkit_settings_set_enable_developer_extras(s, a->b);
+ return; /* do not update */
case JavaScript:
webkit_settings_set_enable_javascript(s, a->b);
break;
case JavaScript:
webkit_settings_set_enable_javascript(s, a->b);
break;
evalscript(c, "document.documentElement.style.overflow = '%s'",
enablescrollbars ? "auto" : "hidden");
*/
evalscript(c, "document.documentElement.style.overflow = '%s'",
enablescrollbars ? "auto" : "hidden");
*/
+ return; /* do not update */
- return; /* do nothing */
case SpellChecking:
webkit_web_context_set_spell_checking_enabled(
case SpellChecking:
webkit_web_context_set_spell_checking_enabled(
- webkit_web_view_get_context(c->view),
- curconfig[SpellChecking].val.b);
- return; /* do nothing */
+ webkit_web_view_get_context(c->view), a->b);
+ return; /* do not update */
case SpellLanguages:
return; /* do nothing */
case StrictSSL:
webkit_web_context_set_tls_errors_policy(
case SpellLanguages:
return; /* do nothing */
case StrictSSL:
webkit_web_context_set_tls_errors_policy(
- webkit_web_view_get_context(c->view),
- curconfig[StrictSSL].val.b ? WEBKIT_TLS_ERRORS_POLICY_FAIL :
+ webkit_web_view_get_context(c->view), a->b ?
+ WEBKIT_TLS_ERRORS_POLICY_FAIL :
WEBKIT_TLS_ERRORS_POLICY_IGNORE);
WEBKIT_TLS_ERRORS_POLICY_IGNORE);
- return; /* do nothing */
+ return; /* do not update */
- if (curconfig[Style].val.b)
setstyle(c, getstyle(geturi(c)));
else
webkit_user_content_manager_remove_all_style_sheets(
setstyle(c, getstyle(geturi(c)));
else
webkit_user_content_manager_remove_all_style_sheets(
refresh = 0;
break;
case ZoomLevel:
refresh = 0;
break;
case ZoomLevel:
- return; /* do nothing */
+ webkit_web_view_set_zoom_level(c->view, a->f);
+ return; /* do not update */
default:
return; /* do nothing */
}
default:
return; /* do nothing */
}