Re: [gtk-list] GTK--: hello.cc questions
- From: Tero Pulkkinen <terop students cc tut fi>
- To: gtk-list redhat com
- Cc: "gtk-app-devel-list redhat com" <gtk-app-devel-list redhat com>
- Subject: Re: [gtk-list] GTK--: hello.cc questions
- Date: 14 Jul 1998 14:27:06 +0300
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 --
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]