epiphany r8327 - in trunk: doc/reference doc/reference/tmpl embed embed/webkit src
- From: xan svn gnome org
- To: svn-commits-list gnome org
- Subject: epiphany r8327 - in trunk: doc/reference doc/reference/tmpl embed embed/webkit src
- Date: Mon, 30 Jun 2008 21:27:18 +0000 (UTC)
Author: xan
Date: Mon Jun 30 21:27:18 2008
New Revision: 8327
URL: http://svn.gnome.org/viewvc/epiphany?rev=8327&view=rev
Log:
embed: remove ephy_embed_{set,get}_zoom.
Set zoom-level on the WebKitWebView directly.
Modified:
trunk/doc/reference/epiphany-sections.txt
trunk/doc/reference/tmpl/ephy-embed.sgml
trunk/embed/ephy-embed.c
trunk/embed/ephy-embed.h
trunk/embed/webkit/webkit-embed.c
trunk/src/ephy-window.c
trunk/src/epiphany.defs
Modified: trunk/doc/reference/epiphany-sections.txt
==============================================================================
--- trunk/doc/reference/epiphany-sections.txt (original)
+++ trunk/doc/reference/epiphany-sections.txt Mon Jun 30 21:27:18 2008
@@ -76,8 +76,6 @@
ephy_embed_shistory_get_pos
ephy_embed_shistory_go_nth
ephy_embed_get_security_level
-ephy_embed_set_zoom
-ephy_embed_get_zoom
ephy_embed_find_set_properties
ephy_embed_find_next
ephy_embed_set_encoding
Modified: trunk/doc/reference/tmpl/ephy-embed.sgml
==============================================================================
--- trunk/doc/reference/tmpl/ephy-embed.sgml (original)
+++ trunk/doc/reference/tmpl/ephy-embed.sgml Mon Jun 30 21:27:18 2008
@@ -272,7 +272,6 @@
@dom_mouse_down:
@dom_content_loaded:
@popup_blocked:
- zoom_change:
@content_blocked:
@modal_alert:
@modal_alert_closed:
@@ -293,8 +292,6 @@
@shistory_copy:
@get_security_level:
@show_page_certificate:
- set_zoom:
- get_zoom:
@scroll_lines:
@scroll_pages:
@scroll_pixels:
@@ -417,24 +414,6 @@
@description:
-<!-- ##### FUNCTION ephy_embed_set_zoom ##### -->
-<para>
-
-</para>
-
- embed:
- zoom:
-
-
-<!-- ##### FUNCTION ephy_embed_get_zoom ##### -->
-<para>
-
-</para>
-
- embed:
- Returns:
-
-
<!-- ##### FUNCTION ephy_embed_find_set_properties ##### -->
<para>
Modified: trunk/embed/ephy-embed.c
==============================================================================
--- trunk/embed/ephy-embed.c (original)
+++ trunk/embed/ephy-embed.c Mon Jun 30 21:27:18 2008
@@ -504,41 +504,6 @@
}
/**
- * 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
* @num_lines: The number of lines to scroll by
Modified: trunk/embed/ephy-embed.h
==============================================================================
--- trunk/embed/ephy-embed.h (original)
+++ trunk/embed/ephy-embed.h Mon Jun 30 21:27:18 2008
@@ -184,9 +184,6 @@
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_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);
Modified: trunk/embed/webkit/webkit-embed.c
==============================================================================
--- trunk/embed/webkit/webkit-embed.c (original)
+++ trunk/embed/webkit/webkit-embed.c Mon Jun 30 21:27:18 2008
@@ -383,23 +383,6 @@
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 @@
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;
Modified: trunk/src/ephy-window.c
==============================================================================
--- trunk/src/ephy-window.c (original)
+++ trunk/src/ephy-window.c Mon Jun 30 21:27:18 2008
@@ -3753,13 +3753,16 @@
{
EphyEmbed *embed;
float current_zoom = 1.0;
+ WebKitWebView *web_view;
g_return_if_fail (EPHY_IS_WINDOW (window));
embed = window->priv->active_embed;
g_return_if_fail (embed != NULL);
- current_zoom = ephy_embed_get_zoom (embed);
+ web_view = EPHY_GET_WEBKIT_WEB_VIEW_FROM_EMBED (embed);
+
+ g_object_get (G_OBJECT (web_view), "zoom-level", ¤t_zoom, NULL);
if (zoom == ZOOM_IN)
{
@@ -3772,7 +3775,7 @@
if (zoom != current_zoom)
{
- ephy_embed_set_zoom (embed, zoom);
+ g_object_set (G_OBJECT (web_view), "zoom-level", zoom, NULL);
}
}
Modified: trunk/src/epiphany.defs
==============================================================================
--- trunk/src/epiphany.defs (original)
+++ trunk/src/epiphany.defs Mon Jun 30 21:27:18 2008
@@ -1066,12 +1066,6 @@
)
)
-(define-method get_zoom
- (of-object "EphyEmbed")
- (c-name "ephy_embed_get_zoom")
- (return-type "float")
-)
-
(define-method get_document_type
(of-object "EphyEmbed")
(c-name "ephy_embed_get_document_type")
@@ -1174,15 +1168,6 @@
(return-type "none")
)
-(define-method set_zoom
- (of-object "EphyEmbed")
- (c-name "ephy_embed_set_zoom")
- (return-type "none")
- (parameters
- '("float" "zoom")
- )
-)
-
(define-method has_automatic_encoding
(of-object "EphyEmbed")
(c-name "ephy_embed_has_automatic_encoding")
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]