]> spindle.queued.net Git - midori/commitdiff
Add the Enforce 96 DPI preference to the dialog
authorChristian Dywan <christian@twotoasts.de>
Tue, 23 Dec 2008 22:15:36 +0000 (23:15 +0100)
committerChristian Dywan <christian@twotoasts.de>
Tue, 23 Dec 2008 22:15:36 +0000 (23:15 +0100)
midori/midori-preferences.c
midori/midori-websettings.c

index c1071e13a1ae320131e83295badf0f2f7c2fbf4f..ec9a15e7edc62a6ab5aa239220903feaffbddbe9 100644 (file)
@@ -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);
index b050021f0130c1598996250488f29e978d8e38f0..30a02c09fe1b3e075597786354b12c25d03896b1 100644 (file)
@@ -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;