GNOME Bugzilla – Bug 562937
No accessor functions for GtkWidget flags that work when compiling with -DGSEAL_ENABLE
Last modified: 2010-02-03 01:38:02 UTC
Please describe the problem: I read about using -DGSEAL_ENABLE when compiling a GTK+ application so I decided to try it out on the project I work on called Wireshark. I ran into a problem with GTK_WIDGET_SET_FLAGS. The compiler error is: color_edit_dlg.c:481: error: 'struct _GtkObject' has no member named 'flags' - line 481 reads: GTK_WIDGET_SET_FLAGS (color_sel_ok, GTK_CAN_DEFAULT); I cannot find an accessor function to modify the flags that isn't blocked by the GSEAL functionality. Does one exist? if not, could you add one? :) Steps to reproduce: For an application that uses GTK_WIDGET_SET_FLAGS: 1. Set CFLAGS to -DGSEAL_ENABLE 2. (Re-)run the configure script 3. Wait for compiler error Actual results: I receive a compiler error such as the one mentioned in the description of this bug Expected results: One of two things: (a) The compiler happily keeps moving along since GTK_WIDGET_SET_FLAGS isn't deprecated from what I can tell or (b) I receive the error but am able to replace the call to GTK_WIDGET_SET_FLAGS with another function that will compile cleanly Does this happen every time? Yes. Other information: I'm using the latest GTK+ SVN revision as of this writing (21839).
Widget flags should be deprecated as part of the public API. Please have a look at bug 69872.
Something that could work would be this: > #include <gtk/gtk.h> > #undef GTK_OBJECT_FLAGS > #define GTK_OBJECT_FLAGS(i) (GTK_OBJECT (i)->GSEAL(flags)) Regards
So why do the macro still exists if they are deprecated? I was starting to get AbiWord to build with GSEAL enabled, but between these macros missing and the requirement to bump to gtk 2.14, it looks like it is gonna be an issue. (AbiWord builds with GTK_DISABLE_DEPRECATED).
The macros will be deprecated when I have managed to get all of Christian's patches discussed and committed. I'm working on it.
As meintioned before, this is really a duplicate of bug #69872 *** This bug has been marked as a duplicate of bug 69872 ***