summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormonsta <[email protected]>2017-08-24 15:24:21 +0300
committerraveit65 <[email protected]>2017-08-26 11:34:16 +0200
commit9994201d979dbaa6543f280febf3e4023de6dc60 (patch)
treecd6085b1c18defd6d4c5048cd2f43f71876fb090
parent90ccf70a06beee19f55b1d36a4b4ae33000758d5 (diff)
downloadcaja-9994201d979dbaa6543f280febf3e4023de6dc60.tar.bz2
caja-9994201d979dbaa6543f280febf3e4023de6dc60.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
-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);