From 1e829eefa511c3463deddb7c3d99d4c27960e077 Mon Sep 17 00:00:00 2001 From: Xan Lopez Date: Mon, 30 Jun 2008 21:27:18 +0000 Subject: embed: remove ephy_embed_{set,get}_zoom. Set zoom-level on the WebKitWebView directly. svn path=/trunk/; revision=8327 --- embed/ephy-embed.c | 35 ----------------------------------- embed/ephy-embed.h | 9 --------- embed/webkit/webkit-embed.c | 19 ------------------- 3 files changed, 63 deletions(-) (limited to 'embed') diff --git a/embed/ephy-embed.c b/embed/ephy-embed.c index 2260b112d..71db600b2 100644 --- a/embed/ephy-embed.c +++ b/embed/ephy-embed.c @@ -503,41 +503,6 @@ ephy_embed_get_js_status (EphyEmbed *embed) return iface->get_js_status (embed); } -/** - * ephy_embed_set_zoom: - * @embed: an #EphyEmbed - * @zoom: the new zoom level - * - * Sets the zoom level for a web page. - * - * Zoom is normally controlled by the Epiphany itself and remembered in - * Epiphany's history data. Be very careful not to break this behavior if using - * this function; better yet, don't use this function at all. - **/ -void -ephy_embed_set_zoom (EphyEmbed *embed, - float zoom) -{ - EphyEmbedIface *iface = EPHY_EMBED_GET_IFACE (embed); - iface->set_zoom (embed, zoom); -} - -/** - * ephy_embed_get_zoom: - * @embed: an #EphyEmbed - * - * Returns the zoom level of @embed. A zoom of 1.0 corresponds to 100% (normal - * size). - * - * Return value: the zoom level of @embed - **/ -float -ephy_embed_get_zoom (EphyEmbed *embed) -{ - EphyEmbedIface *iface = EPHY_EMBED_GET_IFACE (embed); - return iface->get_zoom (embed); -} - /** * ephy_embed_scroll: * @embed: an #EphyEmbed diff --git a/embed/ephy-embed.h b/embed/ephy-embed.h index 8a03b501b..b419cea96 100644 --- a/embed/ephy-embed.h +++ b/embed/ephy-embed.h @@ -184,9 +184,6 @@ struct _EphyEmbedIface EphyEmbedSecurityLevel *level, char **description); void (* show_page_certificate) (EphyEmbed *embed); - void (* set_zoom) (EphyEmbed *embed, - float zoom); - float (* get_zoom) (EphyEmbed *embed); void (* scroll_lines) (EphyEmbed *embed, int num_lines); void (* scroll_pages) (EphyEmbed *embed, @@ -270,12 +267,6 @@ void ephy_embed_get_security_level (EphyEmbed *embed, void ephy_embed_show_page_certificate (EphyEmbed *embed); -/* Zoom */ -void ephy_embed_set_zoom (EphyEmbed *embed, - float zoom); - -float ephy_embed_get_zoom (EphyEmbed *embed); - /* Scroll */ void ephy_embed_scroll (EphyEmbed *embed, int num_lines); diff --git a/embed/webkit/webkit-embed.c b/embed/webkit/webkit-embed.c index 4d483844a..ec9ceefb2 100644 --- a/embed/webkit/webkit-embed.c +++ b/embed/webkit/webkit-embed.c @@ -383,23 +383,6 @@ impl_get_location (EphyEmbed *embed, return g_strdup (webkit_web_frame_get_uri (web_frame)); } -static float -impl_get_zoom (EphyEmbed *embed) -{ - float zoom = 1.0f; - g_object_get (WEBKIT_EMBED (embed)->priv->web_view, "zoom-level", &zoom, NULL); - return zoom; -} - -static void -impl_set_zoom (EphyEmbed *embed, - float zoom) -{ - g_return_if_fail (zoom > 0.0); - - g_object_set (WEBKIT_EMBED (embed)->priv->web_view, "zoom-level", zoom, NULL); -} - static void impl_scroll_lines (EphyEmbed *embed, int num_lines) @@ -502,8 +485,6 @@ ephy_embed_iface_init (EphyEmbedIface *iface) iface->go_up = impl_go_up; iface->get_location = impl_get_location; iface->get_js_status = impl_get_js_status; - iface->set_zoom = impl_set_zoom; - iface->get_zoom = impl_get_zoom; iface->scroll_lines = impl_scroll_lines; iface->scroll_pages = impl_scroll_pages; iface->scroll_pixels = impl_scroll_pixels; -- cgit v1.2.3