Re: destroy signal in a class derived from gtkwindow



Hi David,

I've found it. All I had to do is to call
        G_OBJECT_CLASS(parent_class)->dispose(object);
from my dispose function. I've found the answer after googling for sources that
derive from GTK_WINDOW. The example I was following then was gst-recorder from
the gstreamer project.

After doing this, there was no need for things like gtk_widget_destry(widget) in
the delete_event handler. Therewith the destroy is not happening twice. Maybe
this helps you with your problem.

Many thanks for your help.

Ciao
  Stefan

David Necas (Yeti) wrote:
On Fri, Aug 20, 2004 at 03:00:00PM +0200, Stefan Kost wrote:

thanks for replying so quickly. Attached is my class.


Well, it's too dependend on other code to compile, but
I guess the problem is caused by not running

    G_OBJECT_CLASS(parent_class)->dispose(object);

in the dispose() method (you should also run parent's
finalize() in finalize()).

Now if we only knew if it's normal that destroy() is called
twice in my sample code which calls parent's methods...

Yeti


--
Do not use tab characters. Their effect is not predictable.


-- 
      \|/            Stefan Kost
     <@ @>           private            business
+-oOO-(_)-OOo------------------------------------------------------ - - -  -   -
|       __  Address  Simildenstr. 5     HTWK Leipzig, Fb IMN, Postfach 301166
|      ///           04277 Leipzig      04251 Leipzig
| __  ///            Germany            Germany
| \\\///    Phone    +49341 2253538     +49341 30766101
|  \__/     EMail    st_kost_at_gmx.net kost_at_imn.htwk-leipzig.de
|           WWW      www.sonicpulse.de  www.imn.htwk-leipzig.de/~kost/about.html
===-=-=--=---=---------------------------------- - - -  -    -


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]