Re: gtk themes and stuff...




> Okay.. someone correct me if I'm wrong.. but when buttons get killed...
> I can't spot any destory function for destroying the windows in
> gtkbutton.c - which seems like the logical place... now... my question
> is... which function gets called on a button destroy - obviously not in
> gtkbuttons.c - or at least it seems so.. and possibly this could be a
> memory leak - not destroying windows? 

gtk_widget_destroy calls gtk_widget_unrealize, which emits an
"unrealize" signal. The Button widget doesn't need to do anything
special on unrealization, so it doesn't supply a handler, and the
default handler, gtk_real_widget_unrealize is used.

Which, among other things, includes:
		 
  if (!GTK_WIDGET_NO_WINDOW (widget))
    {
      gdk_window_set_user_data (widget->window, NULL);
      gdk_window_destroy (widget->window);
    }

For more information about realizing, unrealizing, destroying, etc.,
you could take a look at docs/widget_system.txt, though it assumes
a fair bit of knowledge, and won't win any prizes as a work of
literature.

> I'm just trying to bunch togetehr
> functions to take allt he drawing code out og gtkbuttons.c into
> aseparate libraray ready for "replacement" for themeing - the default
> them library being exactly the routines we have now.?

I'll be curious to see how it works out.

Regards,
                                        Owen



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