From 0258ff08cfd0eff38e1d13704ce0d47c99706df5 Mon Sep 17 00:00:00 2001 From: Marco Pesenti Gritti Date: Tue, 4 Nov 2003 23:56:12 +0000 Subject: Migrate font family too 2003-11-05 Marco Pesenti Gritti * embed/ephy-embed-prefs.h: * embed/mozilla/mozilla-notifiers.cpp: Migrate font family too --- embed/ephy-embed-prefs.h | 3 ++- embed/mozilla/mozilla-notifiers.cpp | 28 ++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 1 deletion(-) (limited to 'embed') diff --git a/embed/ephy-embed-prefs.h b/embed/ephy-embed-prefs.h index aaea92845..0ba5954f8 100644 --- a/embed/ephy-embed-prefs.h +++ b/embed/ephy-embed-prefs.h @@ -27,7 +27,8 @@ #define CONF_NETWORK_PROXY_AUTO_URL "/system/proxy/autoconfig_url" #define CONF_NETWORK_PROXY_IGNORE_HOSTS "/system/http_proxy/ignore_hosts" -/* Deprecated, we migrate them */ +/* DEPRECATED, we migrate them */ #define CONF_RENDERING_FONT_VAR_SIZE_OLD "/apps/epiphany/web/font_var_size" #define CONF_RENDERING_FONT_FIXED_SIZE_OLD "/apps/epiphany/web/font_fixed_size" #define CONF_RENDERING_FONT_MIN_SIZE_OLD "/apps/epiphany/web/font_min_size" +#define CONF_RENDERING_FONT_TYPE_OLD "/apps/epiphany/web/default_font_type" diff --git a/embed/mozilla/mozilla-notifiers.cpp b/embed/mozilla/mozilla-notifiers.cpp index da68ebbc0..9ff7766bf 100644 --- a/embed/mozilla/mozilla-notifiers.cpp +++ b/embed/mozilla/mozilla-notifiers.cpp @@ -521,6 +521,34 @@ mozilla_notifiers_init (EphyEmbedSingle *single) font_infos = g_list_prepend (font_infos, info); } +#ifdef MIGRATE_PIXEL_SIZE + if (migrate_size) + { + char *type; + + type = eel_gconf_get_string (CONF_RENDERING_FONT_TYPE_OLD); + if (type && (strcmp (type, "serif") == 0 || + strcmp (type, "sans-serif") == 0)) + { + char *family; + + g_snprintf (old_key, 255, "%s_%s_%s", + CONF_RENDERING_FONT, type, code); + g_snprintf (key, 255, "%s_%s_%s", + CONF_RENDERING_FONT, "variable", code); + + family = eel_gconf_get_string (old_key); + if (family) + { + eel_gconf_set_string (key, family); + g_free (family); + } + } + + g_free (type); + } +#endif + g_snprintf (key, 255, "%s_%s", CONF_RENDERING_FONT_MIN_SIZE, code); info = g_strconcat ("minimum-size", ".", code, NULL); add_notification_and_notify (client, key, -- cgit v1.2.3