[Xfce4-commits] <midori:master> Use estimated-load-progress with WebKit2
Christian Dywan
noreply at xfce.org
Tue Feb 26 00:54:01 CET 2013
Updating branch refs/heads/master
to 39b8c1daa81a9b46618ba34e1744f15515e669be (commit)
from 4d08794676709e9a69c69f15fcfb61e6b7cdfc7c (commit)
commit 39b8c1daa81a9b46618ba34e1744f15515e669be
Author: Christian Dywan <christian at twotoasts.de>
Date: Tue Feb 26 00:31:08 2013 +0100
Use estimated-load-progress with WebKit2
midori/midori-view.c | 17 +++++++++++------
1 files changed, 11 insertions(+), 6 deletions(-)
diff --git a/midori/midori-view.c b/midori/midori-view.c
index 90336b6..c36e9fa 100644
--- a/midori/midori-view.c
+++ b/midori/midori-view.c
@@ -890,10 +890,12 @@ webkit_web_view_load_committed_cb (WebKitWebView* web_view,
static void
webkit_web_view_progress_changed_cb (WebKitWebView* web_view,
- gint progress,
+ GParamSpec* pspec,
MidoriView* view)
{
- midori_tab_set_progress (MIDORI_TAB (view), progress ? progress / 100.0 : 0.0);
+ gdouble progress = 1.0;
+ g_object_get (web_view, pspec->name, &progress, NULL);
+ midori_tab_set_progress (MIDORI_TAB (view), progress);
}
#ifndef HAVE_WEBKIT2
@@ -3619,13 +3621,16 @@ midori_view_constructor (GType type,
webkit_web_view_load_started_cb, view,
"signal::load-committed",
webkit_web_view_load_committed_cb, view,
- #endif
- "signal::load-progress-changed",
- webkit_web_view_progress_changed_cb, view,
- #ifndef HAVE_WEBKIT2
"signal::load-finished",
webkit_web_view_load_finished_cb, view,
#endif
+ #ifndef HAVE_WEBKIT2
+ "signal::notify::progress",
+ webkit_web_view_progress_changed_cb, view,
+ #else
+ "signal::notify::estimated-load-progress",
+ webkit_web_view_progress_changed_cb, view,
+ #endif
#if WEBKIT_CHECK_VERSION (1, 1, 18)
"signal::notify::icon-uri",
midori_web_view_notify_icon_uri_cb, view,
More information about the Xfce4-commits
mailing list