11public void main () {
2- // TODO - need access to the application for this to work.
3- // var application = workbench.application as GLib.Application;
2+ var application = workbench. application as GLib . Application ;
43
54 var notification = new Notification (" Lunch is ready" );
65 notification. set_body (
@@ -15,26 +14,26 @@ public void main () {
1514
1615 var simple_button = workbench. builder. get_object (" button_simple" ) as Gtk . Button ;
1716 simple_button. clicked. connect (() = > {
18- // application.send_notification ("lunch-is-ready", notification);
17+ application. send_notification (" lunch-is-ready" , notification);
1918 });
2019
2120 var action_reply = new SimpleAction (" notification-reply" , null );
2221 action_reply. activate. connect (() = > {
2322 stdout. printf (" Reply" );
2423 });
25- // application.add_action (action_reply);
24+ application. add_action (action_reply);
2625
2726 var action_accept = new SimpleAction (" notification-accept" , null );
2827 action_accept. activate. connect (() = > {
2928 stdout. printf (" Accept" );
3029 });
31- // application.add_action (action_accept);
30+ application. add_action (action_accept);
3231
3332 var action_decline = new SimpleAction (" notification-decline" , null );
3433 action_decline. activate. connect (() = > {
3534 stdout. printf (" Decline" );
3635 });
37- // application.add_action (action_decline);
38- }
3936
37+ application. add_action (action_decline);
38+ }
4039
0 commit comments