diff --git a/ChangeLog b/ChangeLog index 7e86f081b..bdeffa328 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2003-10-10 Mike Kestner + + * gtk/gtk-api.xml : regenerated + * gtk/FileSelection.custom : implement the Selections property by + hand. [Fixes #49254] + * sources/Gtk.metadata : hide FileSelection.GetSelections. + 2003-10-10 Mike Kestner * */makefile.win32 : remove api dir from build and fix clean target diff --git a/gtk/FileSelection.custom b/gtk/FileSelection.custom index 61ef71786..957c7e756 100644 --- a/gtk/FileSelection.custom +++ b/gtk/FileSelection.custom @@ -124,3 +124,29 @@ static extern IntPtr gtksharp_file_selection_get_action_area (IntPtr i); public new Gtk.HButtonBox ActionArea { get { return GLib.Object.GetObject (gtksharp_file_selection_get_action_area (this.Handle), false) as Gtk.HButtonBox; } } + +[DllImport("libgtk-win32-2.0-0.dll")] +static extern IntPtr gtk_file_selection_get_selections (IntPtr handle); + +[DllImport("libglib-2.0-0.dll")] +static extern void g_strfreev (IntPtr handle); + +public string[] Selections { + get { + IntPtr strv = gtk_file_selection_get_selections (Handle); + + System.Collections.ArrayList result = new System.Collections.ArrayList (); + + int i = 0; + IntPtr strptr = Marshal.ReadIntPtr (strv, IntPtr.Size * i++); + while (strptr != IntPtr.Zero) { + result.Add (Marshal.PtrToStringAnsi (strptr)); + strptr = Marshal.ReadIntPtr (strv, IntPtr.Size * i++); + } + + g_strfreev (strv); + + return result.ToArray (typeof (string)) as string[]; + } +} + diff --git a/gtk/gtk-api.xml b/gtk/gtk-api.xml index 7b553875a..5773d74c8 100644 --- a/gtk/gtk-api.xml +++ b/gtk/gtk-api.xml @@ -3055,8 +3055,8 @@ - - + diff --git a/sources/Gtk.metadata b/sources/Gtk.metadata index 57766384b..b0b23a896 100644 --- a/sources/Gtk.metadata +++ b/sources/Gtk.metadata @@ -453,8 +453,8 @@ GetSelections - - array + + hidden 1