summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPatrick McDermott <pj@pehjota.net>2017-09-17 04:00:08 (EDT)
committer Patrick McDermott <pj@pehjota.net>2017-09-17 04:00:08 (EDT)
commite31c34498f6fedf65f7ca6b12df271d3995f7a42 (patch)
treecc052972d3b415ec269fdff96b833c7a6e8dc763 /src
parent63dc32702cfedf0fd507984b465749ca2ba6c16f (diff)
downloadmarquee-e31c34498f6fedf65f7ca6b12df271d3995f7a42.zip
marquee-e31c34498f6fedf65f7ca6b12df271d3995f7a42.tar.gz
marquee-e31c34498f6fedf65f7ca6b12df271d3995f7a42.tar.bz2
src/tab-chrome.c: Change stop/reload button icon/label
Doesn't seem to work.
Diffstat (limited to 'src')
-rw-r--r--src/tab-chrome.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/tab-chrome.c b/src/tab-chrome.c
index de10dc3..4013c1b 100644
--- a/src/tab-chrome.c
+++ b/src/tab-chrome.c
@@ -207,6 +207,25 @@ title_cb(WebKitWebView __attribute__((unused)) *web_view,
}
static void
+loading_cb(WebKitWebView *web_view,
+ GParamSpec __attribute__((unused)) *paramspec, MqTabChrome *chrome)
+{
+ if (webkit_web_view_is_loading(web_view)) {
+ gtk_tool_button_set_icon_name(
+ GTK_TOOL_BUTTON(chrome->stop_reload_button),
+ "process-stop");
+ gtk_tool_button_set_label(
+ GTK_TOOL_BUTTON(chrome->stop_reload_button), "Stop");
+ } else {
+ gtk_tool_button_set_icon_name(
+ GTK_TOOL_BUTTON(chrome->stop_reload_button),
+ "view-refresh");
+ gtk_tool_button_set_label(
+ GTK_TOOL_BUTTON(chrome->stop_reload_button), "Reload");
+ }
+}
+
+static void
connect_web_view(MqTabChrome *chrome)
{
g_signal_connect(chrome->web_view, "load-changed",
@@ -220,6 +239,8 @@ connect_web_view(MqTabChrome *chrome)
G_CALLBACK(favicon_cb), chrome);
g_signal_connect(chrome->web_view, "notify::title",
G_CALLBACK(title_cb), chrome);
+ g_signal_connect(chrome->web_view, "notify::is-loading",
+ G_CALLBACK(loading_cb), chrome);
}
void