entry = katze_property_proxy (settings, "minimum-font-size", NULL);
gtk_widget_set_tooltip_text (entry, _("The minimum font size used to display text"));
SPANNED_ADD (entry);
+ button = katze_property_proxy (settings, "enforce-font-family", NULL);
+ INDENTED_ADD (button);
#endif
label = katze_property_label (settings, "preferred-encoding");
INDENTED_ADD (label);
gboolean enable_dns_prefetching;
#endif
gboolean strip_referer;
+ gboolean enforce_font_family;
gboolean flash_window_on_bg_tabs;
GHashTable* user_stylesheets;
};
PROP_CLEAR_DATA,
PROP_ENABLE_DNS_PREFETCHING,
PROP_STRIP_REFERER,
+ PROP_ENFORCE_FONT_FAMILY,
};
GType
_("Whether the \"Referer\" header should be shortened to the hostname"),
FALSE,
flags));
-
+ /**
+ * MidoriWebSettings:enforc-font-family:
+ *
+ * Whether to enforce user font preferences with an internal stylesheet.
+ *
+ * Since: 0.4.2
+ */
+ g_object_class_install_property (gobject_class,
+ PROP_ENFORCE_FONT_FAMILY,
+ g_param_spec_boolean (
+ "enforce-font-family",
+ _("Always use my font choices"),
+ _("Override fonts picked by websites with user preferences"),
+ FALSE,
+ flags));
}
static void
case PROP_STRIP_REFERER:
web_settings->strip_referer = g_value_get_boolean (value);
break;
+ case PROP_ENFORCE_FONT_FAMILY:
+ if ((web_settings->enforce_font_family = g_value_get_boolean (value)))
+ {
+ gchar* font_family = katze_object_get_string (web_settings,
+ "default-font-family");
+ gchar* css = g_strdup_printf ("* { font-family: %s !important; }",
+ font_family);
+ midori_web_settings_add_style (web_settings, "enforce-font-family", css);
+ g_free (font_family);
+ g_free (css);
+ }
+ else
+ midori_web_settings_remove_style (web_settings, "enforce-font-family");
+ break;
case PROP_FLASH_WINDOW_ON_BG_TABS:
web_settings->flash_window_on_bg_tabs = g_value_get_boolean (value);
break;
case PROP_STRIP_REFERER:
g_value_set_boolean (value, web_settings->strip_referer);
break;
+ case PROP_ENFORCE_FONT_FAMILY:
+ g_value_set_boolean (value, web_settings->enforce_font_family);
+ break;
case PROP_FLASH_WINDOW_ON_BG_TABS:
g_value_set_boolean (value, web_settings->flash_window_on_bg_tabs);
break;