From cdbe5e7d4217e35b80684e5590cce9c920157b85 Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Tue, 02 Oct 2018 00:48:01 -0400 Subject: MqBackForwardButtonBox: Make buttons insensitive on init Fixes clickable back/forward buttons in a new tab with no history, as well as: ** (marquee:...): CRITICAL **: const gchar* webkit_back_forward_list_item_get_title(WebKitBackForwardListItem*): assertion 'WEBKIT_IS_BACK_FORWARD_LIST_ITEM(listItem)' failed ** (marquee:...): CRITICAL **: const gchar* webkit_back_forward_list_item_get_uri(WebKitBackForwardListItem*): assertion 'WEBKIT_IS_BACK_FORWARD_LIST_ITEM(listItem)' failed ** (marquee:...): CRITICAL **: const gchar* webkit_back_forward_list_item_get_uri(WebKitBackForwardListItem*): assertion 'WEBKIT_IS_BACK_FORWARD_LIST_ITEM(listItem)' failed (marquee:...): Gtk-CRITICAL **: gtk_text_buffer_insert_with_tags: assertion 'text != NULL' failed --- (limited to 'src/toolbars') diff --git a/src/toolbars/navigation/back-forward-button-box.c b/src/toolbars/navigation/back-forward-button-box.c index 271649f..13a7590 100644 --- a/src/toolbars/navigation/back-forward-button-box.c +++ b/src/toolbars/navigation/back-forward-button-box.c @@ -409,6 +409,8 @@ mq_back_forward_button_box_init(MqBackForwardButtonBox *back_forward_button_box) "go-previous", GTK_ICON_SIZE_SMALL_TOOLBAR); gtk_widget_set_can_focus(back_forward_button_box->back_button, FALSE); + gtk_widget_set_sensitive(back_forward_button_box->back_button, + FALSE); gtk_widget_set_tooltip_text(back_forward_button_box->back_button, _("Go back one page")); g_signal_connect(back_forward_button_box->back_button, "clicked", @@ -419,6 +421,8 @@ mq_back_forward_button_box_init(MqBackForwardButtonBox *back_forward_button_box) "go-next", GTK_ICON_SIZE_SMALL_TOOLBAR); gtk_widget_set_can_focus(back_forward_button_box->forward_button, FALSE); + gtk_widget_set_sensitive(back_forward_button_box->forward_button, + FALSE); gtk_widget_set_tooltip_text(back_forward_button_box->forward_button, _("Go forward one page")); g_signal_connect(back_forward_button_box->forward_button, "clicked", -- cgit v0.9.1