GNOME Bugzilla – Bug 563569
GNOME Goal: Clean up GLib and GTK+ includes
Last modified: 2008-12-07 20:56:15 UTC
Correct applications or libraries that don't include *only* toplevel headers for GLib, GTK, GDK and gdk-pixbuf. This will be useful to prepare GTK 3.0 migration. See also http://live.gnome.org/GnomeGoals/CleanupGTKIncludes
Created attachment 124106 [details] [review] simple patch
I already had fixed it this morning. Also, the patch is slightly wrong, as you shouldn't remove the *private.h headers from the sources.
AFAIR, it was building without the *private header. Thanks for fixing it.
Oh, seems that test/test.h needs a quick fix too: Index: test/test.h =================================================================== --- test/test.h (révision 2201) +++ test/test.h (copie de travail) @@ -1,7 +1,7 @@ #ifndef TEST_H #define TEST_H -#include <gtk/gtkwindow.h> +#include <gtk/gtk.h> void test_init (int *argc, char ***argv);
And seems I was right for gtkprivate.h in eel-background.c, as it generates a build error. That line should be removed. Look at my patch.
gtkprivate.h isn't part of gtk/gtk.h, so it should be included manually, but third party applications/libraries shouldn't ever have the need to include it. If you compile an application with -DGTK_DISABLE_DEPRECATED and gtkprivate.h is included, you will always get an error, as gtkprivate.h itself includes gtk/gtkwidget.h, which is forbidden by the cflag. If anything, this is a bug in GTK+, though an application that includes gtkprivate.h could be considered to some extent buggy itself :P Anyway, I fixed this in trunk by removing the include altogether (it wasn't needed anyway...it was a leftover from an old hack) and I also committed your fix to test.h. Closing as FIXED, thanks for your work. 2008-12-07 Cosimo Cecchi <cosimoc@gnome.org> * eel/eel-background.c: * test/test.h: Remove more useless includes. Thanks to Luis Menina (#563569).