summaryrefslogtreecommitdiff
path: root/src/eom-util.c
diff options
context:
space:
mode:
authortamplan <[email protected]>2020-05-24 12:58:45 +0200
committerraveit65 <[email protected]>2020-07-13 10:24:27 +0200
commitf27d0293d6ba096c8b9a2325bf482e1c9c281de7 (patch)
tree55519a1021d2d1cbf5180bb2c680937b640c25f6 /src/eom-util.c
parente6215d267425ec0db970aecf420077babfcc035d (diff)
downloadeom-f27d0293d6ba096c8b9a2325bf482e1c9c281de7.tar.bz2
eom-f27d0293d6ba096c8b9a2325bf482e1c9c281de7.tar.xz
Add tab scrolling support for dialog windows
Diffstat (limited to 'src/eom-util.c')
-rw-r--r--src/eom-util.c23
1 files changed, 20 insertions, 3 deletions
diff --git a/src/eom-util.c b/src/eom-util.c
index 9eccc73..69692d5 100644
--- a/src/eom-util.c
+++ b/src/eom-util.c
@@ -429,8 +429,8 @@ eom_util_show_file_in_filemanager (GFile *file, GtkWindow *toplevel)
}
gboolean
-eom_util_dialog_page_scroll_event_cb (GtkWidget *widget,
- GdkEventScroll *event)
+eom_notebook_page_scroll_event_cb (GtkWidget *widget,
+ GdkEventScroll *event)
{
GtkNotebook *notebook = GTK_NOTEBOOK (widget);
@@ -466,7 +466,24 @@ eom_util_dialog_page_scroll_event_cb (GtkWidget *widget,
gtk_notebook_prev_page (notebook);
break;
case GDK_SCROLL_SMOOTH:
- break;
+ switch (gtk_notebook_get_tab_pos (notebook))
+ {
+ case GTK_POS_LEFT:
+ case GTK_POS_RIGHT:
+ if (event->delta_y > 0)
+ gtk_notebook_next_page (notebook);
+ else if (event->delta_y < 0)
+ gtk_notebook_prev_page (notebook);
+ break;
+ case GTK_POS_TOP:
+ case GTK_POS_BOTTOM:
+ if (event->delta_x > 0)
+ gtk_notebook_next_page (notebook);
+ else if (event->delta_x < 0)
+ gtk_notebook_prev_page (notebook);
+ break;
+ }
+ break;
}
return TRUE;