From: Christian Dywan Date: Thu, 27 Oct 2011 17:27:44 +0000 (+0200) Subject: Update enforced font when font family changes X-Git-Url: https://spindle.queued.net/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4440d25e1148526a633df95cb6c801dba4d34460;p=midori Update enforced font when font family changes --- diff --git a/midori/midori-websettings.c b/midori/midori-websettings.c index 8467163a..477d5d82 100644 --- a/midori/midori-websettings.c +++ b/midori/midori-websettings.c @@ -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