summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPatrick McDermott <pj@pehjota.net>2017-09-17 00:35:16 (EDT)
committer Patrick McDermott <pj@pehjota.net>2017-09-17 00:35:16 (EDT)
commitd6fad72f86efdf7497999225398cb1b1691e1046 (patch)
treeacfc61a0bd34418d5aec779ba122055d62ce4666 /src
parent7503fd68c560ba49f0c0e321699033afa8527cef (diff)
downloadmarquee-d6fad72f86efdf7497999225398cb1b1691e1046.zip
marquee-d6fad72f86efdf7497999225398cb1b1691e1046.tar.gz
marquee-d6fad72f86efdf7497999225398cb1b1691e1046.tar.bz2
src/tab-chrome.c: Monitor Web view URI changes
Diffstat (limited to 'src')
-rw-r--r--src/tab-chrome.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/tab-chrome.c b/src/tab-chrome.c
index 6671835..79b5c2a 100644
--- a/src/tab-chrome.c
+++ b/src/tab-chrome.c
@@ -114,12 +114,22 @@ load_progress_cb(WebKitWebView *web_view,
}
static void
+uri_cb(WebKitWebView *web_view, GParamSpec __attribute__((unused)) *paramspec,
+ MqTabChrome *chrome)
+{
+ gtk_entry_set_text(GTK_ENTRY(chrome->uri_entry),
+ webkit_web_view_get_uri(web_view));
+}
+
+static void
connect_web_view(MqTabChrome *chrome)
{
g_signal_connect(chrome->web_view, "load-changed",
G_CALLBACK(load_changed_cb), chrome);
g_signal_connect(chrome->web_view, "notify::estimated-load-progress",
G_CALLBACK(load_progress_cb), chrome);
+ g_signal_connect(chrome->web_view, "notify::uri",
+ G_CALLBACK(uri_cb), chrome);
}
void