summaryrefslogtreecommitdiff
path: root/src/caja-pathbar.c
diff options
context:
space:
mode:
authormonsta <[email protected]>2017-08-24 15:24:21 +0300
committermonsta <[email protected]>2017-08-25 16:00:34 +0300
commita8585cf9ad1b57c7fb3e8601f31242f6790e052a (patch)
tree7b20f8cb5d42733837d6ea7d7943d8b287c3dc2b /src/caja-pathbar.c
parent8a24703409f3985b37d063c816440844ce41321c (diff)
downloadcaja-a8585cf9ad1b57c7fb3e8601f31242f6790e052a.tar.bz2
caja-a8585cf9ad1b57c7fb3e8601f31242f6790e052a.tar.xz
pathbar: enable mousewheel scrolling like it was with GTK+2
fixes https://github.com/mate-desktop/caja/issues/779 ported from: https://git.gnome.org/browse/nautilus/commit/?id=04116ab2876412445c788091be07d7f7321a4a94
Diffstat (limited to 'src/caja-pathbar.c')
-rw-r--r--src/caja-pathbar.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/caja-pathbar.c b/src/caja-pathbar.c
index 444a0b1e..d9b776ad 100644
--- a/src/caja-pathbar.c
+++ b/src/caja-pathbar.c
@@ -155,6 +155,7 @@ get_slider_button (CajaPathBar *path_bar,
#else
gtk_button_set_focus_on_click (GTK_BUTTON (button), FALSE);
#endif
+ gtk_widget_add_events (button, GDK_SCROLL_MASK);
gtk_container_add (GTK_CONTAINER (button),
gtk_image_new_from_icon_name (arrow_type, GTK_ICON_SIZE_MENU));
gtk_container_add (GTK_CONTAINER (path_bar), button);
@@ -918,6 +919,9 @@ caja_path_bar_scroll (GtkWidget *widget,
case GDK_SCROLL_UP:
caja_path_bar_scroll_up (path_bar);
return TRUE;
+
+ case GDK_SCROLL_SMOOTH:
+ break;
}
return FALSE;
@@ -1842,6 +1846,7 @@ make_directory_button (CajaPathBar *path_bar,
#else
gtk_button_set_focus_on_click (GTK_BUTTON (button_data->button), FALSE);
#endif
+ gtk_widget_add_events (button_data->button, GDK_SCROLL_MASK);
/* TODO update button type when xdg directories change */
button_data->drag_info.target_location = g_object_ref (path);