aboutsummaryrefslogtreecommitdiffstats
path: root/embed
diff options
context:
space:
mode:
authorXan Lopez <xan@src.gnome.org>2009-02-27 00:37:43 +0800
committerXan Lopez <xan@src.gnome.org>2009-02-27 00:37:43 +0800
commit524007db88546cf76a6d0a0c1c512dd93058bc63 (patch)
tree1c9d1aadf4e2f3ee2c1d24c54e8b412ad0b144c1 /embed
parent01b36dd4aeebac60076b1e8d28dd1181129939bd (diff)
downloadgsoc2013-epiphany-524007db88546cf76a6d0a0c1c512dd93058bc63.tar
gsoc2013-epiphany-524007db88546cf76a6d0a0c1c512dd93058bc63.tar.gz
gsoc2013-epiphany-524007db88546cf76a6d0a0c1c512dd93058bc63.tar.bz2
gsoc2013-epiphany-524007db88546cf76a6d0a0c1c512dd93058bc63.tar.lz
gsoc2013-epiphany-524007db88546cf76a6d0a0c1c512dd93058bc63.tar.xz
gsoc2013-epiphany-524007db88546cf76a6d0a0c1c512dd93058bc63.tar.zst
gsoc2013-epiphany-524007db88546cf76a6d0a0c1c512dd93058bc63.zip
Implement get/set encoding for the embed.
Bug #525265 svn path=/trunk/; revision=8815
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