From b931a8f99fc07cf860819507e18546bb9583a2f1 Mon Sep 17 00:00:00 2001 From: Laurent Napias Date: Wed, 26 Jun 2019 22:51:52 +0200 Subject: Add scroll tabs with mouse wheel in severals capplets --- capplets/keyboard/mate-keyboard-properties.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'capplets/keyboard') diff --git a/capplets/keyboard/mate-keyboard-properties.c b/capplets/keyboard/mate-keyboard-properties.c index b9bd4d45..bc02a3bc 100644 --- a/capplets/keyboard/mate-keyboard-properties.c +++ b/capplets/keyboard/mate-keyboard-properties.c @@ -242,17 +242,18 @@ main (int argc, char **argv) exit (EXIT_FAILURE); setup_dialog (dialog); + + GtkNotebook* nb = GTK_NOTEBOOK (WID ("keyboard_notebook")); + gtk_widget_add_events (GTK_WIDGET (nb), GDK_SCROLL_MASK); + g_signal_connect (GTK_WIDGET (nb), "scroll-event", + G_CALLBACK (capplet_dialog_page_scroll_event_cb), + GTK_WINDOW (WID ("keyboard_dialog"))); + if (switch_to_typing_break_page) { - gtk_notebook_set_current_page (GTK_NOTEBOOK - (WID - ("keyboard_notebook")), - 4); + gtk_notebook_set_current_page (nb, 4); } else if (switch_to_a11y_page) { - gtk_notebook_set_current_page (GTK_NOTEBOOK - (WID - ("keyboard_notebook")), - 2); + gtk_notebook_set_current_page (nb, 2); } -- cgit v1.2.1