summaryrefslogtreecommitdiff
path: root/src/ephy-encoding-menu.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ephy-encoding-menu.c')
-rw-r--r--src/ephy-encoding-menu.c23
1 files changed, 1 insertions, 22 deletions
diff --git a/src/ephy-encoding-menu.c b/src/ephy-encoding-menu.c
index ff2330563..5f9581385 100644
--- a/src/ephy-encoding-menu.c
+++ b/src/ephy-encoding-menu.c
@@ -35,11 +35,7 @@
#include <glib/gi18n.h>
#include <gtk/gtk.h>
#include <string.h>
-#ifdef HAVE_WEBKIT2
#include <webkit2/webkit2.h>
-#else
-#include <webkit/webkit.h>
-#endif
#define EPHY_ENCODING_MENU_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), EPHY_TYPE_ENCODING_MENU, EphyEncodingMenuPrivate))
@@ -135,18 +131,9 @@ update_encoding_menu_cb (GtkAction *dummy, EphyEncodingMenu *menu)
embed = ephy_embed_container_get_active_child (EPHY_EMBED_CONTAINER (p->window));
view = EPHY_GET_WEBKIT_WEB_VIEW_FROM_EMBED (embed);
-#ifdef HAVE_WEBKIT2
+
encoding = webkit_web_view_get_custom_charset (view);
if (encoding == NULL) goto build_menu;
-#else
- encoding = webkit_web_view_get_custom_encoding (view);
- if (encoding == NULL)
- {
- encoding = webkit_web_view_get_encoding (view);
- if (encoding == NULL) goto build_menu;
- is_automatic = TRUE;
- }
-#endif
enc_node = ephy_encodings_get_encoding (p->encodings, encoding, TRUE);
g_assert (EPHY_IS_ENCODING (enc_node));
@@ -254,11 +241,7 @@ encoding_activate_cb (GtkAction *action, EphyEncodingMenu *menu)
embed = ephy_embed_container_get_active_child (EPHY_EMBED_CONTAINER (menu->priv->window));
view = EPHY_GET_WEBKIT_WEB_VIEW_FROM_EMBED (embed);
-#ifdef HAVE_WEBKIT2
webkit_web_view_set_custom_charset (view, encoding);
-#else
- webkit_web_view_set_custom_encoding (view, encoding);
-#endif
ephy_encodings_add_recent (menu->priv->encodings, encoding);
}
@@ -329,11 +312,7 @@ ephy_encoding_menu_automatic_cb (GtkAction *action, EphyEncodingMenu *menu)
/* setting NULL will clear the forced encoding */
view = EPHY_GET_WEBKIT_WEB_VIEW_FROM_EMBED (embed);
-#ifdef HAVE_WEBKIT2
webkit_web_view_set_custom_charset (view, NULL);
-#else
- webkit_web_view_set_custom_encoding (view, NULL);
-#endif
}
static const GtkActionEntry menu_entries [] =