Re: none



On 13 Dec 2000, Havoc Pennington wrote:

> 
> Tim Janik <timj gtk org> writes: 
> > what? how's GtkObject deprecated?
> > 
> 
> It has exactly one feature not found in GObject, which is the
> "destroy" signal. Our claim is that "destroy" is only useful for GUI
> objects, so "destroy" should really be in GtkWidget. So GtkObject is
> just legacy cruft.

well, to be technically correct, GtkObject has the ::destroy signal,
weak references, flags, introduces the floating state, has
get_arg/set_arg compatibility code and introduces the user_data property
(though of questionable benefit since GObject now supports a property
data::user_data).

> Granted, it's legacy cruft we are never going to remove, since it
> would be too painful. But newly-written user code should only be using
> GtkObject for the "destroy" signal, and never using it otherwise. So
> GtkObject is deprecated (i.e. not recommended that you use it), though
> not deprecated in the sense that we are going to remove it.
> 
> You should never type a function that begins gtk_object_ anymore and
> you should never use the GTK_OBJECT() cast, because in all cases you
> should be using GObject or GtkWidget. The only legit way to use
> GtkObject is too connect to "destroy".

for one, GTK_OBJECT() and gtk_object_* will never vanish, so i don't
think it's usefull to deprecate usage of those functions.
for another, i'm not going to promise that GtkObject will not be extended
in the future, while i don't have any current plans in that regard, i'm
not sure those won't popup with new developments/demands.
that's why i wouldn't call it "deprecated", you're right though, that
with 2.0, when people use GtkObject, they most probably could do away with
either GtkWidget or GObject.

> 
> Havoc
> 
> 

---
ciaoTJ





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