From d6fad72f86efdf7497999225398cb1b1691e1046 Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Sun, 17 Sep 2017 00:35:16 -0400 Subject: src/tab-chrome.c: Monitor Web view URI changes --- (limited to 'src') 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 -- cgit v0.9.1