summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/back-forward-button-box.c16
-rw-r--r--src/back-forward-button-box.h2
-rw-r--r--src/tab-chrome.c6
3 files changed, 12 insertions, 12 deletions
diff --git a/src/back-forward-button-box.c b/src/back-forward-button-box.c
index 744c5ba..674a4c3 100644
--- a/src/back-forward-button-box.c
+++ b/src/back-forward-button-box.c
@@ -27,7 +27,7 @@
#include "web-view.h"
struct _MqBackForwardButtonBox {
- GtkEventBox parent_instance;
+ GtkToolItem parent_instance;
MqTab *tab;
MqWebView *web_view;
GtkWidget *back_button;
@@ -45,11 +45,11 @@ enum {
static GParamSpec *obj_properties[N_PROPERTIES] = {NULL,};
struct _MqBackForwardButtonBoxClass {
- GtkEventBoxClass parent_class;
+ GtkToolItemClass parent_class;
};
G_DEFINE_TYPE(MqBackForwardButtonBox, mq_back_forward_button_box,
- GTK_TYPE_EVENT_BOX)
+ GTK_TYPE_TOOL_ITEM)
static void
back_forward_list_changed_cb(
@@ -413,6 +413,7 @@ static void
mq_back_forward_button_box_init(MqBackForwardButtonBox *back_forward_button_box)
{
GtkWidget *box;
+ GtkWidget *event_box;
/* Back button */
back_forward_button_box->back_button = gtk_button_new_from_icon_name(
@@ -440,12 +441,15 @@ mq_back_forward_button_box_init(MqBackForwardButtonBox *back_forward_button_box)
"linked");
/* Event box (MqBackForwardButtonBox) */
- gtk_container_add(GTK_CONTAINER(back_forward_button_box), box);
- g_signal_connect(back_forward_button_box, "button-press-event",
+ event_box = gtk_event_box_new();
+ gtk_container_add(GTK_CONTAINER(event_box), box);
+ g_signal_connect(event_box, "button-press-event",
G_CALLBACK(event_box_button_press_cb), back_forward_button_box);
+
+ gtk_container_add(GTK_CONTAINER(back_forward_button_box), event_box);
}
-GtkWidget *
+GtkToolItem *
mq_back_forward_button_box_new(MqTab *tab, MqWebView *web_view)
{
return g_object_new(MQ_TYPE_BACK_FORWARD_BUTTON_BOX,
diff --git a/src/back-forward-button-box.h b/src/back-forward-button-box.h
index 6a57a68..0a721ca 100644
--- a/src/back-forward-button-box.h
+++ b/src/back-forward-button-box.h
@@ -51,7 +51,7 @@ G_BEGIN_DECLS
GType
mq_back_forward_button_box_get_type(void);
-GtkWidget *
+GtkToolItem *
mq_back_forward_button_box_new(MqTab *tab, MqWebView *web_view);
G_END_DECLS
diff --git a/src/tab-chrome.c b/src/tab-chrome.c
index 9f78d75..faedcfd 100644
--- a/src/tab-chrome.c
+++ b/src/tab-chrome.c
@@ -85,7 +85,6 @@ navigation_toolbar_new(MqTabChrome *chrome, const gchar *uri)
{
GtkToolbar *navigation_toolbar;
GtkToolItem *back_forward_tool_item;
- GtkWidget *back_forward_event_box;
GtkToolItem *uri_tool_item;
GtkToolItem *home_button;
GtkToolItem *menu_button;
@@ -93,11 +92,8 @@ navigation_toolbar_new(MqTabChrome *chrome, const gchar *uri)
navigation_toolbar = GTK_TOOLBAR(gtk_toolbar_new());
/* Back/forward button box */
- back_forward_tool_item = gtk_tool_item_new();
- back_forward_event_box = mq_back_forward_button_box_new(chrome->tab,
+ back_forward_tool_item = mq_back_forward_button_box_new(chrome->tab,
chrome->web_view);
- gtk_container_add(GTK_CONTAINER(back_forward_tool_item),
- back_forward_event_box);
gtk_toolbar_insert(navigation_toolbar, back_forward_tool_item, -1);
/* Stop/reload button */