From 394eb4b002c0a29b342abb9c76bbb691a0286a3c Mon Sep 17 00:00:00 2001 From: Christian Dywan Date: Tue, 23 Dec 2008 23:15:36 +0100 Subject: [PATCH] Add the Enforce 96 DPI preference to the dialog --- midori/midori-preferences.c | 3 +++ midori/midori-websettings.c | 21 +++++++++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/midori/midori-preferences.c b/midori/midori-preferences.c index c1071e13..ec9a15e7 100644 --- a/midori/midori-preferences.c +++ b/midori/midori-preferences.c @@ -468,6 +468,9 @@ midori_preferences_set_settings (MidoriPreferences* preferences, button = katze_property_proxy (settings, "enable-developer-extras", NULL); gtk_button_set_label (GTK_BUTTON (button), _("Enable developer tools")); SPANNED_ADD (button, 0, 1, 3, 4); + button = katze_property_proxy (settings, "enforce-96-dpi", NULL); + gtk_button_set_label (GTK_BUTTON (button), _("Enforce 96 DPI")); + SPANNED_ADD (button, 1, 2, 3, 4); label = katze_property_label (settings, "location-entry-search"); INDENTED_ADD (label, 0, 1, 4, 5); entry = katze_property_proxy (settings, "location-entry-search", NULL); diff --git a/midori/midori-websettings.c b/midori/midori-websettings.c index b050021f..30a02c09 100644 --- a/midori/midori-websettings.c +++ b/midori/midori-websettings.c @@ -118,6 +118,7 @@ enum PROP_OPEN_TABS_NEXT_TO_CURRENT, PROP_OPEN_POPUPS_IN_TABS, + PROP_ENFORCE_96_DPI, PROP_ENABLE_DEVELOPER_EXTRAS, PROP_ACCEPT_COOKIES, PROP_ORIGINAL_COOKIES_ONLY, @@ -545,6 +546,23 @@ midori_web_settings_class_init (MidoriWebSettingsClass* class) G_PARAM_READABLE)); + if (!g_object_class_find_property (gobject_class, "enforce-96-dpi")) + /** + * MidoriWebSettings:enforce-96-dpi: + * + * Whether to enforce a resolution of 96 DPI. + * + * Since: 0.1.2 + */ + g_object_class_install_property (gobject_class, + PROP_ENFORCE_96_DPI, + g_param_spec_boolean ( + "enforce-96-dpi", + "Enforce 96 DPI", + "Whether to enforce a resolution of 96 DPI", + FALSE, + G_PARAM_READABLE)); + if (!g_object_class_find_property (gobject_class, "enable-developer-extras")) /** * MidoriWebSettings:enable-developer-extras: @@ -1077,6 +1095,9 @@ midori_web_settings_get_property (GObject* object, g_value_set_boolean (value, web_settings->open_popups_in_tabs); break; + case PROP_ENFORCE_96_DPI: + g_value_set_boolean (value, FALSE); + break; case PROP_ENABLE_DEVELOPER_EXTRAS: g_value_set_boolean (value, FALSE); break; -- 2.39.5