diff options
author | Debarshi Ray <debarshir@gnome.org> | 2018-05-02 17:30:48 +0200 |
---|---|---|
committer | Debarshi Ray <debarshir@gnome.org> | 2018-06-25 13:21:24 +0200 |
commit | 74a30807b0f882ef31b3da4ca7c2a02eebd694c2 (patch) | |
tree | 56c4d1a1602d3058cee4beb51d3342ba3381c000 | |
parent | 3e8d81a99ceca12c1cfa571b1c52ef6149f69c52 (diff) | |
download | vte-wip/rishi/precmd-preexec.tar.gz |
Test the shell-precmd signalwip/rishi/precmd-preexec
https://bugzilla.gnome.org/show_bug.cgi?id=711059
https://bugzilla.gnome.org/show_bug.cgi?id=711060
-rw-r--r-- | bindings/vala/app.vala | 6 | ||||
-rw-r--r-- | src/app/app.cc | 7 |
2 files changed, 13 insertions, 0 deletions
diff --git a/bindings/vala/app.vala b/bindings/vala/app.vala index 983fcbc4..bb30ff5b 100644 --- a/bindings/vala/app.vala +++ b/bindings/vala/app.vala @@ -309,6 +309,7 @@ class Window : Gtk.ApplicationWindow if (App.Options.object_notifications) terminal.notify.connect(notify_cb); + terminal.shell_precmd.connect(shell_precmd_cb); terminal.shell_preexec.connect(shell_preexec_cb); /* Settings */ @@ -782,6 +783,11 @@ class Window : Gtk.ApplicationWindow set_title(terminal.get_window_title()); } + private void shell_precmd_cb(Vte.Terminal terminal) + { + print("[shell] showing command prompt\n"); + } + private void shell_preexec_cb(Vte.Terminal terminal) { print("[shell] executing command\n"); diff --git a/src/app/app.cc b/src/app/app.cc index 1cd6968f..2b2602c4 100644 --- a/src/app/app.cc +++ b/src/app/app.cc @@ -1622,6 +1622,12 @@ window_window_title_changed_cb(VteTerminal* terminal, } static void +shell_precmd_cb(VteTerminal *terminal) +{ + g_print("[shell] showing command prompt\n"); +} + +static void shell_preexec_cb(VteTerminal *terminal) { g_print("[shell] executing command\n"); @@ -1854,6 +1860,7 @@ 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-precmd", G_CALLBACK(shell_precmd_cb), NULL); g_signal_connect(window->terminal, "shell-preexec", G_CALLBACK(shell_preexec_cb), NULL); /* Settings */ |