summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/tab-chrome.c14
-rw-r--r--src/tab-chrome.h1
2 files changed, 15 insertions, 0 deletions
diff --git a/src/tab-chrome.c b/src/tab-chrome.c
index 2808b3f..90309a6 100644
--- a/src/tab-chrome.c
+++ b/src/tab-chrome.c
@@ -41,6 +41,13 @@ forward_clicked_cb(GtkToolButton __attribute__((unused)) *toolbutton,
}
static void
+stop_reload_clicked_cb(GtkToolButton __attribute__((unused)) *toolbutton,
+ MqTabChrome *chrome)
+{
+ webkit_web_view_reload(chrome->web_view);
+}
+
+static void
uri_activate_cb(GtkEntry *entry, MqTabChrome *chrome)
{
webkit_web_view_load_uri(chrome->web_view,
@@ -69,6 +76,13 @@ navigation_toolbar_new(MqTabChrome *chrome, gchar *uri)
G_CALLBACK(forward_clicked_cb), chrome);
gtk_toolbar_insert(navigation_toolbar, chrome->forward_button, -1);
+ /* Stop/reload button */
+ chrome->stop_reload_button = gtk_tool_button_new(
+ gtk_image_new_from_icon_name("view-refresh", 16), "Reload");
+ g_signal_connect(chrome->stop_reload_button, "clicked",
+ G_CALLBACK(stop_reload_clicked_cb), chrome);
+ gtk_toolbar_insert(navigation_toolbar, chrome->stop_reload_button, -1);
+
/* URI bar */
uri_toolitem = gtk_tool_item_new();
chrome->uri_entry = gtk_entry_new();
diff --git a/src/tab-chrome.h b/src/tab-chrome.h
index 3d08cad..3785a95 100644
--- a/src/tab-chrome.h
+++ b/src/tab-chrome.h
@@ -32,6 +32,7 @@ typedef struct {
GtkWidget *container;
GtkToolItem *back_button;
GtkToolItem *forward_button;
+ GtkToolItem *stop_reload_button;
GtkWidget *uri_entry;
WebKitWebView *web_view;
} MqTabChrome;