[gnome-terminal] window: Handle GDK_SCROLL_SMOOTH
- From: Christian Persch <chpe src gnome org>
 
- To: commits-list gnome org
 
- Cc: 
 
- Subject: [gnome-terminal] window: Handle GDK_SCROLL_SMOOTH
 
- Date: Thu,  3 May 2012 19:04:45 +0000 (UTC)
 
commit 70965e71db7d1c2fac0237988344972b564c46b5
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]