diff options
author | Laurent Napias <[email protected]> | 2019-06-26 22:51:52 +0200 |
---|---|---|
committer | raveit65 <[email protected]> | 2019-07-02 11:07:04 +0200 |
commit | b931a8f99fc07cf860819507e18546bb9583a2f1 (patch) | |
tree | 3e0dfaa5be7b0e9f63f34bc147df4a688493f3c6 /capplets/keyboard | |
parent | 566addef611bfab08379e29a16379e6a12642db7 (diff) | |
download | mate-control-center-b931a8f99fc07cf860819507e18546bb9583a2f1.tar.bz2 mate-control-center-b931a8f99fc07cf860819507e18546bb9583a2f1.tar.xz |
Add scroll tabs with mouse wheel in severals capplets
Diffstat (limited to 'capplets/keyboard')
-rw-r--r-- | capplets/keyboard/mate-keyboard-properties.c | 17 |
1 files changed, 9 insertions, 8 deletions
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); } |