After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 562937 - No accessor functions for GtkWidget flags that work when compiling with -DGSEAL_ENABLE
No accessor functions for GtkWidget flags that work when compiling with -DGSE...
Status: RESOLVED DUPLICATE of bug 69872
Product: gtk+
Classification: Platform
Component: Widget: Other
unspecified
Other All
: Normal minor
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on: 69872
Blocks: 585185 585210 588591
 
 
Reported: 2008-12-02 02:24 UTC by Stephen Fisher
Modified: 2010-02-03 01:38 UTC
See Also:
GNOME target: 2.30.x
GNOME version: ---



Description Stephen Fisher 2008-12-02 02:24:09 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).
Comment 1 Christian Dywan 2008-12-02 06:22:55 UTC
Widget flags should be deprecated as part of the public API. Please have a look at bug 69872. 
Comment 2 Sven Herzberg 2009-03-26 12:56:49 UTC
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
Comment 3 Hubert Figuiere (:hub) 2009-04-13 23:24:49 UTC
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).
Comment 4 Michael Natterer 2009-07-30 10:07:33 UTC
The macros will be deprecated when I have managed to get all of Christian's
patches discussed and committed. I'm working on it.
Comment 5 Javier Jardón (IRC: jjardon) 2010-02-03 01:35:24 UTC
As meintioned before, this is really a duplicate of bug #69872

*** This bug has been marked as a duplicate of bug 69872 ***