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 563569 - GNOME Goal: Clean up GLib and GTK+ includes
GNOME Goal: Clean up GLib and GTK+ includes
Status: RESOLVED FIXED
Product: eel
Classification: Deprecated
Component: general
CVS HEAD
Other Linux
: Normal trivial
: ---
Assigned To: Nautilus Maintainers
Nautilus Maintainers
Depends on:
Blocks: 563413
 
 
Reported: 2008-12-07 15:59 UTC by Luis Menina
Modified: 2008-12-07 20:56 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
simple patch (2.62 KB, patch)
2008-12-07 16:01 UTC, Luis Menina
rejected Details | Review

Description Luis Menina 2008-12-07 15:59:21 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
Comment 1 Luis Menina 2008-12-07 16:01:49 UTC
Created attachment 124106 [details] [review]
simple patch
Comment 2 Cosimo Cecchi 2008-12-07 19:06:43 UTC
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.
Comment 3 Luis Menina 2008-12-07 19:35:24 UTC
AFAIR, it was building without the *private header. Thanks for fixing it.
Comment 4 Luis Menina 2008-12-07 20:15:04 UTC
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);
Comment 5 Luis Menina 2008-12-07 20:18:16 UTC
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.
Comment 6 Cosimo Cecchi 2008-12-07 20:56:15 UTC
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).