diff options
author | Ted Gould <ted@gould.cx> | 2011-08-11 12:02:16 -0500 |
---|---|---|
committer | Ted Gould <ted@gould.cx> | 2011-08-11 12:02:16 -0500 |
commit | 8c352cdc40eced52767ddca7036fa7b76bf42a6b (patch) | |
tree | 4a628c94c7913385dfcf098c85b63188eedc6200 /example/simple-client-vala.vala | |
parent | fc03ef7c10bf76edc87af4cc54194fe1bf6e28c2 (diff) | |
parent | 1bfe91a779b5d71cf3e6bf066182af38995fa4bf (diff) | |
download | libayatana-appindicator-8c352cdc40eced52767ddca7036fa7b76bf42a6b.tar.gz libayatana-appindicator-8c352cdc40eced52767ddca7036fa7b76bf42a6b.tar.bz2 libayatana-appindicator-8c352cdc40eced52767ddca7036fa7b76bf42a6b.zip |
Import upstream version 0.3.91
Diffstat (limited to 'example/simple-client-vala.vala')
-rw-r--r-- | example/simple-client-vala.vala | 13 |
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(); |