obgtk: a fix
- From: fractture <fract sprintmail com>
- To: "gtk-list redhat com" <gtk-list redhat com>
- Subject: obgtk: a fix
- Date: Sun, 03 May 1998 14:36:12 -0700
Here is a 'fix' for the "delete_event" hassle.
Its not elegant, but it works.
global var:
Gtk_App *theApp; // type needs to be the subclass if you do it that
way...
The function
gint dele(GtkWidget *w, gpointer data) { // actually I think the () can
be empty.
return [theApp del];
}
Then, this method needs to be added to Gtk_App as a default for dele to
call.
-(BOOL)del
{
[self free];
return NO;
}
Then this method needs to be added also....
-connectDel:(Gtk_Object *)anObj
{
theApp = self;
[anObj signal_connect:"delete_event"
signalFunc:GTK_SIGNAL_FUNC(dele)
funcData:NULL];
return self;
}
then you just call it like
[self connectDel:window];
and overide del.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]