[vte/wip/rishi/precmd-preexec: 2/4] Test the shell-preexec signal
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vte/wip/rishi/precmd-preexec: 2/4] Test the shell-preexec signal
- Date: Mon, 21 May 2018 09:39:38 +0000 (UTC)
commit d23d965cc17d10c0b1ab3140290856bc43e3e1c1
Author: Debarshi Ray <debarshir gnome org>
Date: Fri Apr 20 18:21:53 2018 +0200
Test the shell-preexec signal
https://bugzilla.gnome.org/show_bug.cgi?id=711059
https://bugzilla.gnome.org/show_bug.cgi?id=711060
bindings/vala/app.vala | 7 +++++++
src/app/app.cc | 8 ++++++++
2 files changed, 15 insertions(+), 0 deletions(-)
---
diff --git a/bindings/vala/app.vala b/bindings/vala/app.vala
index 8663d63..983fcbc 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.shell_preexec.connect(shell_preexec_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 shell_preexec_cb(Vte.Terminal terminal)
+ {
+ print("[shell] executing command\n");
+ }
+
} /* class Window */
class App : Gtk.Application
diff --git a/src/app/app.cc b/src/app/app.cc
index 82f38ff..af9d801 100644
--- a/src/app/app.cc
+++ b/src/app/app.cc
@@ -1589,6 +1589,12 @@ window_window_title_changed_cb(VteTerminal* terminal,
}
static void
+shell_preexec_cb(VteTerminal *terminal)
+{
+ g_print("[shell] executing command\n");
+}
+
+static void
window_lower_window_cb(VteTerminal* terminal,
VteappWindow* window)
{
@@ -1815,6 +1821,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, "shell-preexec", G_CALLBACK(shell_preexec_cb), NULL);
+
/* Settings */
if (options.no_double_buffer)
gtk_widget_set_double_buffered(GTK_WIDGET(window->terminal), false);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]