From 2e4b1a023187e298c44f79cae25ef325b0c3635b Mon Sep 17 00:00:00 2001 From: Laurent Napias Date: Sun, 30 Jun 2019 18:36:43 +0200 Subject: Add scroll tabs with mouse wheel - File's properties and caja's preferences windows --- src/caja-file-management-properties.c | 7 +++++++ src/file-manager/fm-properties-window.c | 8 ++++++++ 2 files changed, 15 insertions(+) (limited to 'src') diff --git a/src/caja-file-management-properties.c b/src/caja-file-management-properties.c index b5db2e30..a52abeac 100644 --- a/src/caja-file-management-properties.c +++ b/src/caja-file-management-properties.c @@ -31,6 +31,7 @@ #include #include "../eel/eel-glib-extensions.h" +#include "../eel/eel-gtk-extensions.h" #include "../libcaja-private/caja-column-chooser.h" #include "../libcaja-private/caja-column-utilities.h" @@ -1272,6 +1273,12 @@ caja_file_management_properties_dialog_setup (GtkBuilder *builder, GtkWindow *wi gtk_window_set_screen (GTK_WINDOW (dialog), gtk_window_get_screen(window)); } + GtkWidget *notebook = GTK_WIDGET (gtk_builder_get_object (builder, "notebook1")); + gtk_widget_add_events (GTK_WIDGET (notebook), GDK_SCROLL_MASK); + g_signal_connect (GTK_WIDGET (notebook), "scroll-event", + G_CALLBACK (eel_dialog_page_scroll_event_callback), + window); + gtk_widget_show (dialog); } diff --git a/src/file-manager/fm-properties-window.c b/src/file-manager/fm-properties-window.c index fced94da..c1870e57 100644 --- a/src/file-manager/fm-properties-window.c +++ b/src/file-manager/fm-properties-window.c @@ -5160,6 +5160,14 @@ create_properties_window (StartupData *startup_data) /* Create the notebook tabs. */ window->details->notebook = GTK_NOTEBOOK (gtk_notebook_new ()); + + gtk_notebook_set_scrollable (GTK_NOTEBOOK (window->details->notebook), TRUE); + gtk_widget_add_events (GTK_WIDGET (window->details->notebook), GDK_SCROLL_MASK); + g_signal_connect (window->details->notebook, + "scroll-event", + G_CALLBACK (eel_dialog_page_scroll_event_callback), + window); + gtk_widget_show (GTK_WIDGET (window->details->notebook)); gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (window))), GTK_WIDGET (window->details->notebook), -- cgit v1.2.1