Re: Parse error as GtkOldEditable is deprecated



Deepa <deepa chacko wipro com> writes:

> Hi
> 
> I am trying to build libraries (libgnome-desktop, libpanel-applet) with
> GTK_DISABLE_DEPRECATED
> set to true. Facing parse errors in gtktext.h.
> 
> gtktext.h is using a deprecated structure GtkOldEditable, which is
> defined in gtkoldeditable.h. Everything in gtkoldeditable.h is defined
> within #ifndef GTK_DISABLE_DEPRECATED. gtk.h is including gtktext.h.
> When I compile libpanel-applet with GTK_DISABLE_DEPRECATED set to TRUE,
> it gives the following error:
> 
> In file included from /root/INSTALL/include/gtk-2.0/gtk/gtk.h:134,
>                  from
> /root/INSTALL/include/libbonoboui-2.0/bonobo/bonobo-selector-widget.h:13,
> 
>                  from
> /root/INSTALL/include/libbonoboui-2.0/bonobo/bonobo-selector.h:20,
>                  from
> /root/INSTALL/include/libbonoboui-2.0/libbonoboui.h:29,
>                  from test-bonobo-applet.c:12:
> /root/INSTALL/include/gtk-2.0/gtk/gtktext.h:69: parse error before
> "GtkOldEditable"
> /root/INSTALL/include/gtk-2.0/gtk/gtktext.h:69: warning: no semicolon at
> end of struct or union
> /root/INSTALL/include/gtk-2.0/gtk/gtktext.h:115: parse error before ':'
> token
> /root/INSTALL/include/gtk-2.0/gtk/gtktext.h:116: parse error before ':'
> token
> /root/INSTALL/include/gtk-2.0/gtk/gtktext.h:119: parse error before ':'
> token
> /root/INSTALL/include/gtk-2.0/gtk/gtktext.h:170: parse error before '}'
> token
> /root/INSTALL/include/gtk-2.0/gtk/gtktext.h:174: parse error before
> "GtkOldEditableClass"
> /root/INSTALL/include/gtk-2.0/gtk/gtktext.h:174: warning: no semicolon
> at end of struct or union
> /root/INSTALL/include/gtk-2.0/gtk/gtktext.h:179: parse error before '}'
> token
> 
> This problem will be encountered in other libraries or applications
> which include gtktext.h directly or indirectly. How can I get around
> this problem??

There are two levels of deprecation in GTK+:

#ifndef GTK_DISABLE_DEPRECATED
#endif

And:

#ifdef GTK_ENABLE_BROKEN
#endif

The second level is a much stronger level than the first level;
it means that the feature is known not to work properly and has
only been left for temporary porting purposes.

GtkText is protected by GTK_ENABLE_BROKEN.

It looks like to get the above errors you are compiling with:

 -DGTK_ENABLE_BROKEN -DGTK_DISABLE_DEPRECATED

Which is nonsensical. ("I want the really broken stuff, but not
the stuff thta is just going to go away in a few years...")

Regards,
                                        Owen



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