Re: Easy way to destroy gtk pixmaps when widget destroyed?



learfox furry ao net writes:

   Is there a way to create a new gtk pixmap and then associate it in some
way with another referanced widget (say a a parented fixed widget), and
then, when the fixed widget is destroyed then so will the gtk pixmap.

Is there a way to have that done? The gtk pixmap will not be used by any
other widget, and its drawn onto the fixed widget with gtk_fixed_put().

gtk_fixed_put() doesn't "draw" the widget onto the GtkFixed, it
adds the widget as a child of the parent widget.

Child widgets are destroyed along with their parent.

So, if you add a GtkPixmap widget to a GtkFixed widget, you don't
need to worry about it any more. 

Are you sure? The ref count is 0 for a gtk pixmap widget after
calling gtk_fixed_but() into a fixed widget.

How are you determining is the case? 

(It's only going to be zero if you add it and then remove it
again. Which is a pretty useless thing to do, and I doubt
you are doing it)

Regards,
                                        Owen




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