summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPatrick McDermott <pj@pehjota.net>2017-10-13 02:58:43 (EDT)
committer Patrick McDermott <pj@pehjota.net>2017-10-13 02:58:43 (EDT)
commit16ec457eea2d832b85e124ff457b8e3b7fc75f57 (patch)
treebc43cbe202cb78f0a114dcce38789d77ae024c6b /src
parent8a6b0aa358c5f3686a6cb26e50cbfb6e439fd7f8 (diff)
downloadmarquee-16ec457eea2d832b85e124ff457b8e3b7fc75f57.zip
marquee-16ec457eea2d832b85e124ff457b8e3b7fc75f57.tar.gz
marquee-16ec457eea2d832b85e124ff457b8e3b7fc75f57.tar.bz2
MqTabChrome: Use MqHomeButton
Diffstat (limited to 'src')
-rw-r--r--src/tab-chrome.c19
1 files changed, 2 insertions, 17 deletions
diff --git a/src/tab-chrome.c b/src/tab-chrome.c
index aa7ed19..c45d500 100644
--- a/src/tab-chrome.c
+++ b/src/tab-chrome.c
@@ -30,20 +30,10 @@
#include "back-forward-button-box.h"
#include "stop-reload-button.h"
#include "uri-entry.h"
+#include "home-button.h"
#include "main-menu.h"
#include "find-toolbar.h"
-static void
-home_clicked_cb(GtkToolButton G_GNUC_UNUSED *toolbutton,
- MqTabChrome *chrome)
-{
- const gchar *uri;
-
- uri = mq_config_get_string(chrome->config, "tabs.home");
-
- mq_web_view_load_uri(chrome->web_view, uri);
-}
-
static GtkWidget *
navigation_toolbar_new(MqTabChrome *chrome, const gchar *uri)
{
@@ -70,12 +60,7 @@ navigation_toolbar_new(MqTabChrome *chrome, const gchar *uri)
gtk_toolbar_insert(navigation_toolbar, uri_tool_item, -1);
/* Home button */
- home_button = gtk_tool_button_new(gtk_image_new_from_icon_name(
- "go-home", GTK_ICON_SIZE_SMALL_TOOLBAR), "Home");
- gtk_widget_set_tooltip_text(GTK_WIDGET(home_button),
- "Load the home page");
- g_signal_connect(home_button, "clicked",
- G_CALLBACK(home_clicked_cb), chrome);
+ home_button = mq_home_button_new(chrome->config, chrome->web_view);
gtk_toolbar_insert(navigation_toolbar, home_button, -1);
/* Menu button */