aboutsummaryrefslogtreecommitdiff
path: root/bindings
diff options
context:
space:
mode:
authorMarco Trevisan (Treviño) <mail@3v1n0.net>2011-07-20 03:20:54 +0200
committerMarco Trevisan (Treviño) <mail@3v1n0.net>2011-07-20 03:20:54 +0200
commita3812f9b8bfe467873bfe261a161b868c2b42118 (patch)
treebad7f02a209b859ed2197ae58fac47972ad15d75 /bindings
parent6a52781539b7ff689620fdb07043664ed457a10b (diff)
downloadlibayatana-appindicator-a3812f9b8bfe467873bfe261a161b868c2b42118.tar.gz
libayatana-appindicator-a3812f9b8bfe467873bfe261a161b868c2b42118.tar.bz2
libayatana-appindicator-a3812f9b8bfe467873bfe261a161b868c2b42118.zip
vala: updated example to use the new API
Diffstat (limited to 'bindings')
-rw-r--r--bindings/vala/examples/indicator-example.vala13
1 files 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();