Compare commits

...

10 Commits

Author SHA1 Message Date
openeuler-ci-bot
7bc66cae50 !7 Upgrade to 0.62.3
From: @weijin-deng
Reviewed-by: @dwl301
Signed-off-by: @dwl301
2021-05-26 16:41:43 +08:00
weijin-deng
9356e5f040 Upgrade to 0.62.3
Update Version, uncorrect date
2021-05-26 15:27:38 +08:00
openeuler-ci-bot
b286ddcaa1 !6 Updata to 0.62.1
From: @hht8
Reviewed-by: @small_leek
Signed-off-by: @small_leek
2020-12-25 15:38:16 +08:00
hht8
210bf6e7f5 Updata to 0.62.1 2020-12-23 11:37:19 +08:00
openeuler-ci-bot
e37cdeea34 !5 submit yaml file into this repository
From: @jl_git
Reviewed-by: @small_leek
Signed-off-by: @small_leek
2020-10-13 18:41:01 +08:00
贾磊
30e5d3d8ee update vte291.yaml. 2020-10-13 18:05:38 +08:00
贾磊
079195e29c update vte291.yaml. 2020-10-10 16:14:41 +08:00
贾磊
1b4eedb605 add vte291.yaml. 2020-10-10 16:08:52 +08:00
openeuler-ci-bot
6442c40a99 !2 Make binding tests compile without warning
Merge pull request !2 from wang_yue111/master
2020-06-19 14:10:28 +08:00
wang_yue111
b1d38be5de Make binding tests compile without warning 2020-06-19 11:57:43 +08:00
8 changed files with 1592 additions and 634 deletions

Binary file not shown.

BIN
vte-0.62.3.tar.xz Normal file

Binary file not shown.

View File

@ -1,26 +0,0 @@
From 4e7fe2f2fc02cc008f67d80ef3cd9b41a8f17129 Mon Sep 17 00:00:00 2001
From: Egmont Koblinger <egmont@gmail.com>
Date: Thu, 27 Sep 2018 21:25:50 +0200
Subject: [PATCH] widget: Add missing exception specification
This fixes compiling with clang.
---
src/widget.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/widget.cc b/src/widget.cc
index 0f2e509e6c0c..deaf789de6e2 100644
--- a/src/widget.cc
+++ b/src/widget.cc
@@ -327,7 +327,7 @@ Widget::size_allocate(GtkAllocation* allocation) noexcept
}
void
-Widget::unmap()
+Widget::unmap() noexcept
{
if (m_event_window)
gdk_window_hide(m_event_window);
--
2.14.4

File diff suppressed because it is too large Load Diff

View File

@ -1,590 +0,0 @@
From 040c43f2edb0f3179febbed36f37bc1fbc77dbcf Mon Sep 17 00:00:00 2001
From: Debarshi Ray <debarshir@gnome.org>
Date: Wed, 7 Jan 2015 16:01:00 +0100
Subject: [PATCH 1/5] Add sequences and signals for desktop notification
Add sequences
OSC 777 ; notify ; SUMMARY ; BODY BEL
OSC 777 ; notify ; SUMMARY BEL
OSC 777 ; notify ; SUMMARY ; BODY ST
OSC 777 ; notify ; SUMMARY ST
that let terminal applications send a notification to the desktop
environment.
Based on Enlightenment's Terminology:
https://phab.enlightenment.org/T1765
https://bugzilla.gnome.org/show_bug.cgi?id=711059
---
src/marshal.list | 1 +
src/vte.cc | 9 +++++++++
src/vte/vteterminal.h | 4 +++-
src/vtegtk.cc | 21 +++++++++++++++++++++
src/vtegtk.hh | 1 +
src/vteinternal.hh | 8 ++++++++
src/vteseq.cc | 33 ++++++++++++++++++++++++++++++++-
7 files changed, 75 insertions(+), 2 deletions(-)
diff --git a/src/marshal.list b/src/marshal.list
index 1e4d0c1b6476..3385b4759713 100644
--- a/src/marshal.list
+++ b/src/marshal.list
@@ -1,5 +1,6 @@
VOID:INT,INT
VOID:OBJECT,OBJECT
VOID:STRING,BOXED
+VOID:STRING,STRING
VOID:STRING,UINT
VOID:UINT,UINT
diff --git a/src/vte.cc b/src/vte.cc
index 6c9f70f9fba1..3e6eeb92cd36 100644
--- a/src/vte.cc
+++ b/src/vte.cc
@@ -10581,6 +10581,15 @@ Terminal::emit_pending_signals()
emit_adjustment_changed();
+ if (m_notification_received) {
+ _vte_debug_print (VTE_DEBUG_SIGNALS,
+ "Emitting `notification-received'.\n");
+ g_signal_emit(object, signals[SIGNAL_NOTIFICATION_RECEIVED], 0,
+ m_notification_summary.c_str(),
+ m_notification_body.c_str());
+ m_notification_received = FALSE;
+ }
+
if (m_window_title_changed) {
if (m_window_title != m_window_title_pending) {
m_window_title.swap(m_window_title_pending);
diff --git a/src/vte/vteterminal.h b/src/vte/vteterminal.h
index 89539cc476b6..861a8c7402db 100644
--- a/src/vte/vteterminal.h
+++ b/src/vte/vteterminal.h
@@ -104,8 +104,10 @@ struct _VteTerminalClass {
void (*bell)(VteTerminal* terminal);
+ void (*notification_received)(VteTerminal* terminal, const gchar *summary, const gchar *body);
+
/* Padding for future expansion. */
- gpointer padding[16];
+ gpointer padding[15];
VteTerminalClassPrivate *priv;
};
diff --git a/src/vtegtk.cc b/src/vtegtk.cc
index 89e3d7a89f3a..0c9773535d7a 100644
--- a/src/vtegtk.cc
+++ b/src/vtegtk.cc
@@ -729,6 +729,7 @@ vte_terminal_class_init(VteTerminalClass *klass)
klass->child_exited = NULL;
klass->encoding_changed = NULL;
klass->char_size_changed = NULL;
+ klass->notification_received = NULL;
klass->window_title_changed = NULL;
klass->icon_title_changed = NULL;
klass->selection_changed = NULL;
@@ -804,6 +805,26 @@ vte_terminal_class_init(VteTerminalClass *klass)
G_TYPE_NONE,
1, G_TYPE_INT);
+ /**
+ * VteTerminal::notification-received:
+ * @vteterminal: the object which received the signal
+ * @summary: The summary
+ * @body: (allow-none): Extra optional text
+ *
+ * Emitted when a process running in the terminal wants to
+ * send a notification to the desktop environment.
+ */
+ signals[SIGNAL_NOTIFICATION_RECEIVED] =
+ g_signal_new(I_("notification-received"),
+ G_OBJECT_CLASS_TYPE(klass),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET(VteTerminalClass, notification_received),
+ NULL,
+ NULL,
+ _vte_marshal_VOID__STRING_STRING,
+ G_TYPE_NONE,
+ 2, G_TYPE_STRING, G_TYPE_STRING);
+
/**
* VteTerminal::window-title-changed:
* @vteterminal: the object which received the signal
diff --git a/src/vtegtk.hh b/src/vtegtk.hh
index c49754ef38ee..126d29326f11 100644
--- a/src/vtegtk.hh
+++ b/src/vtegtk.hh
@@ -56,6 +56,7 @@ enum {
SIGNAL_TEXT_INSERTED,
SIGNAL_TEXT_MODIFIED,
SIGNAL_TEXT_SCROLLED,
+ SIGNAL_NOTIFICATION_RECEIVED,
SIGNAL_WINDOW_TITLE_CHANGED,
LAST_SIGNAL
};
diff --git a/src/vteinternal.hh b/src/vteinternal.hh
index 1652ca5fe6ed..c5b24ffe2ca9 100644
--- a/src/vteinternal.hh
+++ b/src/vteinternal.hh
@@ -578,6 +578,11 @@ public:
gboolean m_cursor_moved_pending;
gboolean m_contents_changed_pending;
+ /* desktop notification */
+ gboolean m_notification_received;
+ std::string m_notification_summary;
+ std::string m_notification_body;
+
std::string m_window_title{};
std::string m_current_directory_uri{};
std::string m_current_file_uri{};
@@ -1323,6 +1328,9 @@ public:
int osc) noexcept;
/* OSC handlers */
+ void handle_urxvt_extension(vte::parser::Sequence const& seq,
+ vte::parser::StringTokeniser::const_iterator& token,
+ vte::parser::StringTokeniser::const_iterator const& endtoken) noexcept;
void set_color(vte::parser::Sequence const& seq,
vte::parser::StringTokeniser::const_iterator& token,
vte::parser::StringTokeniser::const_iterator const& endtoken,
diff --git a/src/vteseq.cc b/src/vteseq.cc
index eabcbbaa5eca..51b3a2c32c7f 100644
--- a/src/vteseq.cc
+++ b/src/vteseq.cc
@@ -1341,6 +1341,34 @@ Terminal::delete_lines(vte::grid::row_t param)
m_text_deleted_flag = TRUE;
}
+void
+Terminal::handle_urxvt_extension(vte::parser::Sequence const& seq,
+ vte::parser::StringTokeniser::const_iterator& token,
+ vte::parser::StringTokeniser::const_iterator const& endtoken) noexcept
+{
+ if (token == endtoken) {
+ return;
+ }
+
+ if (*token == "notify") {
+ ++token;
+
+ if (token == endtoken)
+ return;
+
+ m_notification_summary = *token;
+ m_notification_body.clear();
+ m_notification_received = TRUE;
+ ++token;
+
+ if (token == endtoken)
+ return;
+
+ m_notification_body = *token;
+ return;
+ }
+}
+
bool
Terminal::get_osc_color_index(int osc,
int value,
@@ -6352,6 +6380,10 @@ Terminal::OSC(vte::parser::Sequence const& seq)
reset_color(VTE_HIGHLIGHT_FG, VTE_COLOR_SOURCE_ESCAPE);
break;
+ case VTE_OSC_URXVT_EXTENSION:
+ handle_urxvt_extension(seq, it, cend);
+ break;
+
case VTE_OSC_XTERM_SET_ICON_TITLE:
case VTE_OSC_XTERM_SET_XPROPERTY:
case VTE_OSC_XTERM_SET_COLOR_MOUSE_CURSOR_FG:
@@ -6392,7 +6424,6 @@ Terminal::OSC(vte::parser::Sequence const& seq)
case VTE_OSC_URXVT_SET_FONT_BOLD_ITALIC:
case VTE_OSC_URXVT_VIEW_UP:
case VTE_OSC_URXVT_VIEW_DOWN:
- case VTE_OSC_URXVT_EXTENSION:
case VTE_OSC_YF_RQGWR:
default:
break;
--
2.14.4
From bd6936635d4055c3434fac71fe3af405df4c0ba8 Mon Sep 17 00:00:00 2001
From: Debarshi Ray <debarshir@gnome.org>
Date: Thu, 29 Jan 2015 13:09:17 +0100
Subject: [PATCH 2/5] vte.sh: Emit OSC 777 from PROMPT_COMMAND
For some reason, the three consecutive backslashes break the parsing.
As Christian Persch suggested, replacing the double quotes with
singles fixes it.
https://bugzilla.gnome.org/show_bug.cgi?id=711059
---
src/vte.sh | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/vte.sh b/src/vte.sh
index 6d1a8734c479..b75c6dac6f6e 100644
--- a/src/vte.sh
+++ b/src/vte.sh
@@ -50,9 +50,11 @@ __vte_osc7 () {
}
__vte_prompt_command() {
+ local command=$(HISTTIMEFORMAT= history 1 | sed 's/^ *[0-9]\+ *//')
+ command="${command//;/ }"
local pwd='~'
[ "$PWD" != "$HOME" ] && pwd=${PWD/#$HOME\//\~\/}
- printf "\033]0;%s@%s:%s\033\\%s" "${USER}" "${HOSTNAME%%.*}" "${pwd}" "$(__vte_osc7)"
+ printf '\033]777;notify;Command completed;%s\033\\\033]0;%s@%s:%s\033\\%s' "${command}" "${USER}" "${HOSTNAME%%.*}" "${pwd}" "$(__vte_osc7)"
}
case "$TERM" in
--
2.14.4
From 693355f62a7959ded9157493292742434ba066ed Mon Sep 17 00:00:00 2001
From: Debarshi Ray <debarshir@gnome.org>
Date: Thu, 22 Jan 2015 16:37:10 +0100
Subject: [PATCH 3/5] Test the notification-received signal
---
bindings/vala/app.vala | 7 +++++++
src/app/app.cc | 10 ++++++++++
2 files changed, 17 insertions(+)
diff --git a/bindings/vala/app.vala b/bindings/vala/app.vala
index 8663d63c5445..4c5d9a2b3bad 100644
--- a/bindings/vala/app.vala
+++ b/bindings/vala/app.vala
@@ -309,6 +309,8 @@ class Window : Gtk.ApplicationWindow
if (App.Options.object_notifications)
terminal.notify.connect(notify_cb);
+ terminal.notification_received.connect(notification_received_cb);
+
/* Settings */
if (App.Options.no_double_buffer)
terminal.set_double_buffered(false);
@@ -780,6 +782,11 @@ class Window : Gtk.ApplicationWindow
set_title(terminal.get_window_title());
}
+ private void notification_received_cb(Vte.Terminal terminal, string summary, string? body)
+ {
+ print ("[%s]: %s\n", summary, body);
+ }
+
} /* class Window */
class App : Gtk.Application
diff --git a/src/app/app.cc b/src/app/app.cc
index b155efa3f348..250d09d8b4c5 100644
--- a/src/app/app.cc
+++ b/src/app/app.cc
@@ -1628,6 +1628,14 @@ window_window_title_changed_cb(VteTerminal* terminal,
vte_terminal_get_window_title(window->terminal));
}
+static void
+notification_received_cb(VteTerminal *terminal,
+ const gchar *summary,
+ const gchar *body)
+{
+ g_print("[%s]: %s\n", summary, body);
+}
+
static void
window_lower_window_cb(VteTerminal* terminal,
VteappWindow* window)
@@ -1855,6 +1863,8 @@ vteapp_window_constructed(GObject *object)
if (options.object_notifications)
g_signal_connect(window->terminal, "notify", G_CALLBACK(window_notify_cb), window);
+ g_signal_connect(window->terminal, "notification-received", G_CALLBACK(notification_received_cb), NULL);
+
/* Settings */
if (options.no_double_buffer)
gtk_widget_set_double_buffered(GTK_WIDGET(window->terminal), false);
--
2.14.4
From 24c78bb06d9f85393fa4e715f0d01b40496c71a6 Mon Sep 17 00:00:00 2001
From: Debarshi Ray <debarshir@gnome.org>
Date: Fri, 13 May 2016 17:53:54 +0200
Subject: [PATCH 4/5] Add a property to configure the scroll speed
By default, it is set to zero which gives the current behaviour of
moving the buffer by a function of the number of visible rows.
https://bugzilla.redhat.com/show_bug.cgi?id=1103380
---
doc/reference/vte-sections.txt | 1 +
src/vte.cc | 19 +++++++++++++++++-
src/vte/vteterminal.h | 4 ++++
src/vtegtk.cc | 45 ++++++++++++++++++++++++++++++++++++++++++
src/vtegtk.hh | 1 +
src/vteinternal.hh | 2 ++
6 files changed, 71 insertions(+), 1 deletion(-)
diff --git a/doc/reference/vte-sections.txt b/doc/reference/vte-sections.txt
index b46e30620fe1..bda65e4c788e 100644
--- a/doc/reference/vte-sections.txt
+++ b/doc/reference/vte-sections.txt
@@ -55,6 +55,7 @@ vte_terminal_get_cursor_blink_mode
vte_terminal_set_cursor_blink_mode
vte_terminal_get_text_blink_mode
vte_terminal_set_text_blink_mode
+vte_terminal_set_scroll_speed
vte_terminal_set_scrollback_lines
vte_terminal_get_scrollback_lines
vte_terminal_set_font
diff --git a/src/vte.cc b/src/vte.cc
index 3e6eeb92cd36..83ab8f10ca1b 100644
--- a/src/vte.cc
+++ b/src/vte.cc
@@ -9816,6 +9816,7 @@ void
Terminal::widget_scroll(GdkEventScroll *event)
{
gdouble delta_x, delta_y;
+ gdouble scroll_speed;
gdouble v;
gint cnt, i;
int button;
@@ -9869,7 +9870,13 @@ Terminal::widget_scroll(GdkEventScroll *event)
return;
}
- v = MAX (1., ceil (gtk_adjustment_get_page_increment (m_vadjustment) / 10.));
+ if (m_scroll_speed == 0) {
+ scroll_speed = ceil (gtk_adjustment_get_page_increment (m_vadjustment) / 10.);
+ } else {
+ scroll_speed = m_scroll_speed;
+ }
+
+ v = MAX (1., scroll_speed);
_vte_debug_print(VTE_DEBUG_EVENTS,
"Scroll speed is %d lines per non-smooth scroll unit\n",
(int) v);
@@ -10130,6 +10137,16 @@ Terminal::decscusr_cursor_shape()
}
}
+bool
+Terminal::set_scroll_speed(unsigned int scroll_speed)
+{
+ if (scroll_speed == m_scroll_speed)
+ return false;
+
+ m_scroll_speed = scroll_speed;
+ return true;
+}
+
bool
Terminal::set_scrollback_lines(long lines)
{
diff --git a/src/vte/vteterminal.h b/src/vte/vteterminal.h
index 861a8c7402db..8e6a5d249d7a 100644
--- a/src/vte/vteterminal.h
+++ b/src/vte/vteterminal.h
@@ -296,6 +296,10 @@ void vte_terminal_set_cursor_shape(VteTerminal *terminal,
_VTE_PUBLIC
VteCursorShape vte_terminal_get_cursor_shape(VteTerminal *terminal) _VTE_GNUC_NONNULL(1);
+_VTE_PUBLIC
+void vte_terminal_set_scroll_speed(VteTerminal *terminal,
+ guint scroll_speed) _VTE_GNUC_NONNULL(1);
+
/* Set the number of scrollback lines, above or at an internal minimum. */
_VTE_PUBLIC
void vte_terminal_set_scrollback_lines(VteTerminal *terminal,
diff --git a/src/vtegtk.cc b/src/vtegtk.cc
index 0c9773535d7a..d4fe1b7edc12 100644
--- a/src/vtegtk.cc
+++ b/src/vtegtk.cc
@@ -517,6 +517,9 @@ vte_terminal_get_property (GObject *object,
case PROP_REWRAP_ON_RESIZE:
g_value_set_boolean (value, vte_terminal_get_rewrap_on_resize (terminal));
break;
+ case PROP_SCROLL_SPEED:
+ g_value_set_uint (value, impl->m_scroll_speed);
+ break;
case PROP_SCROLLBACK_LINES:
g_value_set_uint (value, vte_terminal_get_scrollback_lines(terminal));
break;
@@ -618,6 +621,9 @@ vte_terminal_set_property (GObject *object,
case PROP_REWRAP_ON_RESIZE:
vte_terminal_set_rewrap_on_resize (terminal, g_value_get_boolean (value));
break;
+ case PROP_SCROLL_SPEED:
+ vte_terminal_set_scroll_speed (terminal, g_value_get_uint (value));
+ break;
case PROP_SCROLLBACK_LINES:
vte_terminal_set_scrollback_lines (terminal, g_value_get_uint (value));
break;
@@ -1564,6 +1570,21 @@ vte_terminal_class_init(VteTerminalClass *klass)
TRUE,
(GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | G_PARAM_EXPLICIT_NOTIFY));
+ /**
+ * VteTerminal:scroll-speed:
+ *
+ * The number of lines by which the buffer is moved when
+ * scrolling with a mouse wheel on top of the terminal
+ * Setting it to zero will cause the buffer to be moved by an
+ * amount depending on the number of visible rows the widget
+ * can display.
+ */
+ pspecs[PROP_SCROLL_SPEED] =
+ g_param_spec_uint ("scroll-speed", NULL, NULL,
+ 0, G_MAXUINT,
+ 0,
+ (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | G_PARAM_EXPLICIT_NOTIFY));
+
/**
* VteTerminal:scrollback-lines:
*
@@ -4122,6 +4143,30 @@ vte_terminal_get_row_count(VteTerminal *terminal)
return IMPL(terminal)->m_row_count;
}
+/**
+ * vte_terminal_set_scroll_speed:
+ * @terminal: a #VteTerminal
+ * @scroll_speed: move the buffer by this number of lines while scrolling
+ *
+ * Sets the number of lines by which the buffer is moved when
+ * scrolling with a mouse wheel. Setting it to zero will cause the
+ * buffer to be moved by an amount depending on the number of visible
+ * rows the widget can display.
+ */
+void
+vte_terminal_set_scroll_speed(VteTerminal *terminal, guint scroll_speed)
+{
+ g_return_if_fail(VTE_IS_TERMINAL(terminal));
+
+ GObject *object = G_OBJECT(terminal);
+ g_object_freeze_notify(object);
+
+ if (IMPL(terminal)->set_scroll_speed(scroll_speed))
+ g_object_notify_by_pspec(object, pspecs[PROP_SCROLL_SPEED]);
+
+ g_object_thaw_notify(object);
+}
+
/**
* vte_terminal_set_scrollback_lines:
* @terminal: a #VteTerminal
diff --git a/src/vtegtk.hh b/src/vtegtk.hh
index 126d29326f11..b2c9edfa8246 100644
--- a/src/vtegtk.hh
+++ b/src/vtegtk.hh
@@ -86,6 +86,7 @@ enum {
PROP_MOUSE_POINTER_AUTOHIDE,
PROP_PTY,
PROP_REWRAP_ON_RESIZE,
+ PROP_SCROLL_SPEED,
PROP_SCROLLBACK_LINES,
PROP_SCROLL_ON_KEYSTROKE,
PROP_SCROLL_ON_OUTPUT,
diff --git a/src/vteinternal.hh b/src/vteinternal.hh
index c5b24ffe2ca9..620bcf200af6 100644
--- a/src/vteinternal.hh
+++ b/src/vteinternal.hh
@@ -457,6 +457,7 @@ public:
/* Scrolling options. */
gboolean m_scroll_on_output;
gboolean m_scroll_on_keystroke;
+ guint m_scroll_speed;
vte::grid::row_t m_scrollback_lines;
/* Restricted scrolling */
@@ -1201,6 +1202,7 @@ public:
bool set_mouse_autohide(bool autohide);
bool set_pty(VtePty *pty);
bool set_rewrap_on_resize(bool rewrap);
+ bool set_scroll_speed(unsigned int scroll_speed);
bool set_scrollback_lines(long lines);
bool set_scroll_on_keystroke(bool scroll);
bool set_scroll_on_output(bool scroll);
--
2.14.4
From 82cbdbbaa55696b422b409b9174d6df8cdb8ee4a Mon Sep 17 00:00:00 2001
From: Debarshi Ray <debarshir@gnome.org>
Date: Fri, 13 May 2016 17:54:57 +0200
Subject: [PATCH 5/5] Test the scroll-speed property
https://bugzilla.redhat.com/show_bug.cgi?id=1103380
---
bindings/vala/app.vala | 4 ++++
src/app/app.cc | 4 ++++
2 files changed, 8 insertions(+)
diff --git a/bindings/vala/app.vala b/bindings/vala/app.vala
index 4c5d9a2b3bad..3b7310679239 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/app/app.cc b/src/app/app.cc
index 250d09d8b4c5..82484d2ca586 100644
--- a/src/app/app.cc
+++ b/src/app/app.cc
@@ -93,6 +93,7 @@ public:
int verbosity{0};
double cell_height_scale{1.0};
double cell_width_scale{1.0};
+ unsigned int scroll_speed{0};
VteCursorBlinkMode cursor_blink_mode{VTE_CURSOR_BLINK_SYSTEM};
VteCursorShape cursor_shape{VTE_CURSOR_SHAPE_BLOCK};
VteTextBlinkMode text_blink_mode{VTE_TEXT_BLINK_ALWAYS};
@@ -405,6 +406,8 @@ public:
"Save terminal contents to file at exit", nullptr },
{ "reverse", 0, 0, G_OPTION_ARG_NONE, &reverse,
"Reverse foreground/background colors", nullptr },
+ { "scroll-speed", 0, 0, G_OPTION_ARG_INT, &scroll_speed,
+ "Specify the scroll speed", nullptr },
{ "scrollback-lines", 'n', 0, G_OPTION_ARG_INT, &scrollback_lines,
"Specify the number of scrollback-lines (-1 for infinite)", nullptr },
{ "transparent", 'T', 0, G_OPTION_ARG_INT, &transparency_percent,
@@ -1893,6 +1896,7 @@ vteapp_window_constructed(GObject *object)
vte_terminal_set_rewrap_on_resize(window->terminal, !options.no_rewrap);
vte_terminal_set_scroll_on_output(window->terminal, false);
vte_terminal_set_scroll_on_keystroke(window->terminal, true);
+ vte_terminal_set_scroll_speed(window->terminal, options.scroll_speed);
vte_terminal_set_scrollback_lines(window->terminal, options.scrollback_lines);
vte_terminal_set_text_blink_mode(window->terminal, options.text_blink_mode);
--
2.14.4

View File

@ -0,0 +1,257 @@
From b1b365cf8162479adc10db2ffcf40e4844bf739d Mon Sep 17 00:00:00 2001
Date: Thu, 11 Jun 2020 11:40:16 +0800
---
bindings/vala/app.vala | 96 +++++++++++++++++++++---------------------
1 file changed, 48 insertions(+), 48 deletions(-)
diff --git a/bindings/vala/app.vala b/bindings/vala/app.vala
index 3b73106..b6c3b65 100644
--- a/bindings/vala/app.vala
+++ b/bindings/vala/app.vala
@@ -109,7 +109,7 @@ class SearchPopover : Gtk.Popover
if (search_text.length != 0) {
try {
- if (!App.Options.no_pcre) {
+ if (!Options.no_pcre) {
uint32 flags;
flags = 0x40080400u /* PCRE2_UTF | PCRE2_NO_UTF_CHECK | PCRE2_MULTILINE */;
@@ -148,7 +148,7 @@ class SearchPopover : Gtk.Popover
search_entry.set_tooltip_text(null);
}
- if (!App.Options.no_pcre) {
+ if (!Options.no_pcre) {
has_regex = regex != null;
terminal.search_set_regex(regex, 0);
} else {
@@ -210,7 +210,7 @@ class Window : Gtk.ApplicationWindow
/* Create terminal and connect scrollbar */
terminal = new Vte.Terminal();
- var margin = App.Options.extra_margin;
+ var margin = Options.extra_margin;
if (margin > 0) {
terminal.margin_start =
terminal.margin_end =
@@ -274,8 +274,8 @@ class Window : Gtk.ApplicationWindow
title = "Terminal";
/* Set ARGB visual */
- if (App.Options.transparency_percent != 0) {
- if (!App.Options.no_argb_visual) {
+ if (Options.transparency_percent != 0) {
+ if (!Options.no_argb_visual) {
var screen = get_screen();
Gdk.Visual? visual = screen.get_rgba_visual();
if (visual != null)
@@ -306,57 +306,57 @@ class Window : Gtk.ApplicationWindow
terminal.restore_window.connect(restore_window_cb);
terminal.selection_changed.connect(selection_changed_cb);
terminal.window_title_changed.connect(window_title_changed_cb);
- if (App.Options.object_notifications)
+ if (Options.object_notifications)
terminal.notify.connect(notify_cb);
terminal.notification_received.connect(notification_received_cb);
/* Settings */
- if (App.Options.no_double_buffer)
+ if (Options.no_double_buffer)
terminal.set_double_buffered(false);
- if (App.Options.encoding != null) {
+ if (Options.encoding != null) {
try {
- terminal.set_encoding(App.Options.encoding);
+ terminal.set_encoding(Options.encoding);
} catch (Error e) {
printerr("Failed to set encoding: %s\n", e.message);
}
}
- if (App.Options.word_char_exceptions != null)
- terminal.set_word_char_exceptions(App.Options.word_char_exceptions);
+ if (Options.word_char_exceptions != null)
+ terminal.set_word_char_exceptions(Options.word_char_exceptions);
- terminal.set_allow_hyperlink(!App.Options.no_hyperlink);
- terminal.set_audible_bell(App.Options.audible);
- terminal.set_cjk_ambiguous_width(App.Options.get_cjk_ambiguous_width());
- terminal.set_cursor_blink_mode(App.Options.get_cursor_blink_mode());
- terminal.set_cursor_shape(App.Options.get_cursor_shape());
+ terminal.set_allow_hyperlink(!Options.no_hyperlink);
+ terminal.set_audible_bell(Options.audible);
+ terminal.set_cjk_ambiguous_width(Options.get_cjk_ambiguous_width());
+ terminal.set_cursor_blink_mode(Options.get_cursor_blink_mode());
+ terminal.set_cursor_shape(Options.get_cursor_shape());
terminal.set_mouse_autohide(true);
- terminal.set_rewrap_on_resize(!App.Options.no_rewrap);
+ terminal.set_rewrap_on_resize(!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);
+ terminal.set_scroll_speed(Options.scroll_speed);
+ terminal.set_scrollback_lines(Options.scrollback_lines);
/* Style */
- if (App.Options.font_string != null) {
- var desc = Pango.FontDescription.from_string(App.Options.font_string);
+ if (Options.font_string != null) {
+ var desc = Pango.FontDescription.from_string(Options.font_string);
terminal.set_font(desc);
}
- terminal.set_colors(App.Options.get_color_fg(),
- App.Options.get_color_bg(),
+ terminal.set_colors(Options.get_color_fg(),
+ Options.get_color_bg(),
null);
- terminal.set_color_cursor(App.Options.get_color_cursor_background());
- terminal.set_color_cursor_foreground(App.Options.get_color_cursor_foreground());
- terminal.set_color_highlight(App.Options.get_color_hl_bg());
- terminal.set_color_highlight_foreground(App.Options.get_color_hl_fg());
+ terminal.set_color_cursor(Options.get_color_cursor_background());
+ terminal.set_color_cursor_foreground(Options.get_color_cursor_foreground());
+ terminal.set_color_highlight(Options.get_color_hl_bg());
+ terminal.set_color_highlight_foreground(Options.get_color_hl_fg());
/* Dingus */
- if (!App.Options.no_builtin_dingus)
+ if (!Options.no_builtin_dingus)
add_dingus(builtin_dingus);
- if (App.Options.dingus != null)
- add_dingus(App.Options.dingus);
+ if (Options.dingus != null)
+ add_dingus(Options.dingus);
/* Done! */
terminal_box.pack_start(terminal);
@@ -378,7 +378,7 @@ class Window : Gtk.ApplicationWindow
try {
int tag;
- if (!App.Options.no_pcre) {
+ if (!Options.no_pcre) {
Vte.Regex regex;
regex = new Vte.Regex.for_match(dingus[i], dingus[i].length,
@@ -427,8 +427,8 @@ class Window : Gtk.ApplicationWindow
*/
terminal.realize();
- if (App.Options.geometry != null) {
- if (parse_geometry(App.Options.geometry)) {
+ if (Options.geometry != null) {
+ if (parse_geometry(Options.geometry)) {
/* After parse_geometry(), we can get the default size in
* width/height increments, i.e. in grid size.
*/
@@ -437,7 +437,7 @@ class Window : Gtk.ApplicationWindow
terminal.set_size(columns, rows);
resize_to_geometry(columns, rows);
} else
- printerr("Failed to parse geometry spec \"%s\"\n", App.Options.geometry);
+ printerr("Failed to parse geometry spec \"%s\"\n", Options.geometry);
} else {
/* In GTK+ 3.0, the default size of a window comes from its minimum
* size not its natural size, so we need to set the right default size
@@ -455,9 +455,9 @@ class Window : Gtk.ApplicationWindow
launch_idle_id = GLib.Idle.add(() => {
try {
terminal.spawn_sync(Vte.PtyFlags.DEFAULT,
- App.Options.working_directory,
+ Options.working_directory,
argv,
- App.Options.environment,
+ Options.environment,
GLib.SpawnFlags.SEARCH_PATH,
null, /* child setup */
out child_pid,
@@ -524,9 +524,9 @@ class Window : Gtk.ApplicationWindow
public void launch()
{
try {
- if (App.Options.command != null)
- launch_command(App.Options.command);
- else if (!App.Options.no_shell)
+ if (Options.command != null)
+ launch_command(Options.command);
+ else if (!Options.no_shell)
launch_shell();
else
fork();
@@ -557,7 +557,7 @@ class Window : Gtk.ApplicationWindow
private void update_geometry()
{
- if (App.Options.no_geometry_hints)
+ if (Options.no_geometry_hints)
return;
if (!terminal.get_realized())
return;
@@ -627,7 +627,7 @@ class Window : Gtk.ApplicationWindow
private bool show_context_menu(uint button, uint32 timestamp, Gdk.Event? event)
{
- if (App.Options.no_context_menu)
+ if (Options.no_context_menu)
return false;
var menu = new GLib.Menu();
@@ -665,18 +665,18 @@ class Window : Gtk.ApplicationWindow
{
printerr("Child exited with status %x\n", status);
- if (App.Options.output_filename != null) {
+ if (Options.output_filename != null) {
try {
- var file = GLib.File.new_for_commandline_arg(App.Options.output_filename);
+ var file = GLib.File.new_for_commandline_arg(Options.output_filename);
var stream = file.replace(null, false, GLib.FileCreateFlags.NONE, null);
terminal.write_contents_sync(stream, Vte.WriteFlags.DEFAULT, null);
} catch (Error e) {
printerr("Failed to write output to \"%s\": %s\n",
- App.Options.output_filename, e.message);
+ Options.output_filename, e.message);
}
}
- if (App.Options.keep)
+ if (Options.keep)
return;
destroy();
@@ -808,7 +808,7 @@ class App : Gtk.Application
{
base.startup();
- for (uint i = 0; i < App.Options.n_windows.clamp(0, 16); i++)
+ for (uint i = 0; i < Options.n_windows.clamp(0, 16); i++)
new Window(this);
}
@@ -824,8 +824,9 @@ class App : Gtk.Application
window.launch();
}
}
+} /* class App */
- public struct Options
+ namespace Options
{
public static bool audible = false;
public static string? command = null;
@@ -1105,6 +1106,5 @@ class App : Gtk.Application
var app = new App();
return app.run(null);
}
-} /* class App */
} /* namespace */
--
2.23.0

View File

@ -1,17 +1,22 @@
Name: vte291
Version: 0.54.1
Release: 4
Version: 0.62.3
Release: 1
Summary: Virtual terminal widget
License: LGPLv2+ and GPLv3+
URL: http://www.gnome.org/
Source0: http://download.gnome.org/sources/vte/0.54/vte-%{version}.tar.xz
Patch0000: vte291-Fix-the-build-with-GCC-8.1.1.patch
Patch0001: vte291-command-notify-scroll-speed.patch
Source0: http://download.gnome.org/sources/vte/0.62/vte-%{version}.tar.xz
Patch0000: vte291-cntnr-precmd-preexec-scroll.patch
BuildRequires: gcc-c++ gettext pkgconfig(gnutls) >= 3.2.7
BuildRequires: gobject-introspection-devel gperf pkgconfig(gtk+-3.0) >= 3.8.0
BuildRequires: pkgconfig(libpcre2-8) >= 10.21 intltool vala
Requires: gnutls >= 3.2.7 gtk3 >= 3.8.0 pcre2 >= 10.21 systemd
BuildRequires: gobject-introspection-devel gperf pkgconfig(gtk+-3.0) >= 3.24.22
BuildRequires: pkgconfig(libpcre2-8) >= 10.21 vala systemd gtk-doc meson
BuildRequires: pkgconfig(fribidi) >= 1.0.0 pkgconfig(gio-2.0) >= 2.52.0
BuildRequires: pkgconfig(glib-2.0) >= 2.52.0 pkgconfig(gobject-2.0) >= 2.52.0
BuildRequires: pkgconfig(icu-uc) >= 4.8 pkgconfig(libsystemd) >= 220
BuildRequires: pkgconfig(pango) >= 1.22.0
Requires: gnutls >= 3.2.7 gtk3 >= 3.24.22 pcre2 >= 10.21
Requires: fribidi >= 1.0.0 glib2 >= 2.52.0 pango >= 1.22.0
Requires: libicu >= 4.8 systemd
Conflicts: gnome-terminal < 3.20.1-2 vte3 < 0.36.1-3
Provides: vte-profile = %{version}-%{release}
Obsoletes: vte-profile < %{version}-%{release}
@ -30,27 +35,27 @@ The package contains libraries and header files for developing applications that
%prep
%autosetup -n vte-%{version} -p1
%if 0%{?flatpak}
# Install user units where systemd macros expect them
sed -i -e "/^vte_systemduserunitdir =/s|vte_prefix|'/usr'|" meson.build
%endif
%build
CFLAGS="%optflags -fPIE -DPIE -Wno-nonnull" \
CXXFLAGS="$CFLAGS" \
LDFLAGS="$LDFLAGS -Wl,-z,relro -Wl,-z,now -pie" \
%configure --disable-static --libexecdir=%{_libdir}/vte-2.91 --disable-gtk-doc \
--disable-silent-rules --enable-introspection
%make_build
%meson --buildtype=plain -Ddocs=true
%meson_build
%install
%make_install
%delete_la
%meson_install
%find_lang vte-2.91
%files -f vte-2.91.lang
%license COPYING.GPL3
%doc NEWS
%{_libdir}/libvte-*.so.0*
%{_libdir}/girepository-1.0/
%{_userunitdir}/vte-spawn-.scope.d
%{_libexecdir}/vte-urlencode-cwd
%{_sysconfdir}/profile.d/vte.sh
%{_sysconfdir}/profile.d/vte.csh
%files devel
%{_bindir}/vte-*
@ -62,5 +67,15 @@ LDFLAGS="$LDFLAGS -Wl,-z,relro -Wl,-z,now -pie" \
%{_datadir}/vala/
%changelog
* Mon May 24 2021 weijin deng <weijin.deng@turbolinux.com.cn> - 0.62.3-1
- Upgrade to 0.62.3
- Update Version, uncorrect date
* Tue Dec 22 2020 huanghaitao <huanghaitao8@huawei.com> - 0.62.1-1
- Updata to 0.62.1
* Fri Jun 19 2020 wangyue <wangyue92@huawei.com> - 0.54.1-5
- DESC:Make binding tests compile without warning
* Mon Oct 21 2019 Lijin Yang <yanglijin@huawei.com> - 0.54.1-4
- Package init

4
vte291.yaml Normal file
View File

@ -0,0 +1,4 @@
version_control: gnome
src_repo: vte
tag_prefix: NA
separator: "."