summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorraveit65 <[email protected]>2016-05-31 23:43:52 +0200
committerraveit65 <[email protected]>2016-06-15 13:29:05 +0200
commita6267ed3da8b579247d3a786c91c3da3ed729c6b (patch)
treeb2b6811bf44451f3049c0d50760cd66efc3a19a2
parent0041a533fe63c8ccbe0881ab3fb9b3e9003d3ba6 (diff)
downloadcaja-a6267ed3da8b579247d3a786c91c3da3ed729c6b.tar.bz2
caja-a6267ed3da8b579247d3a786c91c3da3ed729c6b.tar.xz
GTK+-3.20: do not use deprecated gtk_button_set_focus_on_click
-rw-r--r--src/caja-notebook.c4
-rw-r--r--src/caja-pathbar.c8
-rw-r--r--src/caja-zoom-control.c12
3 files changed, 24 insertions, 0 deletions
diff --git a/src/caja-notebook.c b/src/caja-notebook.c
index c281b7d0..ec2ec714 100644
--- a/src/caja-notebook.c
+++ b/src/caja-notebook.c
@@ -411,7 +411,11 @@ build_tab_label (CajaNotebook *nb, CajaWindowSlot *slot)
gtk_button_set_relief (GTK_BUTTON (close_button),
GTK_RELIEF_NONE);
/* don't allow focus on the close button */
+#if GTK_CHECK_VERSION(3,20,0)
+ gtk_widget_set_focus_on_click (close_button, FALSE);
+#else
gtk_button_set_focus_on_click (GTK_BUTTON (close_button), FALSE);
+#endif
gtk_widget_set_name (close_button, "caja-tab-close-button");
diff --git a/src/caja-pathbar.c b/src/caja-pathbar.c
index 6891d813..1d2fac48 100644
--- a/src/caja-pathbar.c
+++ b/src/caja-pathbar.c
@@ -167,7 +167,11 @@ get_slider_button (CajaPathBar *path_bar,
#endif
button = gtk_button_new ();
+#if GTK_CHECK_VERSION(3,20,0)
+ gtk_widget_set_focus_on_click (button, FALSE);
+#else
gtk_button_set_focus_on_click (GTK_BUTTON (button), FALSE);
+#endif
gtk_container_add (GTK_CONTAINER (button), gtk_arrow_new (arrow_type, GTK_SHADOW_OUT));
gtk_container_add (GTK_CONTAINER (path_bar), button);
gtk_widget_show_all (button);
@@ -2017,7 +2021,11 @@ make_directory_button (CajaPathBar *path_bar,
setup_button_type (button_data, path_bar, path);
button_data->button = gtk_toggle_button_new ();
+#if GTK_CHECK_VERSION(3,20,0)
+ gtk_widget_set_focus_on_click (button_data->button, FALSE);
+#else
gtk_button_set_focus_on_click (GTK_BUTTON (button_data->button), FALSE);
+#endif
/* TODO update button type when xdg directories change */
button_data->drag_info.target_location = g_object_ref (path);
diff --git a/src/caja-zoom-control.c b/src/caja-zoom-control.c
index af604c9d..737a61b0 100644
--- a/src/caja-zoom-control.c
+++ b/src/caja-zoom-control.c
@@ -322,7 +322,11 @@ caja_zoom_control_init (CajaZoomControl *zoom_control)
image = gtk_image_new_from_icon_name ("zoom-out", GTK_ICON_SIZE_MENU);
zoom_control->details->zoom_out = gtk_button_new ();
+#if GTK_CHECK_VERSION(3,20,0)
+ gtk_widget_set_focus_on_click (zoom_control->details->zoom_out, FALSE);
+#else
gtk_button_set_focus_on_click (GTK_BUTTON (zoom_control->details->zoom_out), FALSE);
+#endif
gtk_button_set_relief (GTK_BUTTON (zoom_control->details->zoom_out),
GTK_RELIEF_NONE);
gtk_widget_set_tooltip_text (zoom_control->details->zoom_out,
@@ -338,7 +342,11 @@ caja_zoom_control_init (CajaZoomControl *zoom_control)
zoom_control->details->zoom_out, FALSE, FALSE, 0);
zoom_control->details->zoom_button = gtk_button_new ();
+#if GTK_CHECK_VERSION(3,20,0)
+ gtk_widget_set_focus_on_click (zoom_control->details->zoom_button, FALSE);
+#else
gtk_button_set_focus_on_click (GTK_BUTTON (zoom_control->details->zoom_button), FALSE);
+#endif
gtk_button_set_relief (GTK_BUTTON (zoom_control->details->zoom_button),
GTK_RELIEF_NONE);
gtk_widget_set_tooltip_text (zoom_control->details->zoom_button,
@@ -376,7 +384,11 @@ caja_zoom_control_init (CajaZoomControl *zoom_control)
image = gtk_image_new_from_icon_name ("zoom-in", GTK_ICON_SIZE_MENU);
zoom_control->details->zoom_in = gtk_button_new ();
+#if GTK_CHECK_VERSION(3,20,0)
+ gtk_widget_set_focus_on_click (zoom_control->details->zoom_in, FALSE);
+#else
gtk_button_set_focus_on_click (GTK_BUTTON (zoom_control->details->zoom_in), FALSE);
+#endif
gtk_button_set_relief (GTK_BUTTON (zoom_control->details->zoom_in),
GTK_RELIEF_NONE);
gtk_widget_set_tooltip_text (zoom_control->details->zoom_in,