Re: [gtk-list] Re: GTK--: hello.cc questions
- From: "Jason A. Pfeil" <pfeil nu cs fsu edu>
- To: gtk-list redhat com
- cc: "gtk-app-devel-list redhat com" <gtk-app-devel-list redhat com>
- Subject: Re: [gtk-list] Re: GTK--: hello.cc questions
- Date: Tue, 14 Jul 1998 11:52:16 -0400 (EDT)
About the question as to why the destroy_event_impl is never called, I
would hazard a guess at the risk of sounding presumptious that you didn't
make it a member of the class...
(gint ClassName::destroy_event_impl(GdkEventAny *) {})
--Jason
On 14 Jul 1998, Tero Pulkkinen wrote:
> Ionut Borcoman at debian <borco@mailbox.ro> writes:
> > I am trying my first GTK-- application. I have GTK---0.9.9 and
> > GTK+-1.0.4.
> >
> > Problem 1:
> > I have compiled the hello.cc and run it. If I press the button b,
> > everithing's OK. But if I close the window via the window manager, I get
> > this:
> >
> > bash-2.01$ ./hello
> >
> > ** WARNING **: file gtkobject.c: line 1140 (gtk_object_get_data_by_id):
> > "GTK_IS_OBJECT (object)"
> >
> > ** WARNING **: gtk_signal_disconnect(): could not find handler (1)
> >
> > Why do I get these messages ?
>
> I dont know :) never seen these bbefore :)
>
> > Problem 2:
> > I would also like to be able to control the closing of the window (to
> > prevent unsaved work to be lost). How can this be done ?
>
> overriding delete_event_impl -- not destroy_event_impl...
> return value of it determines if gtk automatically destroys
> the widget and with gtk-- it should always be 0. (I think)
>
> > Problem 3:
> > Another question is related to the function from hello.cc, too:
> >
> > gint destroy_event_impl(GdkEventAny *){
> > Gtk_Main::instance()->quit();
> > return 0;
> > }
> >
> > This function is never called ! Why and how do I make it be called ?
> > (this can be checked by changing it in:
> >
> > gint destroy_event_impl(GdkEventAny *){
> > g_print( "destroy event occured\n");
> > Gtk_Main::instance()->quit();
> > return 0;
> > }
> >
> > The message "destroy event occured\n" is never printed.)
>
> I dont really know the original purpose of destroy_event, but
> using delete_event_impl seems to work right.
>
> --
> -- Tero Pulkkinen -- terop@modeemi.cs.tut.fi --
>
> --
> To unsubscribe: mail -s unsubscribe gtk-list-request@redhat.com < /dev/null
>
>
-------------------------------------------------------------------------------
Jason A. Pfeil, Computer Science Graduate Student 101 Carothers Hall
http://www.cs.fsu.edu/~pfeil C3527 University Center
pfeil@cs.fsu.edu (850)644-8014
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]