[vte/vte-0-50-ntfy-scroll: 5/5] Test the scroll-speed property



commit 17719b119d86e82083b42a265f6896bc68c30c48
Author: Debarshi Ray <debarshir gnome org>
Date:   Fri May 13 17:54:57 2016 +0200

    Test the scroll-speed property
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1103380

 bindings/vala/app.vala |    4 ++++
 src/vteapp.c           |    7 +++++++
 2 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/bindings/vala/app.vala b/bindings/vala/app.vala
index 4c5d9a2..3b73106 100644
--- a/bindings/vala/app.vala
+++ b/bindings/vala/app.vala
@@ -335,6 +335,7 @@ class Window : Gtk.ApplicationWindow
     terminal.set_rewrap_on_resize(!App.Options.no_rewrap);
     terminal.set_scroll_on_output(false);
     terminal.set_scroll_on_keystroke(true);
+    terminal.set_scroll_speed(App.Options.scroll_speed);
     terminal.set_scrollback_lines(App.Options.scrollback_lines);
 
     /* Style */
@@ -856,6 +857,7 @@ class App : Gtk.Application
     public static bool object_notifications = false;
     public static string? output_filename = null;
     public static bool reverse = false;
+    public static uint scroll_speed = 0;
     public static int scrollback_lines = 512;
     public static int transparency_percent = 0;
     public static bool version = false;
@@ -1049,6 +1051,8 @@ class App : Gtk.Application
         "Save terminal contents to file at exit", null },
       { "reverse", 0, 0, OptionArg.NONE, ref reverse,
         "Reverse foreground/background colors", null },
+      { "scroll-speed", 0, 0, OptionArg.INT, ref scroll_speed,
+        "Specify the scroll speed", null },
       { "scrollback-lines", 'n', 0, OptionArg.INT, ref scrollback_lines,
         "Specify the number of scrollback-lines", null },
       { "transparent", 'T', 0, OptionArg.INT, ref transparency_percent,
diff --git a/src/vteapp.c b/src/vteapp.c
index be3bab8..2a0a573 100644
--- a/src/vteapp.c
+++ b/src/vteapp.c
@@ -641,6 +641,7 @@ main(int argc, char **argv)
                 hyperlink = TRUE;
        char *geometry = NULL;
        gint lines = -1;
+       gint scroll_speed = 0;
        const char *message = "Launching interactive shell...\r\n";
        const char *font = NULL;
        const char *command = NULL;
@@ -750,6 +751,11 @@ main(int argc, char **argv)
                        "Live on after the window closes", NULL
                },
                {
+                       "scroll-speed", 0, 0,
+                       G_OPTION_ARG_INT, &scroll_speed,
+                       "Specify the scroll speed", NULL
+               },
+               {
                        "scrollback-lines", 'n', 0,
                        G_OPTION_ARG_INT, &lines,
                        "Specify the number of scrollback-lines", NULL
@@ -1017,6 +1023,7 @@ main(int argc, char **argv)
        vte_terminal_set_cursor_blink_mode(terminal, cursor_blink_mode);
        vte_terminal_set_scroll_on_output(terminal, FALSE);
        vte_terminal_set_scroll_on_keystroke(terminal, TRUE);
+       vte_terminal_set_scroll_speed(terminal, (guint) scroll_speed);
        vte_terminal_set_scrollback_lines(terminal, lines);
        vte_terminal_set_mouse_autohide(terminal, TRUE);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]