2008-05-22 Mike Kestner <mkestner@novell.com>
* gtk/Widget.custom: guard against MissingIntPtrCtorException in the Activate and SetScrollAdjustments funky signal VM impl. Can't use SignalClosure easily. Could be reworked more cleanly at some point. Or not. svn path=/trunk/gtk-sharp/; revision=103827
This commit is contained in:
parent
a1473c0b58
commit
d9721b63dc
2 changed files with 24 additions and 3 deletions
|
@ -1,3 +1,10 @@
|
|||
2008-05-22 Mike Kestner <mkestner@novell.com>
|
||||
|
||||
* gtk/Widget.custom: guard against MissingIntPtrCtorException in
|
||||
the Activate and SetScrollAdjustments funky signal VM impl. Can't
|
||||
use SignalClosure easily. Could be reworked more cleanly at some
|
||||
point. Or not.
|
||||
|
||||
2008-05-21 Mike Kestner <mkestner@novell.com>
|
||||
|
||||
* gtk/Object.custom (OnDestroyed): ensure Dispose runs even if
|
||||
|
|
|
@ -201,7 +201,12 @@ static SetScrollAdjustmentsDelegate SetScrollAdjustmentsCallback;
|
|||
static void SetScrollAdjustments_cb (IntPtr widget, IntPtr hadj, IntPtr vadj)
|
||||
{
|
||||
try {
|
||||
Widget obj = GLib.Object.GetObject (widget, false) as Widget;
|
||||
Widget obj;
|
||||
try {
|
||||
obj = GLib.Object.GetObject (widget, false) as Widget;
|
||||
} catch (GLib.MissingIntPtrCtorException) {
|
||||
return;
|
||||
}
|
||||
Gtk.Adjustment h = GLib.Object.GetObject (hadj, false) as Gtk.Adjustment;
|
||||
Gtk.Adjustment v = GLib.Object.GetObject (vadj, false) as Gtk.Adjustment;
|
||||
obj.OnSetScrollAdjustments (h, v);
|
||||
|
@ -232,8 +237,17 @@ static ActivateDelegate ActivateCallback;
|
|||
|
||||
static void Activate_cb (IntPtr widget)
|
||||
{
|
||||
Widget obj = GLib.Object.GetObject (widget, false) as Widget;
|
||||
obj.OnActivate ();
|
||||
try {
|
||||
Widget obj;
|
||||
try {
|
||||
obj = GLib.Object.GetObject (widget, false) as Widget;
|
||||
} catch (GLib.MissingIntPtrCtorException) {
|
||||
return;
|
||||
}
|
||||
obj.OnActivate ();
|
||||
} catch (Exception e) {
|
||||
GLib.ExceptionManager.RaiseUnhandledException (e, false);
|
||||
}
|
||||
}
|
||||
|
||||
static void ConnectActivate (GLib.GType gtype)
|
||||
|
|
Loading…
Reference in a new issue