From 026b90333c7c21998f1832c0e741937c6108d196 Mon Sep 17 00:00:00 2001 From: Xan Lopez Date: Thu, 26 Feb 2009 17:46:41 +0000 Subject: Remove embedding APIs for set/get encoding. Use WebKit API directly. svn path=/trunk/; revision=8817 --- embed/ephy-embed.c | 35 ----------------------------------- embed/ephy-embed.h | 11 +---------- embed/webkit/webkit-embed.c | 17 ----------------- 3 files changed, 1 insertion(+), 62 deletions(-) (limited to 'embed') diff --git a/embed/ephy-embed.c b/embed/ephy-embed.c index b9721bb0f..73d34d6f3 100644 --- a/embed/ephy-embed.c +++ b/embed/ephy-embed.c @@ -555,41 +555,6 @@ ephy_embed_show_page_certificate (EphyEmbed *embed) iface->show_page_certificate (embed); } -/** - * ephy_embed_set_encoding: - * @embed: an #EphyEmbed - * @encoding: the desired encoding - * - * Sets @embed's character encoding to @encoding. These cryptic encoding - * strings are listed in embed/ephy-encodings.c. - * - * Pass an empty string (not NULL) in @encoding to reset @embed to use the - * document-specified encoding. - **/ -void -ephy_embed_set_encoding (EphyEmbed *embed, - const char *encoding) -{ - EphyEmbedIface *iface = EPHY_EMBED_GET_IFACE (embed); - iface->set_encoding (embed, encoding); -} - -/** - * ephy_embed_get_encoding: - * @embed: an #EphyEmbed - * - * Returns the @embed's document encoding. - * - * Returns: the @embed's document encoding - * - **/ -const char * -ephy_embed_get_encoding (EphyEmbed *embed) -{ - EphyEmbedIface *iface = EPHY_EMBED_GET_IFACE (embed); - return iface->get_encoding (embed); -} - /** * ephy_embed_has_automatic_encoding: * @embed: an #EphyEmbed diff --git a/embed/ephy-embed.h b/embed/ephy-embed.h index 7855898b4..0b9c65149 100644 --- a/embed/ephy-embed.h +++ b/embed/ephy-embed.h @@ -190,10 +190,7 @@ struct _EphyEmbedIface void (* scroll_pixels) (EphyEmbed *embed, int dx, int dy); - const char * (* get_encoding) (EphyEmbed *embed); gboolean (* has_automatic_encoding) (EphyEmbed *embed); - void (* set_encoding) (EphyEmbed *embed, - const char *encoding); void (* set_print_preview_mode) (EphyEmbed *embed, gboolean mode); int (* print_preview_n_pages) (EphyEmbed *embed); @@ -308,13 +305,7 @@ gboolean ephy_embed_get_is_blank (EphyEmbed *embed); const char * ephy_embed_get_loading_title (EphyEmbed *embed); gboolean ephy_embed_get_visibility (EphyEmbed *embed); -/* Encoding */ -const char *ephy_embed_get_encoding (EphyEmbed *embed); - -gboolean ephy_embed_has_automatic_encoding (EphyEmbed *embed); - -void ephy_embed_set_encoding (EphyEmbed *embed, - const char *encoding); +gboolean ephy_embed_has_automatic_encoding (EphyEmbed *embed); /* Print */ void ephy_embed_set_print_preview_mode (EphyEmbed *embed, diff --git a/embed/webkit/webkit-embed.c b/embed/webkit/webkit-embed.c index 330718a29..e41d7172d 100644 --- a/embed/webkit/webkit-embed.c +++ b/embed/webkit/webkit-embed.c @@ -557,21 +557,6 @@ impl_print_preview_navigate (EphyEmbed *embed, { } -static void -impl_set_encoding (EphyEmbed *embed, - const char *encoding) -{ - WebKitWebView *view = WEBKIT_EMBED (embed)->priv->web_view; - webkit_web_view_set_custom_encoding (view, encoding); -} - -static const char * -impl_get_encoding (EphyEmbed *embed) -{ - WebKitWebView *view = WEBKIT_EMBED (embed)->priv->web_view; - return webkit_web_view_get_custom_encoding (view); -} - static gboolean impl_has_automatic_encoding (EphyEmbed *embed) { @@ -596,8 +581,6 @@ ephy_embed_iface_init (EphyEmbedIface *iface) iface->get_js_status = impl_get_js_status; iface->shistory_copy = impl_shistory_copy; iface->show_page_certificate = impl_show_page_certificate; - iface->set_encoding = impl_set_encoding; - iface->get_encoding = impl_get_encoding; iface->has_automatic_encoding = impl_has_automatic_encoding; iface->set_print_preview_mode = impl_set_print_preview_mode; iface->print_preview_n_pages = impl_print_preview_n_pages; -- cgit v1.2.3