diff options
author | Patrick McDermott <pj@pehjota.net> | 2017-09-19 13:30:17 (EDT) |
---|---|---|
committer | Patrick McDermott <pj@pehjota.net> | 2017-09-19 13:30:17 (EDT) |
commit | 875ad970b6c1ea132cf4d7434afd8030cde3077d (patch) | |
tree | bcae3224d4bec95d221cd16b62dd13870a4d60dc /src | |
parent | 752a58698b79a566aff4c004a1ddb047311be500 (diff) | |
download | marquee-875ad970b6c1ea132cf4d7434afd8030cde3077d.zip marquee-875ad970b6c1ea132cf4d7434afd8030cde3077d.tar.gz marquee-875ad970b6c1ea132cf4d7434afd8030cde3077d.tar.bz2 |
src/tab-chrome.c: Fix gtk_widget_set_can_focus() assertion
Fixes:
Gtk-CRITICAL **: gtk_widget_set_can_focus: assertion 'GTK_IS_WIDGET (widget)' failed
Diffstat (limited to 'src')
-rw-r--r-- | src/tab-chrome.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/tab-chrome.c b/src/tab-chrome.c index b94edb7..bb360d3 100644 --- a/src/tab-chrome.c +++ b/src/tab-chrome.c @@ -61,6 +61,7 @@ back_forward_list_item_new(WebKitBackForwardListItem *list_item, { GtkWidget *label; GtkWidget *icon_stack; + GtkWidget *icon; GtkWidget *box; label = gtk_label_new(webkit_back_forward_list_item_get_title( @@ -70,8 +71,10 @@ back_forward_list_item_new(WebKitBackForwardListItem *list_item, icon_stack = gtk_stack_new(); switch (type) { case 0: - gtk_stack_add_named(GTK_STACK(icon_stack), - gtk_radio_button_new(NULL), "current"); + icon = gtk_radio_button_new(NULL); + gtk_stack_add_named(GTK_STACK(icon_stack), icon, + "current"); + gtk_widget_set_can_focus(icon, FALSE); gtk_stack_add_named(GTK_STACK(icon_stack), gtk_image_new_from_icon_name("go-previous", GTK_ICON_SIZE_BUTTON), "back"); @@ -91,8 +94,6 @@ back_forward_list_item_new(WebKitBackForwardListItem *list_item, gtk_radio_button_new(NULL), "current"); break; } - gtk_widget_set_can_focus(gtk_stack_get_visible_child( - GTK_STACK(icon_stack)), FALSE); box = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0); gtk_box_pack_start(GTK_BOX(box), icon_stack, FALSE, FALSE, 0); |