From a3812f9b8bfe467873bfe261a161b868c2b42118 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Wed, 20 Jul 2011 03:20:54 +0200 Subject: vala: updated example to use the new API --- bindings/vala/examples/indicator-example.vala | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/bindings/vala/examples/indicator-example.vala b/bindings/vala/examples/indicator-example.vala index b98498a..7bb1d7d 100644 --- a/bindings/vala/examples/indicator-example.vala +++ b/bindings/vala/examples/indicator-example.vala @@ -47,22 +47,15 @@ public class IndicatorExample { item.show(); menu.append(item); - item = new MenuItem.with_label("Bar"); + var bar = item = new MenuItem.with_label("Bar"); item.show(); item.activate.connect(() => { - indicator.set_status(IndicatorStatus.ATTENTION); + indicator.set_status(IndicatorStatus.ACTIVE); }); menu.append(item); indicator.set_menu(menu); - - indicator.secondary_activate.connect(() => { - print("Got secondary_activate event\n"); - if (indicator.get_status() != IndicatorStatus.ACTIVE) - indicator.set_status(IndicatorStatus.ACTIVE); - else - indicator.set_status(IndicatorStatus.ATTENTION); - }); + indicator.set_secondary_activate_target(bar); win.show_all(); -- cgit v1.2.3