]> spindle.queued.net Git - midori/commitdiff
Update enforced font when font family changes
authorChristian Dywan <christian@twotoasts.de>
Thu, 27 Oct 2011 17:27:44 +0000 (19:27 +0200)
committerChristian Dywan <christian@twotoasts.de>
Thu, 27 Oct 2011 17:32:17 +0000 (19:32 +0200)
midori/midori-websettings.c

index 8467163a8b51d14565184ae48d2f64e41f700c70..477d5d826990332e842ee2c5098263570b0e16d9 100644 (file)
@@ -1101,6 +1101,13 @@ notify_default_encoding_cb (GObject*    object,
     g_object_notify (object, "preferred-encoding");
 }
 
+static void
+notify_default_font_family_cb (GObject*    object,
+                               GParamSpec* pspec)
+{
+    if (katze_object_get_boolean (object, "enforce-font-family"))
+        g_object_set (object, "enforce-font-family", TRUE, NULL);
+}
 static void
 midori_web_settings_init (MidoriWebSettings* web_settings)
 {
@@ -1112,6 +1119,8 @@ midori_web_settings_init (MidoriWebSettings* web_settings)
 
     g_signal_connect (web_settings, "notify::default-encoding",
                       G_CALLBACK (notify_default_encoding_cb), NULL);
+    g_signal_connect (web_settings, "notify::default-font-family",
+                      G_CALLBACK (notify_default_font_family_cb), NULL);
 }
 
 static void