[vte/wip/rishi/command-notify: 2/3] vteapp: Add a test for the notification-received signal



commit 837f7b9bf22a7db813bec98aa085854ef4e9d76d
Author: Debarshi Ray <debarshir gnome org>
Date:   Thu Jan 22 16:37:10 2015 +0100

    vteapp: Add a test for the notification-received signal

 src/app.vala |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/src/app.vala b/src/app.vala
index 67a58a2..be65058 100644
--- a/src/app.vala
+++ b/src/app.vala
@@ -102,6 +102,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(true);
@@ -508,6 +510,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


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]