aboutsummaryrefslogtreecommitdiffstats
path: root/embed
diff options
context:
space:
mode:
Diffstat (limited to 'embed')
-rw-r--r--embed/ephy-embed.c2
-rw-r--r--embed/ephy-embed.h4
-rw-r--r--embed/webkit/webkit-embed.c7
3 files changed, 8 insertions, 5 deletions
diff --git a/embed/ephy-embed.c b/embed/ephy-embed.c
index 140d7cb98..b9721bb0f 100644
--- a/embed/ephy-embed.c
+++ b/embed/ephy-embed.c
@@ -583,7 +583,7 @@ ephy_embed_set_encoding (EphyEmbed *embed,
* Returns: the @embed's document encoding
*
**/
-char *
+const char *
ephy_embed_get_encoding (EphyEmbed *embed)
{
EphyEmbedIface *iface = EPHY_EMBED_GET_IFACE (embed);
diff --git a/embed/ephy-embed.h b/embed/ephy-embed.h
index 36a705174..7855898b4 100644
--- a/embed/ephy-embed.h
+++ b/embed/ephy-embed.h
@@ -190,7 +190,7 @@ struct _EphyEmbedIface
void (* scroll_pixels) (EphyEmbed *embed,
int dx,
int dy);
- char * (* get_encoding) (EphyEmbed *embed);
+ const char * (* get_encoding) (EphyEmbed *embed);
gboolean (* has_automatic_encoding) (EphyEmbed *embed);
void (* set_encoding) (EphyEmbed *embed,
const char *encoding);
@@ -309,7 +309,7 @@ const char * ephy_embed_get_loading_title (EphyEmbed *embed);
gboolean ephy_embed_get_visibility (EphyEmbed *embed);
/* Encoding */
-char *ephy_embed_get_encoding (EphyEmbed *embed);
+const char *ephy_embed_get_encoding (EphyEmbed *embed);
gboolean ephy_embed_has_automatic_encoding (EphyEmbed *embed);
diff --git a/embed/webkit/webkit-embed.c b/embed/webkit/webkit-embed.c
index aa512f24f..0460d7d3a 100644
--- a/embed/webkit/webkit-embed.c
+++ b/embed/webkit/webkit-embed.c
@@ -561,12 +561,15 @@ 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 char *
+static const char *
impl_get_encoding (EphyEmbed *embed)
{
- return NULL;
+ WebKitWebView *view = WEBKIT_EMBED (embed)->priv->web_view;
+ return webkit_web_view_get_custom_encoding (view);;
}
static gboolean