Add preference to change tabs on scroll

Also revert e52905f50c
This commit is contained in:
TingPing
2013-10-08 18:16:10 -04:00
parent e52905f50c
commit 0c3220c469
8 changed files with 29 additions and 22 deletions

View File

@@ -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;
}