aboutsummaryrefslogtreecommitdiff
path: root/example/simple-client-vala.vala
diff options
context:
space:
mode:
Diffstat (limited to 'example/simple-client-vala.vala')
-rw-r--r--example/simple-client-vala.vala13
1 files changed, 12 insertions, 1 deletions
diff --git a/example/simple-client-vala.vala b/example/simple-client-vala.vala
index 61e0c2f..8d661ce 100644
--- a/example/simple-client-vala.vala
+++ b/example/simple-client-vala.vala
@@ -72,6 +72,17 @@ class SimpleClient {
menu.append(mi);
mi.activate.connect(() => { print("Sub3\n"); });
+ mi = new MenuItem.with_label("Toggle Attention");
+ menu.append(mi);
+ mi.activate.connect(() => {
+ if (ci.get_status() == IndicatorStatus.ATTENTION)
+ ci.set_status(IndicatorStatus.ACTIVE);
+ else
+ ci.set_status(IndicatorStatus.ATTENTION);
+ });
+
+ ci.set_secondary_activate_target(mi);
+
menu.show_all();
item.set_submenu(menu);
}
@@ -109,7 +120,7 @@ class SimpleClient {
chk.show();
var radio = new RadioMenuItem.with_label(new SList<RadioMenuItem>(), "2");
- radio.activate.connect(() => { print("2\n"); });
+ radio.activate.connect(() => { print("2\n"); });
menu.append(radio);
radio.show();