[gnome-terminal/gsettings] window: Handle GDK_SCROLL_SMOOTH
- From: Christian Persch <chpe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-terminal/gsettings] window: Handle GDK_SCROLL_SMOOTH
- Date: Wed, 14 Mar 2012 20:52:56 +0000 (UTC)
commit b0233675e91ecb9f53d8c425445fa6e2d378d6c9
Author: Christian Persch <chpe gnome org>
Date: Wed Mar 14 21:51:43 2012 +0100
window: Handle GDK_SCROLL_SMOOTH
src/terminal-window.c | 22 +++++++++++++++++++++-
1 files changed, 21 insertions(+), 1 deletions(-)
---
diff --git a/src/terminal-window.c b/src/terminal-window.c
index b6aa5b8..2e8028d 100644
--- a/src/terminal-window.c
+++ b/src/terminal-window.c
@@ -2770,7 +2770,27 @@ notebook_scroll_event_cb (GtkWidget *widget,
case GDK_SCROLL_UP:
gtk_notebook_prev_page (notebook);
break;
- }
+#if GTK_CHECK_VERSION (3, 3, 17)
+ case GDK_SCROLL_SMOOTH:
+ switch (gtk_notebook_get_tab_pos (notebook)) {
+ case GTK_POS_LEFT:
+ case GTK_POS_RIGHT:
+ if (event->delta_x > 0)
+ gtk_notebook_next_page (notebook);
+ else if (event->delta_x < 0)
+ gtk_notebook_prev_page (notebook);
+ break;
+ case GTK_POS_TOP:
+ case GTK_POS_BOTTOM:
+ if (event->delta_y > 0)
+ gtk_notebook_next_page (notebook);
+ else if (event->delta_y < 0)
+ gtk_notebook_prev_page (notebook);
+ break;
+ }
+ break;
+#endif
+ }
return TRUE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]