summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQuentin Rameau <quinq@fifth.space>2015-11-18 18:51:55 +0100
committerQuentin Rameau <quinq@fifth.space>2015-11-20 00:34:21 +0100
commit26a2dbac6501d095937568cdb9f00083e0b02146 (patch)
treed1609cb4a481bbfe1bf6d641c9e81abe1e00c420
parent58c4e189758d829c418bd3a0e30646e533131487 (diff)
downloadsurf-26a2dbac6501d095937568cdb9f00083e0b02146.tar.gz
surf-26a2dbac6501d095937568cdb9f00083e0b02146.tar.bz2
surf-26a2dbac6501d095937568cdb9f00083e0b02146.zip
Adapted progresschanged()
-rw-r--r--surf.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/surf.c b/surf.c
index 7ae1e6f..2e8ca70 100644
--- a/surf.c
+++ b/surf.c
@@ -169,7 +169,7 @@ static void menuactivate(GtkMenuItem *item, Client *c);
static void print(Client *c, const Arg *arg);
static GdkFilterReturn processx(GdkXEvent *xevent, GdkEvent *event,
gpointer d);
-static void progresschange(WebKitWebView *view, GParamSpec *pspec, Client *c);
+static void progresschanged(WebKitWebView *v, GParamSpec *ps, Client *c);
static void linkopen(Client *c, const Arg *arg);
static void linkopenembed(Client *c, const Arg *arg);
static void reload(Client *c, const Arg *arg);
@@ -993,8 +993,8 @@ newview(Client *c, WebKitWebView *rv)
"load-changed",
G_CALLBACK(loadchanged), c);
g_signal_connect(G_OBJECT(v),
- "notify::progress",
- G_CALLBACK(progresschange), c);
+ "notify::estimated-load-progress",
+ G_CALLBACK(progresschanged), c);
g_signal_connect(G_OBJECT(v),
"download-requested",
G_CALLBACK(initdownload), c);
@@ -1220,9 +1220,10 @@ processx(GdkXEvent *e, GdkEvent *event, gpointer d)
}
void
-progresschange(WebKitWebView *view, GParamSpec *pspec, Client *c)
+progresschanged(WebKitWebView *v, GParamSpec *ps, Client *c)
{
- c->progress = webkit_web_view_get_progress(c->view) * 100;
+ c->progress = webkit_web_view_get_estimated_load_progress(c->view) *
+ 100;
updatetitle(c);
}