Add the Enforce 96 DPI preference to the dialog

This commit is contained in:
Christian Dywan 2008-12-23 23:15:36 +01:00
parent 1b1d2f6e5f
commit 394eb4b002
2 changed files with 24 additions and 0 deletions

View file

@ -468,6 +468,9 @@ midori_preferences_set_settings (MidoriPreferences* preferences,
button = katze_property_proxy (settings, "enable-developer-extras", NULL); button = katze_property_proxy (settings, "enable-developer-extras", NULL);
gtk_button_set_label (GTK_BUTTON (button), _("Enable developer tools")); gtk_button_set_label (GTK_BUTTON (button), _("Enable developer tools"));
SPANNED_ADD (button, 0, 1, 3, 4); 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"); label = katze_property_label (settings, "location-entry-search");
INDENTED_ADD (label, 0, 1, 4, 5); INDENTED_ADD (label, 0, 1, 4, 5);
entry = katze_property_proxy (settings, "location-entry-search", NULL); entry = katze_property_proxy (settings, "location-entry-search", NULL);

View file

@ -118,6 +118,7 @@ enum
PROP_OPEN_TABS_NEXT_TO_CURRENT, PROP_OPEN_TABS_NEXT_TO_CURRENT,
PROP_OPEN_POPUPS_IN_TABS, PROP_OPEN_POPUPS_IN_TABS,
PROP_ENFORCE_96_DPI,
PROP_ENABLE_DEVELOPER_EXTRAS, PROP_ENABLE_DEVELOPER_EXTRAS,
PROP_ACCEPT_COOKIES, PROP_ACCEPT_COOKIES,
PROP_ORIGINAL_COOKIES_ONLY, PROP_ORIGINAL_COOKIES_ONLY,
@ -545,6 +546,23 @@ midori_web_settings_class_init (MidoriWebSettingsClass* class)
G_PARAM_READABLE)); 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")) if (!g_object_class_find_property (gobject_class, "enable-developer-extras"))
/** /**
* MidoriWebSettings: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); g_value_set_boolean (value, web_settings->open_popups_in_tabs);
break; break;
case PROP_ENFORCE_96_DPI:
g_value_set_boolean (value, FALSE);
break;
case PROP_ENABLE_DEVELOPER_EXTRAS: case PROP_ENABLE_DEVELOPER_EXTRAS:
g_value_set_boolean (value, FALSE); g_value_set_boolean (value, FALSE);
break; break;