From 0c3220c4697598badbf222b7b6209326ec863942 Mon Sep 17 00:00:00 2001 From: TingPing Date: Tue, 8 Oct 2013 18:16:10 -0400 Subject: Add preference to change tabs on scroll Also revert e52905f50c7ff5d123a58ba016dcbb9de2b13f4f --- src/fe-gtk/chanview-tabs.c | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) (limited to 'src/fe-gtk/chanview-tabs.c') diff --git a/src/fe-gtk/chanview-tabs.c b/src/fe-gtk/chanview-tabs.c index e2e421da..dd1d16b7 100644 --- a/src/fe-gtk/chanview-tabs.c +++ b/src/fe-gtk/chanview-tabs.c @@ -233,11 +233,21 @@ tab_scroll_right_down_clicked (GtkWidget *widget, chanview *cv) static gboolean tab_scroll_cb (GtkWidget *widget, GdkEventScroll *event, gpointer cv) { - /* mouse wheel scrolling */ - if (event->direction == GDK_SCROLL_UP) - tab_scroll_left_up_clicked (widget, cv); - else if (event->direction == GDK_SCROLL_DOWN) - tab_scroll_right_down_clicked (widget, cv); + if (prefs.hex_gui_tab_scrollchans) + { + if (event->direction == GDK_SCROLL_DOWN) + mg_switch_page (1, 1); + else if (event->direction == GDK_SCROLL_UP) + mg_switch_page (1, -1); + } + else + { + /* mouse wheel scrolling */ + if (event->direction == GDK_SCROLL_UP) + tab_scroll_left_up_clicked (widget, cv); + else if (event->direction == GDK_SCROLL_DOWN) + tab_scroll_right_down_clicked (widget, cv); + } return FALSE; } -- cgit 1.4.1