aboutsummaryrefslogtreecommitdiff
path: root/example/simple-client-vala.vala
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2011-08-11 12:04:06 -0500
committerTed Gould <ted@gould.cx>2011-08-11 12:04:06 -0500
commit6a05f53d2ad9f0f54fea7be123c94d1e0fad450a (patch)
treede7b2d919432599ca4d1f185636dbccae6aec16a /example/simple-client-vala.vala
parent1a483429602788950a12bfa07cb98d600b8a736f (diff)
parent8c352cdc40eced52767ddca7036fa7b76bf42a6b (diff)
downloadlibayatana-appindicator-6a05f53d2ad9f0f54fea7be123c94d1e0fad450a.tar.gz
libayatana-appindicator-6a05f53d2ad9f0f54fea7be123c94d1e0fad450a.tar.bz2
libayatana-appindicator-6a05f53d2ad9f0f54fea7be123c94d1e0fad450a.zip
* New upstream release.
* Secondary activate support * Better GIR file annotations
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();