2008-05-30 Mike Kestner <mkestner@novell.com>

* gtk/Object.custom:
	* gtk/glue/object.c: remove the destroy override.  it doesn't work.

svn path=/trunk/gtk-sharp/; revision=104558
This commit is contained in:
Mike Kestner 2008-05-30 17:17:16 +00:00
parent f3f0a62918
commit b651056f6c
3 changed files with 5 additions and 46 deletions

View file

@ -1,3 +1,8 @@
2008-05-30 Mike Kestner <mkestner@novell.com>
* gtk/Object.custom:
* gtk/glue/object.c: remove the destroy override. it doesn't work.
2008-05-28 Mike Kestner <mkestner@novell.com>
* gtk/Object.custom: move Dispose call to a vm override so that

View file

@ -21,30 +21,6 @@
// Free Software Foundation, Inc., 59 Temple Place - Suite 330,
// Boston, MA 02111-1307, USA.
[DllImport("gtksharpglue-2")]
private static extern bool gtksharp_object_override_destroy (DestroyVMDelegate handler);
static DestroyVMDelegate destroy_vm_handler;
static Object ()
{
destroy_vm_handler = new DestroyVMDelegate (DestroyVMCallback);
gtksharp_object_override_destroy (destroy_vm_handler);
}
[GLib.CDeclCallback]
delegate void DestroyVMDelegate (IntPtr handle);
static void DestroyVMCallback (IntPtr handle)
{
try {
GLib.Object obj = GLib.Object.GetObject (handle, false);
if (obj != null)
obj.Dispose ();
} catch (Exception) {
}
}
static Hashtable destroy_handlers;
static Hashtable DestroyHandlers {
get {

View file

@ -26,7 +26,6 @@
void gtksharp_object_unref_if_floating (GObject *obj);
gboolean gtksharp_object_is_floating (GObject *obj);
void gtksharp_object_set_floating (GtkObject *obj, gboolean val);
void gtksharp_object_override_destroy (gpointer cb);
/* */
void
@ -51,24 +50,3 @@ gtksharp_object_set_floating (GtkObject *obj, gboolean val)
gtk_object_sink (obj);
}
typedef void (* destroy_func) (GtkObject *obj);
static destroy_func base_destroy;
static destroy_func managed_destroy;
static void
my_destroy (GtkObject *obj)
{
(* managed_destroy) (obj);
(* base_destroy) (obj);
}
void
gtksharp_object_override_destroy (gpointer cb)
{
GtkObjectClass *klass = (GtkObjectClass *) g_type_class_ref (GTK_TYPE_OBJECT);
base_destroy = klass->destroy;
managed_destroy = cb;
klass->destroy = my_destroy;
}