diff options
author | Patrick McDermott <pj@pehjota.net> | 2017-09-17 03:28:10 (EDT) |
---|---|---|
committer | Patrick McDermott <pj@pehjota.net> | 2017-09-17 03:28:10 (EDT) |
commit | 3ac8d86edc69715c8a763bb5622de3c425f48c3e (patch) | |
tree | e7e12fc932a4ebca8c51e4582f65b2d4605d452e /src | |
parent | 00711f753dadb2a6f00d4373b4699d1a86b4f5ce (diff) | |
download | marquee-3ac8d86edc69715c8a763bb5622de3c425f48c3e.zip marquee-3ac8d86edc69715c8a763bb5622de3c425f48c3e.tar.gz marquee-3ac8d86edc69715c8a763bb5622de3c425f48c3e.tar.bz2 |
src/tab-chrome.c: Handle back/forward button clicks
Diffstat (limited to 'src')
-rw-r--r-- | src/tab-chrome.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/tab-chrome.c b/src/tab-chrome.c index 14300b6..d66fcb1 100644 --- a/src/tab-chrome.c +++ b/src/tab-chrome.c @@ -26,6 +26,20 @@ #include "tab-chrome.h" +static void +back_clicked_cb(GtkToolButton __attribute__((unused)) *toolbutton, + MqTabChrome *chrome) +{ + webkit_web_view_go_back(chrome->web_view); +} + +static void +forward_clicked_cb(GtkToolButton __attribute__((unused)) *toolbutton, + MqTabChrome *chrome) +{ + webkit_web_view_go_forward(chrome->web_view); +} + static GtkWidget * navigation_toolbar_new(MqTabChrome *chrome, gchar *uri) { @@ -37,11 +51,15 @@ navigation_toolbar_new(MqTabChrome *chrome, gchar *uri) /* Back button */ chrome->back_button = gtk_tool_button_new( gtk_image_new_from_icon_name("go-previous", 16), "Back"); + g_signal_connect(chrome->back_button, "clicked", + G_CALLBACK(back_clicked_cb), chrome); gtk_toolbar_insert(navigation_toolbar, chrome->back_button, -1); /* Forward button */ chrome->forward_button = gtk_tool_button_new( gtk_image_new_from_icon_name("go-next", 16), "Forward"); + g_signal_connect(chrome->forward_button, "clicked", + G_CALLBACK(forward_clicked_cb), chrome); gtk_toolbar_insert(navigation_toolbar, chrome->forward_button, -1); /* URI bar */ |