diff --git a/ChangeLog b/ChangeLog index 8d860a683..a8e3edee3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2004-12-18 Mike Kestner + + * gtk/ColorSelectionDialog.custom : fix some incorrect object wrapping + and mark the ColorSelectionButton nested class Obsolete with a heinous + warning message. [Fixes #68450] + 2004-12-18 Mike Kestner * generator/Field.cs : add MarshalAs attrs for (u)longs. diff --git a/gtk/ColorSelectionDialog.custom b/gtk/ColorSelectionDialog.custom index 4e3a80ca2..7fbd76564 100644 --- a/gtk/ColorSelectionDialog.custom +++ b/gtk/ColorSelectionDialog.custom @@ -1,4 +1,3 @@ -// // Gtk.ColorSelectionDialog.custom - Gtk ColorSelectionDialog class customizations // // Author: Duncan Mak (duncan@ximian.com) @@ -23,6 +22,7 @@ // Boston, MA 02111-1307, USA. +[Obsolete ("Do not use this class. It will cause your app to crash in mysterious ways.")] public class ColorSelectionButton : Gtk.Button { private ColorSelectionDialog color_sel; @@ -37,24 +37,25 @@ public class ColorSelectionButton : Gtk.Button { [DllImport("gtksharpglue-2")] static extern IntPtr gtksharp_color_selection_dialog_get_colorsel (IntPtr i); -public Gtk.ColorSelection ColorSelection { - get { return new ColorSelection (gtksharp_color_selection_dialog_get_colorsel (this.Handle)); } +public ColorSelection ColorSelection { + get { return GLib.Object.GetObject (gtksharp_color_selection_dialog_get_colorsel (this.Handle), false) as ColorSelection; } } [DllImport("gtksharpglue-2")] static extern IntPtr gtksharp_color_selection_dialog_get_ok_button (IntPtr i); -public Gtk.Button OkButton { - get { return new ColorSelectionButton (this, gtksharp_color_selection_dialog_get_ok_button (this.Handle)); } +public Button OkButton { + get { return GLib.Object.GetObject (gtksharp_color_selection_dialog_get_ok_button (this.Handle), false) as Button; } } [DllImport("gtksharpglue-2")] static extern IntPtr gtksharp_color_selection_dialog_get_cancel_button (IntPtr i); -public Gtk.Button CancelButton { - get { return new ColorSelectionButton (this, gtksharp_color_selection_dialog_get_cancel_button (this.Handle)); } +public Button CancelButton { + get { return GLib.Object.GetObject (gtksharp_color_selection_dialog_get_cancel_button (this.Handle), false) as Button; } } [DllImport("gtksharpglue-2")] static extern IntPtr gtksharp_color_selection_dialog_get_help_button (IntPtr i); -public Gtk.Button HelpButton { - get { return new ColorSelectionButton (this, gtksharp_color_selection_dialog_get_help_button (this.Handle)); } +public Button HelpButton { + get { return GLib.Object.GetObject (gtksharp_color_selection_dialog_get_help_button (this.Handle), false) as Button; } } +