summaryrefslogtreecommitdiff
path: root/embed
diff options
context:
space:
mode:
Diffstat (limited to 'embed')
-rw-r--r--embed/ephy-embed-prefs.h5
-rw-r--r--embed/ephy-embed-single.c12
-rw-r--r--embed/ephy-embed-single.h11
-rw-r--r--embed/mozilla/mozilla-embed-single.cpp1
-rw-r--r--embed/mozilla/mozilla-notifiers.cpp94
5 files changed, 4 insertions, 119 deletions
diff --git a/embed/ephy-embed-prefs.h b/embed/ephy-embed-prefs.h
index 50e63bdb7..294e3913f 100644
--- a/embed/ephy-embed-prefs.h
+++ b/embed/ephy-embed-prefs.h
@@ -1,5 +1,8 @@
#define CONF_NETWORK_CACHE_SIZE "/apps/epiphany/web/cache_size"
-#define CONF_RENDERING_FONT "/apps/epiphany/web/font"
+#define CONF_WEB_FIXED_WIDTH_FONT "/apps/epiphany/web/fixed_width_font"
+#define CONF_WEB_VARIABLE_WIDTH_FONT "/apps/epiphany/web/fixed_width_font"
+#define CONF_WEB_MINIMUM_FONT_SIZE "/apps/epiphany/web/minimum_font_size"
+#define CONF_WEB_USE_DESKTOP_FONTS "/apps/epiphany/web/use_desktop_fonts"
#define CONF_RENDERING_FONT_VAR_SIZE "/apps/epiphany/web/font_var_size"
#define CONF_RENDERING_FONT_FIXED_SIZE "/apps/epiphany/web/font_fixed_size"
#define CONF_RENDERING_FONT_MIN_SIZE "/apps/epiphany/web/font_min_size"
diff --git a/embed/ephy-embed-single.c b/embed/ephy-embed-single.c
index fe42ba07b..0fb9129b0 100644
--- a/embed/ephy-embed-single.c
+++ b/embed/ephy-embed-single.c
@@ -157,18 +157,6 @@ ephy_embed_single_get_language_groups (EphyEmbedSingle *shell,
}
gresult
-ephy_embed_single_get_font_list (EphyEmbedSingle *shell,
- const char *langGroup,
- const char *fontType,
- GList **fontList,
- char **default_font)
-{
- EphyEmbedSingleClass *klass = EPHY_EMBED_SINGLE_GET_CLASS (shell);
- return klass->get_font_list (shell, langGroup, fontType, fontList,
- default_font);
-}
-
-gresult
ephy_embed_single_list_cookies (EphyEmbedSingle *shell,
GList **cookies)
{
diff --git a/embed/ephy-embed-single.h b/embed/ephy-embed-single.h
index 2ca30f41b..bed411463 100644
--- a/embed/ephy-embed-single.h
+++ b/embed/ephy-embed-single.h
@@ -125,11 +125,6 @@ struct EphyEmbedSingleClass
LanguageGroup group,
gboolean elide_underscores,
GList **encodings);
- gresult (* get_font_list) (EphyEmbedSingle *shell,
- const char *langGroup,
- const char *fontType,
- GList **fontList,
- char **default_font);
gresult (* list_cookies) (EphyEmbedSingle *shell,
GList **cokies);
gresult (* remove_cookies) (EphyEmbedSingle *shell,
@@ -170,12 +165,6 @@ gresult ephy_embed_single_get_encodings (EphyEmbedSingle *shell,
gboolean elide_underscores,
GList **encodings);
-gresult ephy_embed_single_get_font_list (EphyEmbedSingle *shell,
- const char *langGroup,
- const char *fontType,
- GList **fontList,
- char **default_font);
-
/* Cookies */
gresult ephy_embed_single_list_cookies (EphyEmbedSingle *shell,
GList **cookies);
diff --git a/embed/mozilla/mozilla-embed-single.cpp b/embed/mozilla/mozilla-embed-single.cpp
index f81fdc1a1..92b2773bf 100644
--- a/embed/mozilla/mozilla-embed-single.cpp
+++ b/embed/mozilla/mozilla-embed-single.cpp
@@ -301,7 +301,6 @@ mozilla_embed_single_class_init (MozillaEmbedSingleClass *klass)
shell_class->load_proxy_autoconf = impl_load_proxy_autoconf;
shell_class->get_encodings = impl_get_encodings;
shell_class->get_language_groups = impl_get_language_groups;
- shell_class->get_font_list = impl_get_font_list;
shell_class->list_cookies = impl_list_cookies;
shell_class->remove_cookies = impl_remove_cookies;
shell_class->list_passwords = impl_list_passwords;
diff --git a/embed/mozilla/mozilla-notifiers.cpp b/embed/mozilla/mozilla-notifiers.cpp
index 6c46fe55e..0d521a517 100644
--- a/embed/mozilla/mozilla-notifiers.cpp
+++ b/embed/mozilla/mozilla-notifiers.cpp
@@ -113,7 +113,6 @@ mozilla_proxy_ignore_notifier (GConfClient *client,
/* Keeps the list of the notifiers we installed for mozilla prefs */
/* to be able to remove them when exiting */
GList *mozilla_notifiers = NULL;
-GList *font_infos = NULL;
enum
{
@@ -141,7 +140,6 @@ conversion_table [] =
{ CONF_NETWORK_SSL_PROXY_PORT, INT_PREF, "network.proxy.ssl_port"},
{ CONF_LANGUAGE_DEFAULT_ENCODING, STRING_PREF, "intl.charset.default" },
{ CONF_LANGUAGE_AUTODETECT_ENCODING, STRING_PREF, "intl.charset.detector" },
- { CONF_RENDERING_DEFAULT_FONT, STRING_PREF, "font.default" },
{ NULL, 0, NULL }
};
@@ -247,21 +245,6 @@ mozilla_cache_size_notifier (GConfClient *client,
}
static void
-mozilla_font_size_notifier (GConfClient *client,
- guint cnxn_id,
- GConfEntry *entry,
- char *pref)
-{
- char key[255];
-
- if (entry->value == NULL) return;
-
- sprintf (key, "font.%s", pref);
-
- mozilla_prefs_set_int (key, eel_gconf_get_integer (entry->key));
-}
-
-static void
mozilla_proxy_mode_notifier (GConfClient *client,
guint cnxn_id,
GConfEntry *entry,
@@ -318,27 +301,6 @@ mozilla_cookies_accept_notifier (GConfClient *client,
}
static void
-mozilla_font_notifier (GConfClient *client,
- guint cnxn_id,
- GConfEntry *entry,
- char *pref)
-{
- char key[255];
- char *name;
-
- if (entry->value == NULL) return;
-
- sprintf (key, "font.name.%s", pref);
-
- name = eel_gconf_get_string (entry->key);
- if (name)
- {
- mozilla_prefs_set_string (key, name);
- g_free (name);
- }
-}
-
-static void
mozilla_proxy_autoconfig_notifier (GConfClient *client,
guint cnxn_id,
GConfEntry *entry,
@@ -396,8 +358,6 @@ mozilla_notifiers_init(EphyEmbedSingle *single)
{
GConfClient *client = eel_gconf_client_get_global ();
guint i;
- guint n_fonts_languages;
- const FontsLanguageInfo *fonts_language;
for (i = 0; conversion_table[i].gconf_key != NULL; i++)
{
@@ -433,66 +393,12 @@ mozilla_notifiers_init(EphyEmbedSingle *single)
custom_notifiers[i].func,
(gpointer)single);
}
-
- /* fonts notifiers */
- n_fonts_languages = ephy_langs_get_n_font_languages ();
- fonts_language = ephy_langs_get_font_languages ();
- for (i = 0; i < n_fonts_languages; i++)
- {
- guint k;
- char *types [] = { "serif", "sans-serif", "cursive", "fantasy", "monospace" };
- char key[255];
- char *info;
-
- for (k = 0; k < G_N_ELEMENTS (types); k++)
- {
- info = g_strconcat (types[k], ".", fonts_language[i].code, NULL);
-
- g_snprintf (key, 255, "%s_%s_%s", CONF_RENDERING_FONT,
- types[k],
- fonts_language[i].code);
- add_notification_and_notify (client, key,
- (GConfClientNotifyFunc)mozilla_font_notifier,
- info);
- font_infos = g_list_append (font_infos, info);
- }
-
- g_snprintf (key, 255, "%s_%s", CONF_RENDERING_FONT_MIN_SIZE, fonts_language[i].code);
- info = g_strconcat ("minimum-size", ".", fonts_language[i].code, NULL);
- add_notification_and_notify (client, key,
- (GConfClientNotifyFunc)mozilla_font_size_notifier,
- info);
- font_infos = g_list_append (font_infos, info);
-
- g_snprintf (key, 255, "%s_%s", CONF_RENDERING_FONT_FIXED_SIZE, fonts_language[i].code);
- info = g_strconcat ("size.fixed", ".", fonts_language[i].code, NULL);
- add_notification_and_notify (client, key,
- (GConfClientNotifyFunc)mozilla_font_size_notifier,
- info);
- font_infos = g_list_append (font_infos, info);
-
- g_snprintf (key, 255, "%s_%s", CONF_RENDERING_FONT_VAR_SIZE, fonts_language[i].code);
- info = g_strconcat ("size.variable", ".", fonts_language[i].code, NULL);
- add_notification_and_notify (client, key,
- (GConfClientNotifyFunc)mozilla_font_size_notifier,
- info);
- font_infos = g_list_append (font_infos, info);
- }
}
void
mozilla_notifiers_free (void)
{
- GList *l;
-
ephy_notification_remove (&mozilla_notifiers);
-
- for (l = font_infos; l != NULL; l = l->next)
- {
- g_free (l->data);
- }
-
- g_list_free (font_infos);
}
/**