diff options
Diffstat (limited to 'embed/mozilla/mozilla-embed.cpp')
-rw-r--r-- | embed/mozilla/mozilla-embed.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/embed/mozilla/mozilla-embed.cpp b/embed/mozilla/mozilla-embed.cpp index fe79c0ae9..467fcbfa1 100644 --- a/embed/mozilla/mozilla-embed.cpp +++ b/embed/mozilla/mozilla-embed.cpp @@ -1169,16 +1169,15 @@ impl_set_charset (EphyEmbed *embed, { nsresult result = NS_OK; EphyWrapper *wrapper; - char *cset; - - cset = g_strdup (charset); wrapper = MOZILLA_EMBED(embed)->priv->wrapper; g_return_val_if_fail (wrapper != NULL, G_FAILED); - wrapper->ForceCharacterSet (cset); - - g_free (cset); + result = wrapper->ForceCharacterSet (charset); + if (NS_FAILED (result)) return G_FAILED; + + gtk_moz_embed_reload (GTK_MOZ_EMBED (embed), + GTK_MOZ_EMBED_FLAG_RELOADCHARSETCHANGE); return NS_SUCCEEDED(result) ? G_OK : G_FAILED; } |