aboutsummaryrefslogtreecommitdiffstats
path: root/embed/ephy-web-view.c
diff options
context:
space:
mode:
authorCarlos Garcia Campos <cgarcia@igalia.com>2012-06-21 18:24:15 +0800
committerCarlos Garcia Campos <carlosgc@gnome.org>2012-06-21 18:45:21 +0800
commit32c03a55b26a95bebfbde11a167c4f563070d024 (patch)
tree094687d6890e11e13c56a461976c7dee30aea6bb /embed/ephy-web-view.c
parent4d265094c5d28e7192dec077ea56c2a6c199cb4a (diff)
downloadgsoc2013-epiphany-32c03a55b26a95bebfbde11a167c4f563070d024.tar
gsoc2013-epiphany-32c03a55b26a95bebfbde11a167c4f563070d024.tar.gz
gsoc2013-epiphany-32c03a55b26a95bebfbde11a167c4f563070d024.tar.bz2
gsoc2013-epiphany-32c03a55b26a95bebfbde11a167c4f563070d024.tar.lz
gsoc2013-epiphany-32c03a55b26a95bebfbde11a167c4f563070d024.tar.xz
gsoc2013-epiphany-32c03a55b26a95bebfbde11a167c4f563070d024.tar.zst
gsoc2013-epiphany-32c03a55b26a95bebfbde11a167c4f563070d024.zip
Use WebKitWebView API to get/set the zoom level instead of g_object_get/set
Also use always double instead of float so that it will be compatible with WebKit2 API.
Diffstat (limited to 'embed/ephy-web-view.c')
-rw-r--r--embed/ephy-web-view.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/embed/ephy-web-view.c b/embed/ephy-web-view.c
index 72da3ce8c..a3677e953 100644
--- a/embed/ephy-web-view.c
+++ b/embed/ephy-web-view.c
@@ -1855,13 +1855,11 @@ get_host_for_url_cb (gpointer service,
view = EPHY_WEB_VIEW (user_data);
host = (EphyHistoryHost *)result_data;
- g_object_get (view,
- "zoom-level", &current_zoom,
- NULL);
+ current_zoom = webkit_web_view_get_zoom_level (WEBKIT_WEB_VIEW (view));
if (host->zoom_level != current_zoom) {
view->priv->is_setting_zoom = TRUE;
- g_object_set (view, "zoom-level", host->zoom_level, NULL);
+ webkit_web_view_set_zoom_level (WEBKIT_WEB_VIEW (view), host->zoom_level);
view->priv->is_setting_zoom = FALSE;
}
@@ -2254,12 +2252,10 @@ zoom_changed_cb (WebKitWebView *web_view,
gpointer user_data)
{
char *address;
- float zoom;
+ double zoom;
EphyWebViewPrivate *priv = EPHY_WEB_VIEW (web_view)->priv;
- g_object_get (web_view,
- "zoom-level", &zoom,
- NULL);
+ zoom = webkit_web_view_get_zoom_level (web_view);
if (priv->is_setting_zoom)
return;