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 /bindings | |
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 'bindings')
-rw-r--r-- | bindings/mono/examples/IndicatorExample.cs | 9 | ||||
-rw-r--r-- | bindings/mono/libappindicator-api.raw | 9 | ||||
-rw-r--r-- | bindings/vala/examples/indicator-example.vala | 5 |
3 files changed, 20 insertions, 3 deletions
diff --git a/bindings/mono/examples/IndicatorExample.cs b/bindings/mono/examples/IndicatorExample.cs index c18a665..7413c54 100644 --- a/bindings/mono/examples/IndicatorExample.cs +++ b/bindings/mono/examples/IndicatorExample.cs @@ -41,12 +41,19 @@ public class IndicatorExample indicator.Status = Status.Attention; Menu menu = new Menu (); - menu.Append (new MenuItem ("Foo")); + var foo = new MenuItem ("Foo"); + menu.Append (foo); + foo.Activated += delegate { + System.Console.WriteLine ("Foo item has been activated"); + }; + menu.Append (new MenuItem ("Bar")); indicator.Menu = menu; indicator.Menu.ShowAll (); + indicator.SecondaryActivateTarget = foo; + win.ShowAll (); Application.Run (); diff --git a/bindings/mono/libappindicator-api.raw b/bindings/mono/libappindicator-api.raw index 37ddae3..561b7a2 100644 --- a/bindings/mono/libappindicator-api.raw +++ b/bindings/mono/libappindicator-api.raw @@ -143,6 +143,9 @@ <method name="GetOrderingIndex" cname="app_indicator_get_ordering_index"> <return-type type="guint32" /> </method> + <method name="GetSecondaryActivateTarget" cname="app_indicator_get_secondary_activate_target"> + <return-type type="GtkWidget*" /> + </method> <method name="GetStatus" cname="app_indicator_get_status"> <return-type type="AppIndicatorStatus" /> </method> @@ -215,6 +218,12 @@ <parameter type="guint32" name="ordering_index" /> </parameters> </method> + <method name="SetSecondaryActivateTarget" cname="app_indicator_set_secondary_activate_target"> + <return-type type="void" /> + <parameters> + <parameter type="GtkWidget*" name="menuitem" /> + </parameters> + </method> <method name="SetStatus" cname="app_indicator_set_status"> <return-type type="void" /> <parameters> diff --git a/bindings/vala/examples/indicator-example.vala b/bindings/vala/examples/indicator-example.vala index 621c962..7bb1d7d 100644 --- a/bindings/vala/examples/indicator-example.vala +++ b/bindings/vala/examples/indicator-example.vala @@ -47,14 +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.set_secondary_activate_target(bar); win.show_all(); |