diff --git a/ChangeLog b/ChangeLog index 43cf14d91..8e345072f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2005-04-07 Dan Winship + + * gtk/Object.custom (Raw): Always ref the object, even if it's not + floating when we get it, since GLib assumes we hold a ref on it. + [Fixes #74468] + + * gtk/Window.custom: remove refcount special-handling here + 2005-04-06 Mike Kestner * gtk/FileFilter.custom : AddCustom delegate is destroy notified. diff --git a/gtk/Object.custom b/gtk/Object.custom index fad8d7c4d..15968c461 100755 --- a/gtk/Object.custom +++ b/gtk/Object.custom @@ -39,11 +39,8 @@ if (value == IntPtr.Zero) return; - if (gtksharp_object_is_floating (value)) { - g_object_ref (value); - Sink (); - } -// System.Diagnostics.Debug.WriteLine ("Gtk.Object:set_Raw: object type is: " + (this as GLib.Object).GType.Name + " refcount now: " + RefCount + " needs_ref: " + needs_ref); + g_object_ref (value); + Sink (); } } diff --git a/gtk/Window.custom b/gtk/Window.custom index e56db7f62..95774dd10 100755 --- a/gtk/Window.custom +++ b/gtk/Window.custom @@ -21,32 +21,6 @@ // Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Boston, MA 02111-1307, USA. - - - [DllImport("libgobject-2.0-0.dll")] - private static extern void g_object_ref (IntPtr raw); - - static Hashtable windows = new Hashtable (); - - protected override IntPtr Raw { - get { - return base.Raw; - } - set { - base.Raw = value; - if (value == IntPtr.Zero) - return; - g_object_ref (value); - windows [value] = this; - } - } - - public override void Destroy () - { - base.Destroy (); - windows [Handle] = null; - } - public Window (String title) : this (WindowType.Toplevel) { this.Title = title;