From 16ec457eea2d832b85e124ff457b8e3b7fc75f57 Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Fri, 13 Oct 2017 02:58:43 -0400 Subject: MqTabChrome: Use MqHomeButton --- (limited to 'src/tab-chrome.c') 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 */ -- cgit v0.9.1