From d83f2a64b9d39258b28837e586e178ff372d5f8d Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Thu, 22 Jan 2015 16:37:10 +0100 Subject: [PATCH 3/9] Test the notification-received signal --- src/app/app.cc | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/app/app.cc b/src/app/app.cc index d5a65fc4..e8a51192 100644 --- a/src/app/app.cc +++ b/src/app/app.cc @@ -2316,6 +2316,14 @@ window_window_title_changed_cb(VteTerminal* terminal, gtk_window_set_title(GTK_WINDOW(window), title && title[0] ? title : "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) @@ -2607,8 +2615,10 @@ vteapp_window_constructed(GObject *object) if (options.object_notifications) g_signal_connect(window->terminal, "notify", G_CALLBACK(window_notify_cb), window); - /* Settings */ #if VTE_GTK == 3 + g_signal_connect(window->terminal, "notification-received", G_CALLBACK(notification_received_cb), NULL); + + /* Settings */ if (options.no_double_buffer) { G_GNUC_BEGIN_IGNORE_DEPRECATIONS; gtk_widget_set_double_buffered(GTK_WIDGET(window->terminal), false); -- 2.43.0