Re: [gtk-list] Re: Dynamic Style/Color change - I don't find the solution...



-----BEGIN PGP SIGNED MESSAGE-----

Hi Tim !

Tim Janik <timj@gtk.org> writes:
> GtkStyles use regular reference counting and thus they usually get destroyed
> automatically once their use count drops to zero.

Ah. Very good.

> though while looking at the code, i just figured there seems to be a
> possibility for some inconsistent referencing situations, but that needs
> further investigation.

In the toolkit itself, you mean ?
 
> > How are the widget styles handled ?? Does the old one get destroyed
> >     gtk_widget_set_style(button, style);
> hm, actuually you should call
>   gtk_style_unref (style);
> after gtk_widget_set_style(), because gtk_style_copy() sets up the reference
> count with one, and gtk_widget_set_style() cares about referencing
> the style on its own.

Ah. Thanks a lot - I am doing that now and it appears to work just
fine.

Thanks a lot for your help !

Later,
	Georg

- -- 
Georg C. F. Greve <greve@fusebox.hanse.de>
http://porter.desy.de/~greve/ - ICQ#10016966
"People who fight may lose. People who do not
fight have already lost." -- Bertolt Brecht

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv
Comment: Processed

iQCVAwUBNaOMp1ZXgZXDxqJtAQFwmAP+JrpZWPjpNhJ+qP97laKgLCHlUGaPv8W7
EANAQUNyRzyCz1nDMvMNq36UK/mV09B4bfMChLv64P+KfxJAeLQNHtvtRAjME0jH
oqpFTOELxHJsjtuth0MbJmBBUMtBN4/ZUr8Fgzea2U4rNRuDtfXfYtPP14yIFO8B
YWUisfiEiTM=
=mzmh
-----END PGP SIGNATURE-----



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