diff options
author | Patrick McDermott <pj@pehjota.net> | 2017-09-17 00:24:55 (EDT) |
---|---|---|
committer | Patrick McDermott <pj@pehjota.net> | 2017-09-17 00:24:55 (EDT) |
commit | 996ad39cc5bde753cb704b94a35b898ed73ae3bc (patch) | |
tree | e0bd521ef91fccc234f25525dd75039569afda65 /src | |
parent | 307fc72a11e5a6275110beb81b21d8d50e9c8100 (diff) | |
download | marquee-996ad39cc5bde753cb704b94a35b898ed73ae3bc.zip marquee-996ad39cc5bde753cb704b94a35b898ed73ae3bc.tar.gz marquee-996ad39cc5bde753cb704b94a35b898ed73ae3bc.tar.bz2 |
load_progress_cb(), connect_web_view(): New functions
Diffstat (limited to 'src')
-rw-r--r-- | src/tab-chrome.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/tab-chrome.c b/src/tab-chrome.c index 7a97437..d71b5c1 100644 --- a/src/tab-chrome.c +++ b/src/tab-chrome.c @@ -87,8 +87,24 @@ mq_tab_chrome_get_container(MqTabChrome *chrome) return chrome->container; } +static void +load_progress_cb(WebKitWebView *web_view, + GParamSpec __attribute__((unused)) *paramspec, MqTabChrome *chrome) +{ + gtk_entry_set_progress_fraction(GTK_ENTRY(chrome->uri_entry), + webkit_web_view_get_estimated_load_progress(web_view)); +} + +static void +connect_web_view(MqTabChrome *chrome) +{ + g_signal_connect(chrome->web_view, "notify::estimated-load-progress", + G_CALLBACK(load_progress_cb), chrome); +} + void mq_tab_chrome_set_web_view(MqTabChrome *chrome, WebKitWebView *web_view) { chrome->web_view = web_view; + connect_web_view(chrome); } |