]> git.saurik.com Git - wxWidgets.git/commitdiff
Don't directly include GTK+ semi-public headers.
authorVáclav Slavík <vslavik@fastmail.fm>
Sun, 6 Mar 2011 18:22:28 +0000 (18:22 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Sun, 6 Mar 2011 18:22:28 +0000 (18:22 +0000)
Only the main headers (e.g. gtk/gtk.h) should be included and GTK+ 3 is strict about this. Enable compile-time checks for this that work with GTK+ 2.24.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67137 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

configure
configure.in
include/wx/gtk/assertdlg_gtk.h
include/wx/gtk/private/messagetype.h
include/wx/gtk/private/win_gtk.h
src/gtk/assertdlg_gtk.c
src/gtk/eggtrayicon.c
src/gtk/eggtrayicon.h
src/gtk/print.cpp

index 3ccf8165e48880ed477fcd18530aed4d002a38a1..fb401de5bd3a6c4a94e79becbf61a3008441668f 100755 (executable)
--- a/configure
+++ b/configure
@@ -30954,6 +30954,9 @@ done
 
                 TOOLKIT_INCLUDE="$TOOLKIT_INCLUDE -DG_DISABLE_CAST_CHECKS"
 
+                GTK_CHECKS_FLAGS="-DGTK_DISABLE_SINGLE_INCLUDES"
+        TOOLKIT_INCLUDE="$TOOLKIT_INCLUDE $GTK_CHECKS_FLAGS"
+
         AFMINSTALL=afminstall
         TOOLKIT=GTK
         GUIDIST=GTK_DIST
index 8fd0b7a0e19de68c26836702ba23a5d602400ccf..141d4e83051cbd6254b1f8e7bd59a9546b2e10a6 100644 (file)
@@ -3101,6 +3101,10 @@ libraries returned by 'pkg-config gtk+-2.0 --libs' or 'gtk-config
         dnl disable GTK runtime type checks
         TOOLKIT_INCLUDE="$TOOLKIT_INCLUDE -DG_DISABLE_CAST_CHECKS"
 
+        dnl enable useful GTK+ compile-time checks to ease transition to GTK+ 3:
+        GTK_CHECKS_FLAGS="-DGTK_DISABLE_SINGLE_INCLUDES"
+        TOOLKIT_INCLUDE="$TOOLKIT_INCLUDE $GTK_CHECKS_FLAGS"
+
         AFMINSTALL=afminstall
         TOOLKIT=GTK
         GUIDIST=GTK_DIST
index ffd8b7885c649cd8a42ccad6a0ccbb1ca1025723..07d1b0f81694de611b57739a1d8fdaa36e940a34 100644 (file)
@@ -14,8 +14,7 @@
 extern "C" {
 #endif /* __cplusplus */
 
-#include <gtk/gtkdialog.h>
-#include <gtk/gtklabel.h>
+#include <gtk/gtk.h>
 
 #define GTK_TYPE_ASSERT_DIALOG            (gtk_assert_dialog_get_type ())
 #define GTK_ASSERT_DIALOG(object)         (G_TYPE_CHECK_INSTANCE_CAST ((object), GTK_TYPE_ASSERT_DIALOG, GtkAssertDialog))
index e532b22be71c244960d8f482d65e1fdacdb6b137..a2db2f29ff4f242cb19b8b4b4db410fe9d9bfcc1 100644 (file)
@@ -11,7 +11,7 @@
 #ifndef _GTK_PRIVATE_MSGTYPE_H_
 #define _GTK_PRIVATE_MSGTYPE_H_
 
-#include <gtk/gtkmessagedialog.h>
+#include <gtk/gtk.h>
 
 namespace wxGTKImpl
 {
index 153632b1e50f951193b9596aa6ab0fd8c192fd56..db1ddc06f0dfa3b94dd7ed1cd0e3047828ae27d3 100644 (file)
@@ -10,7 +10,7 @@
 #ifndef _WX_GTK_PIZZA_H_
 #define _WX_GTK_PIZZA_H_
 
-#include <gtk/gtkfixed.h>
+#include <gtk/gtk.h>
 
 #define WX_PIZZA(obj) G_TYPE_CHECK_INSTANCE_CAST(obj, wxPizza::type(), wxPizza)
 #define WX_IS_PIZZA(obj) G_TYPE_CHECK_INSTANCE_TYPE(obj, wxPizza::type())
index 5684000a2de5d9df91c2144d87811d7f753251d2..b1de25f36ab9e37309fb4f5da6a229af8c7b2c2c 100644 (file)
@@ -23,8 +23,6 @@ extern "C" {
 /* For FILE */
 #include <stdio.h>
 
-#include <gtk/gtkexpander.h>
-
 
 /* ----------------------------------------------------------------------------
    Constants
index 33cad3d058748a857714cadace8e24556926dabc..bd048ae634c57c74c94895ff74b71cf45a03a11a 100644 (file)
@@ -109,7 +109,7 @@ Anders
 
 #if wxUSE_TASKBARICON
 
-#include <gtk/gtkversion.h>
+#include <gtk/gtk.h>
 #if GTK_CHECK_VERSION(2, 1, 0)
 
 #include <string.h>
index 2596b82340c73e116ca9095a19b40d79a5349cf7..aee0346af42a4685665ed485a0b45d6572f64c66 100644 (file)
@@ -26,7 +26,7 @@
 #ifndef __EGG_TRAY_ICON_H__
 #define __EGG_TRAY_ICON_H__
 
-#include <gtk/gtkplug.h>
+#include <gtk/gtk.h>
 #ifdef GDK_WINDOWING_X11
 #include <gdk/gdkx.h>
 #endif
index 18835a2d39fce6871f2ed5e6437a87a1a6feed86..aefd2c2073185f38da7d450bc528a72ec04be6f7 100644 (file)
@@ -36,7 +36,7 @@
 #include "wx/paper.h"
 
 #include <gtk/gtk.h>
-#include <gtk/gtkpagesetupunixdialog.h>
+#include <gtk/gtkunixprint.h>
 
 #if wxUSE_GRAPHICS_CONTEXT
 #include "wx/graphics.h"