summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPhilipp Stephani <phst@google.com>2017-08-27 13:11:55 +0200
committerPhilipp Stephani <phst@google.com>2017-08-27 14:09:36 +0200
commitd309ce429912a39c4f19877f23cf36116b679818 (patch)
treed93df3e1df7842a0e43f2c11282d00dd98a53f66 /src
parent2132629573472c74d0d42fc073fe62903c335f8b (diff)
downloademacs-d309ce429912a39c4f19877f23cf36116b679818.tar.gz
Remove use of a deprecated GTK+ function in new versions
* src/gtkutil.c (xg_make_tool_item): Use gtk_widget_set_focus_on_click if available
Diffstat (limited to 'src')
-rw-r--r--src/gtkutil.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gtkutil.c b/src/gtkutil.c
index 2675cd51586..7a110daef1e 100644
--- a/src/gtkutil.c
+++ b/src/gtkutil.c
@@ -4617,7 +4617,11 @@ xg_make_tool_item (struct frame *f,
if (wimage && text_image)
gtk_box_pack_start (GTK_BOX (vb), wimage, TRUE, TRUE, 0);
+#if GTK_CHECK_VERSION (3, 20, 0)
+ gtk_widget_set_focus_on_click (wb, FALSE);
+#else
gtk_button_set_focus_on_click (GTK_BUTTON (wb), FALSE);
+#endif
gtk_button_set_relief (GTK_BUTTON (wb), GTK_RELIEF_NONE);
gtk_container_add (GTK_CONTAINER (wb), vb);
gtk_container_add (GTK_CONTAINER (weventbox), wb);