Update to 0.43.1

This commit is contained in:
Debarshi Ray 2016-01-29 16:52:22 +01:00
parent b221754325
commit 2952472b60
4 changed files with 115 additions and 95 deletions

1
.gitignore vendored
View File

@ -16,3 +16,4 @@
/vte-0.42.1.tar.xz
/vte-0.42.3.tar.xz
/vte-0.43.0.tar.xz
/vte-0.43.1.tar.xz

View File

@ -1 +1 @@
c437d29abc7e8a9d51def83455adfd3e vte-0.43.0.tar.xz
6b2f46ef762a831df076647960f5d949 vte-0.43.1.tar.xz

View File

@ -1,4 +1,4 @@
From 3f45cc2d9aefbcae8b6af9f2e1a276ba603a6e2b Mon Sep 17 00:00:00 2001
From 24d7703bbc57a2ee87c25b913c789eab51cb4164 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/3] emulation: Add sequences and signals for desktop
@ -20,15 +20,17 @@ https://bugzilla.gnome.org/show_bug.cgi?id=711059
---
src/caps.cc | 4 +++
src/marshal.list | 1 +
src/vte.cc | 38 ++++++++++++++++++++++
src/vte.cc | 12 +++++++
src/vte/vteterminal.h | 3 +-
src/vteinternal.hh | 5 +++
src/vtegtk.cc | 21 ++++++++++++
src/vtegtk.hh | 1 +
src/vteinternal.hh | 8 +++++
src/vteseq-n.gperf | 1 +
src/vteseq.cc | 90 +++++++++++++++++++++++++++++++++++++++++++++++++++
7 files changed, 141 insertions(+), 1 deletion(-)
9 files changed, 140 insertions(+), 1 deletion(-)
diff --git a/src/caps.cc b/src/caps.cc
index 82078af3f405..e3514eb11f38 100644
index d4ac3d8b01aa..bf79b08181f1 100644
--- a/src/caps.cc
+++ b/src/caps.cc
@@ -254,6 +254,8 @@ const char _vte_xterm_capability_strings[] =
@ -60,84 +62,37 @@ index 0276422ec6d4..2c35c685930a 100644
VOID:STRING,UINT
VOID:UINT,UINT
diff --git a/src/vte.cc b/src/vte.cc
index 470163c7ac70..646154f701be 100644
index d603922f6090..29878f522f5d 100644
--- a/src/vte.cc
+++ b/src/vte.cc
@@ -9643,6 +9643,9 @@ vte_terminal_finalize(GObject *object)
@@ -8573,6 +8573,9 @@ VteTerminalPrivate::~VteTerminalPrivate()
remove_update_timeout (terminal);
remove_update_timeout(m_terminal);
+ g_free (terminal->pvt->notification_summary);
+ g_free (terminal->pvt->notification_body);
+ g_free (m_notification_summary);
+ g_free (m_notification_body);
+
/* discard title updates */
g_free(terminal->pvt->window_title);
g_free(terminal->pvt->window_title_changed);
@@ -11387,6 +11390,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;
@@ -11461,6 +11465,25 @@ vte_terminal_class_init(VteTerminalClass *klass)
1, G_TYPE_INT);
g_free(m_window_title);
g_free(m_window_title_changed);
@@ -10659,6 +10662,15 @@ VteTerminalPrivate::emit_pending_signals()
/**
+ * 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.
+ */
+ 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
*
@@ -13482,6 +13505,16 @@ need_processing (VteTerminal *terminal)
return _vte_incoming_chunks_length (terminal->pvt->incoming) != 0;
}
emit_adjustment_changed();
+static void
+vte_terminal_emit_notification_received (VteTerminal *terminal)
+{
+ _vte_debug_print (VTE_DEBUG_SIGNALS,
+ "Emitting `notification-received'.\n");
+ g_signal_emit_by_name (terminal, "notification-received",
+ terminal->pvt->notification_summary,
+ terminal->pvt->notification_body);
+}
+
/* Emit an "icon-title-changed" signal. */
static void
vte_terminal_emit_icon_title_changed(VteTerminal *terminal)
@@ -13529,6 +13562,11 @@ vte_terminal_emit_pending_signals(VteTerminal *terminal)
vte_terminal_emit_adjustment_changed (terminal);
+ if (terminal->pvt->notification_received) {
+ vte_terminal_emit_notification_received (terminal);
+ terminal->pvt->notification_received = FALSE;
+ 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,
+ m_notification_body);
+ m_notification_received = FALSE;
+ }
+
if (terminal->pvt->window_title_changed) {
g_free (terminal->pvt->window_title);
terminal->pvt->window_title = terminal->pvt->window_title_changed;
if (m_window_title_changed) {
g_free (m_window_title);
m_window_title = m_window_title_changed;
diff --git a/src/vte/vteterminal.h b/src/vte/vteterminal.h
index 857819f385d0..e5d4d9dc998f 100644
index 1479e98ef3ad..5a1a0a309b24 100644
--- a/src/vte/vteterminal.h
+++ b/src/vte/vteterminal.h
@@ -79,6 +79,7 @@ struct _VteTerminalClass {
@ -157,11 +112,62 @@ index 857819f385d0..e5d4d9dc998f 100644
VteTerminalClassPrivate *priv;
};
diff --git a/src/vtegtk.cc b/src/vtegtk.cc
index 465407d61fad..5b6bc35e9eab 100644
--- a/src/vtegtk.cc
+++ b/src/vtegtk.cc
@@ -646,6 +646,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;
@@ -722,6 +723,26 @@ vte_terminal_class_init(VteTerminalClass *klass)
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 5fd8c1161538..d28c72ff5adb 100644
--- a/src/vtegtk.hh
+++ b/src/vtegtk.hh
@@ -53,6 +53,7 @@ enum {
SIGNAL_TEXT_INSERTED,
SIGNAL_TEXT_MODIFIED,
SIGNAL_TEXT_SCROLLED,
+ SIGNAL_NOTIFICATION_RECEIVED,
SIGNAL_WINDOW_TITLE_CHANGED,
COPY_CLIPBOARD,
PASTE_CLIPBOARD,
diff --git a/src/vteinternal.hh b/src/vteinternal.hh
index 7573ada9aaf4..cdfb8761d1c6 100644
index 812ff0b4f7e4..7a5b2c9f36d2 100644
--- a/src/vteinternal.hh
+++ b/src/vteinternal.hh
@@ -389,6 +389,11 @@ public:
@@ -506,6 +506,11 @@ public:
gboolean cursor_moved_pending;
gboolean contents_changed_pending;
@ -173,8 +179,18 @@ index 7573ada9aaf4..cdfb8761d1c6 100644
/* window name changes */
gchar *window_title;
gchar *window_title_changed;
@@ -1301,6 +1306,9 @@ public:
#define m_selection_html selection_html
#define m_child_watch_source child_watch_source
#define m_pty_channel pty_channel
+#define m_notification_received notification_received
+#define m_notification_summary notification_summary
+#define m_notification_body notification_body
#define m_window_title window_title
#define m_window_title_changed window_title_changed
#define m_icon_title_changed icon_title_changed
diff --git a/src/vteseq-n.gperf b/src/vteseq-n.gperf
index ad5b6d99f938..287caa5b5928 100644
index 4e2f3376d969..407139c37bfb 100644
--- a/src/vteseq-n.gperf
+++ b/src/vteseq-n.gperf
@@ -168,3 +168,4 @@ struct vteseq_n_struct {
@ -183,15 +199,15 @@ index ad5b6d99f938..287caa5b5928 100644
"set-current-file-uri", VTE_SEQUENCE_HANDLER(vte_sequence_handler_set_current_file_uri)
+"send-notification", VTE_SEQUENCE_HANDLER(vte_sequence_handler_send_notification)
diff --git a/src/vteseq.cc b/src/vteseq.cc
index af27ff5ef277..368e6700caf8 100644
index c859ee702ecb..712e65941a35 100644
--- a/src/vteseq.cc
+++ b/src/vteseq.cc
@@ -2243,6 +2243,96 @@ vte_sequence_handler_return_terminal_id (VteTerminal *terminal, GValueArray *par
vte_sequence_handler_send_primary_device_attributes (terminal, params);
@@ -2335,6 +2335,96 @@ vte_sequence_handler_return_terminal_id (VteTerminalPrivate *that, GValueArray *
vte_sequence_handler_send_primary_device_attributes (that, params);
}
+static void
+vte_sequence_handler_send_notification (VteTerminal *terminal, GValueArray *params)
+vte_sequence_handler_send_notification (VteTerminalPrivate *that, GValueArray *params)
+{
+ GValue *value;
+ const char *end;
@ -199,8 +215,8 @@ index af27ff5ef277..368e6700caf8 100644
+ char *str = NULL;
+ char *p, *validated;
+
+ g_clear_pointer (&terminal->pvt->notification_summary, g_free);
+ g_clear_pointer (&terminal->pvt->notification_body, g_free);
+ g_clear_pointer (&that->notification_summary, g_free);
+ g_clear_pointer (&that->notification_body, g_free);
+
+ value = g_value_array_get_nth (params, 0);
+ if (value == NULL) {
@ -210,7 +226,7 @@ index af27ff5ef277..368e6700caf8 100644
+ if (G_VALUE_HOLDS_STRING (value)) {
+ option = g_value_dup_string (value);
+ } else if (G_VALUE_HOLDS_POINTER (value)) {
+ option = vte_ucs4_to_utf8 (terminal, (const guchar *)g_value_get_pointer (value));
+ option = that->ucs4_to_utf8 ((const guchar *)g_value_get_pointer (value));
+ } else {
+ goto out;
+ }
@ -227,7 +243,7 @@ index af27ff5ef277..368e6700caf8 100644
+ if (G_VALUE_HOLDS_STRING (value)) {
+ str = g_value_dup_string (value);
+ } else if (G_VALUE_HOLDS_POINTER (value)) {
+ str = vte_ucs4_to_utf8 (terminal, (const guchar *)g_value_get_pointer (value));
+ str = that->ucs4_to_utf8 ((const guchar *)g_value_get_pointer (value));
+ } else {
+ goto out;
+ }
@ -242,10 +258,10 @@ index af27ff5ef277..368e6700caf8 100644
+ }
+ }
+
+ terminal->pvt->notification_summary = validated;
+ that->notification_summary = validated;
+ g_free (str);
+
+ terminal->pvt->notification_received = TRUE;
+ that->notification_received = TRUE;
+ if (params->n_values == 2) {
+ goto out;
+ }
@ -258,7 +274,7 @@ index af27ff5ef277..368e6700caf8 100644
+ if (G_VALUE_HOLDS_STRING (value)) {
+ str = g_value_dup_string (value);
+ } else if (G_VALUE_HOLDS_POINTER (value)) {
+ str = vte_ucs4_to_utf8 (terminal, (const guchar *)g_value_get_pointer (value));
+ str = that->ucs4_to_utf8 ((const guchar *)g_value_get_pointer (value));
+ } else {
+ goto out;
+ }
@ -273,7 +289,7 @@ index af27ff5ef277..368e6700caf8 100644
+ }
+ }
+
+ terminal->pvt->notification_body = validated;
+ that->notification_body = validated;
+ g_free (str);
+
+ out:
@ -282,12 +298,12 @@ index af27ff5ef277..368e6700caf8 100644
+
/* Send secondary device attributes. */
static void
vte_sequence_handler_send_secondary_device_attributes (VteTerminal *terminal, GValueArray *params)
vte_sequence_handler_send_secondary_device_attributes (VteTerminalPrivate *that, GValueArray *params)
--
2.5.0
From 391e5c57c07666476f8de883e4bf4a4a65c27aac Mon Sep 17 00:00:00 2001
From 8e93abb1f7ccb2f6e22d5a977672f1092965572f 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/3] vte.sh: Emit OSC 777 from PROMPT_COMMAND
@ -318,7 +334,7 @@ index 2d211caa2f17..1c0543bd9d26 100644
2.5.0
From 77886ec3ddabc54ac06767a5a875beaa9704a9be Mon Sep 17 00:00:00 2001
From c2bf8b93cf92374a72726af336a7069bcc732fbb 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/3] vteapp: Add a test for the notification-received signal
@ -328,10 +344,10 @@ Subject: [PATCH 3/3] vteapp: Add a test for the notification-received signal
1 file changed, 7 insertions(+)
diff --git a/src/app.vala b/src/app.vala
index c233a488d1d7..6f7a7561271e 100644
index 77bd1dcc7aa2..624046c2b4fc 100644
--- a/src/app.vala
+++ b/src/app.vala
@@ -318,6 +318,8 @@ class Window : Gtk.ApplicationWindow
@@ -332,6 +332,8 @@ class Window : Gtk.ApplicationWindow
if (App.Options.object_notifications)
terminal.notify.connect(notify_cb);
@ -340,7 +356,7 @@ index c233a488d1d7..6f7a7561271e 100644
/* Settings */
if (App.Options.no_double_buffer)
terminal.set_double_buffered(false);
@@ -748,6 +750,11 @@ class Window : Gtk.ApplicationWindow
@@ -797,6 +799,11 @@ class Window : Gtk.ApplicationWindow
set_title(terminal.get_window_title());
}

View File

@ -1,7 +1,7 @@
%global apiver 2.91
Name: vte291
Version: 0.43.0
Version: 0.43.1
Release: 1%{?dist}
Summary: Terminal emulator library
@ -100,6 +100,9 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
%{_sysconfdir}/profile.d/vte.sh
%changelog
* Fri Jan 29 2016 Debarshi Ray <rishi@fedoraproject.org> - 0.43.1-1
- Update to 0.43.1
* Fri Jan 29 2016 Debarshi Ray <rishi@fedoraproject.org> - 0.43.0-1
- Update to 0.43.0
- Add BuildRequires on pkgconfig(libpcre2-8)