diff --git a/ChangeLog b/ChangeLog index ae6316580..c9f9acfab 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2005-01-23 Jeroen Zwartepoorte + + * gtk/ActionGroup.custom: Add a string index for the GetAction method. + 2005-01-20 Dan Winship * glib/Marshaller.cs (StringFormat): Calls String.Format and makes diff --git a/doc/en/Gtk/ActionGroup.xml b/doc/en/Gtk/ActionGroup.xml index f279f128d..5db45480b 100644 --- a/doc/en/Gtk/ActionGroup.xml +++ b/doc/en/Gtk/ActionGroup.xml @@ -123,7 +123,8 @@ Accel paths are set to <Actions>/group-name/action-name. Looks up an action in the action group by name. a , the name of the action a , or if no action by that name exists - + + @@ -245,7 +246,8 @@ Therefore you must either set the accel path yourself with s added by . a - + + @@ -311,5 +313,21 @@ Therefore you must either set the accel path yourself with + + Property + + Gtk.Action + + + + + + Returns the with the specified name. + a + a + See for more info. + + - \ No newline at end of file + diff --git a/gtk/ActionGroup.custom b/gtk/ActionGroup.custom index 1c6a73b9c..2a1a0f2ab 100644 --- a/gtk/ActionGroup.custom +++ b/gtk/ActionGroup.custom @@ -18,6 +18,12 @@ // Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Boston, MA 02111-1307, USA. + public Action this[string name] { + get { + return GetAction (name); + } + } + public void Add (ActionEntry[] entries) { foreach (ActionEntry entry in entries) { @@ -74,7 +80,7 @@ IntPtr raw_ret = gtk_action_group_list_actions (Handle); GLib.List list = new GLib.List (raw_ret); Gtk.Action[] result = new Gtk.Action [list.Count]; - for (int i = 0; i < list.Count; i++) - result [i] = list [i] as Gtk.Action; + for (int i = 0; i < list.Count; i++) + result [i] = list [i] as Gtk.Action; return result; }