This is an automated email from the git hooks/post-receive script.

f2404 pushed a commit to branch master
in repository apps/xfce4-terminal.

commit 3001ce916ba7c5f3bb71add3df76681357e7bc9b
Author: Igor <f2...@yandex.ru>
Date:   Thu Sep 22 12:09:33 2016 +0300

    Add mouse-wheel binding for zoom: Ctrl + scroll up/down
    
    Fixes https://bugzilla.xfce.org/show_bug.cgi?id=12869
---
 terminal/terminal-window.c | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/terminal/terminal-window.c b/terminal/terminal-window.c
index 2652653..6bda29a 100644
--- a/terminal/terminal-window.c
+++ b/terminal/terminal-window.c
@@ -78,6 +78,8 @@ static gboolean     terminal_window_state_event               
    (GtkWidget
                                                                    
GdkEventWindowState    *event);
 static void         terminal_window_style_set                     (GtkWidget   
           *widget,
                                                                    GtkStyle    
           *previous_style);
+static gboolean     terminal_window_scroll_event                  (GtkWidget   
           *widget,
+                                                                   
GdkEventScroll         *event);
 static gboolean     terminal_window_confirm_close                 
(TerminalWindow         *window);
 static void         terminal_window_size_push                     
(TerminalWindow         *window);
 static gboolean     terminal_window_size_pop                      (gpointer    
            data);
@@ -290,6 +292,7 @@ terminal_window_class_init (TerminalWindowClass *klass)
   gtkwidget_class->window_state_event = terminal_window_state_event;
   gtkwidget_class->delete_event = terminal_window_delete_event;
   gtkwidget_class->style_set = terminal_window_style_set;
+  gtkwidget_class->scroll_event = terminal_window_scroll_event;
 
   /**
    * TerminalWindow::new-window
@@ -532,6 +535,29 @@ terminal_window_style_set (GtkWidget *widget,
 
 
 static gboolean
+terminal_window_scroll_event (GtkWidget      *widget,
+                              GdkEventScroll *event)
+{
+    TerminalWindow *window = TERMINAL_WINDOW (widget);
+
+    if (event->state == GDK_CONTROL_MASK && event->direction == GDK_SCROLL_UP)
+      {
+        terminal_window_action_zoom_in (NULL, window);
+        return TRUE;
+      }
+
+    if (event->state == GDK_CONTROL_MASK && event->direction == 
GDK_SCROLL_DOWN)
+      {
+        terminal_window_action_zoom_out (NULL, window);
+        return TRUE;
+      }
+
+    return FALSE;
+}
+
+
+
+static gboolean
 terminal_window_confirm_close (TerminalWindow *window)
 {
   GtkWidget *dialog;

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.
_______________________________________________
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits

Reply via email to