/* Page "Behavior" */
PAGE_NEW (GTK_STOCK_SELECT_COLOR, _("Behavior"));
FRAME_NEW (_("Features"));
- TABLE_NEW (6, 2);
+ TABLE_NEW (7, 2);
button = katze_property_proxy (settings, "auto-load-images", NULL);
gtk_button_set_label (GTK_BUTTON (button), _("Load images automatically"));
gtk_widget_set_tooltip_text (button, _("Load and display images automatically"));
gtk_button_set_label (GTK_BUTTON (button), _("Enable developer tools"));
gtk_widget_set_tooltip_text (button, _("Enable special extensions for developers"));
SPANNED_ADD (button, 1, 2, 3, 4);
+ button = katze_property_proxy (settings, "zoom-text-and-images", NULL);
+ SPANNED_ADD (button, 0, 1, 4, 5);
label = katze_property_label (settings, "location-entry-search");
- INDENTED_ADD (label, 0, 1, 4, 5);
+ INDENTED_ADD (label, 0, 1, 5, 6);
entry = katze_property_proxy (settings, "location-entry-search", NULL);
- FILLED_ADD (entry, 1, 2, 4, 5);
+ FILLED_ADD (entry, 1, 2, 5, 6);
/* Page "Interface" */
PAGE_NEW (GTK_STOCK_CONVERT, _("Interface"));
static void
_midori_view_update_settings (MidoriView* view)
{
+ gboolean zoom_text_and_images;
+
g_object_get (view->settings,
"download-manager", &view->download_manager,
+ "zoom-text-and-images", &zoom_text_and_images,
"close-buttons-on-tabs", &view->close_buttons_on_tabs,
"open-new-pages-in", &view->open_new_pages_in,
"middle-click-opens-selection", &view->middle_click_opens_selection,
"open-tabs-in-the-background", &view->open_tabs_in_the_background,
NULL);
+
+ if (view->web_view)
+ g_object_set (view->web_view, "full-content-zoom",
+ zoom_text_and_images, NULL);
}
static void
{
katze_assign (view->download_manager, g_value_dup_string (&value));
}
+ else if (name == g_intern_string ("zoom-text-and-images"))
+ {
+ if (view->web_view)
+ g_object_set (view->web_view, "full-content-zoom",
+ g_value_get_boolean (&value), NULL);
+ }
else if (name == g_intern_string ("close-buttons-on-tabs"))
{
view->close_buttons_on_tabs = g_value_get_boolean (&value);
NULL);
g_object_set (view->web_view, "settings", view->settings, NULL);
+ if (katze_object_has_property (view->web_view, "full-content-zoom"))
+ g_object_set (view->web_view, "full-content-zoom",
+ katze_object_get_boolean (view->settings, "zoom-text-and-images"), NULL);
gtk_widget_show (view->web_view);
gtk_container_add (GTK_CONTAINER (view), view->web_view);
gboolean open_tabs_next_to_current;
gboolean open_popups_in_tabs;
+ gboolean zoom_text_and_images;
MidoriAcceptCookies accept_cookies;
gboolean original_cookies_only;
gint maximum_cookie_age;
PROP_ENFORCE_96_DPI,
PROP_ENABLE_DEVELOPER_EXTRAS,
+ PROP_ZOOM_TEXT_AND_IMAGES,
PROP_ACCEPT_COOKIES,
PROP_ORIGINAL_COOKIES_ONLY,
PROP_MAXIMUM_COOKIE_AGE,
FALSE,
G_PARAM_READABLE));
+ if (!g_object_class_find_property (gobject_class, "zoom-text-and-images"))
+ /**
+ * MidoriWebSettings:zoom-text-and-images:
+ *
+ * Whether to zoom text and images.
+ *
+ * Since: 0.1.3
+ */
+ g_object_class_install_property (gobject_class,
+ PROP_ZOOM_TEXT_AND_IMAGES,
+ g_param_spec_boolean (
+ "zoom-text-and-images",
+ _("Zoom Text and Images"),
+ _("Whether to zoom text and images"),
+ FALSE,
+ g_object_class_find_property (g_type_class_ref (WEBKIT_TYPE_WEB_VIEW),
+ "full-content-zoom") ? G_PARAM_READWRITE : G_PARAM_READABLE));
+
g_object_class_install_property (gobject_class,
PROP_ACCEPT_COOKIES,
g_param_spec_enum (
web_settings->open_popups_in_tabs = g_value_get_boolean (value);
break;
+ case PROP_ZOOM_TEXT_AND_IMAGES:
+ web_settings->zoom_text_and_images = g_value_get_boolean (value);
+ break;
case PROP_ACCEPT_COOKIES:
web_settings->accept_cookies = g_value_get_enum (value);
break;
case PROP_ENABLE_DEVELOPER_EXTRAS:
g_value_set_boolean (value, FALSE);
break;
+ case PROP_ZOOM_TEXT_AND_IMAGES:
+ g_value_set_boolean (value, web_settings->zoom_text_and_images);
+ break;
case PROP_ACCEPT_COOKIES:
g_value_set_enum (value, web_settings->accept_cookies);
break;