[gtkmm] Fix the build with the latest GTK+ from git master.



commit f59be976f21ea89e15524ff8f6ea08836ae4419d
Author: Murray Cumming <murrayc murrayc com>
Date:   Sun Jan 30 16:25:29 2011 +0100

    Fix the build with the latest GTK+ from git master.
    
    * tools/extra_defs_gen/generate_defs_gtk.cc: Include gtkx.h and put ifdefs
    around the use of GTK_TYPE_PLUG and GTK_TYPE_SOCKET.
    * gtk/src/plug.ccg:
    * gtk/src/socket.ccg: Include the new gtkx.h header, because the
    declaration have moved.

 ChangeLog                                 |   10 ++++++++++
 gtk/src/plug.ccg                          |    2 +-
 gtk/src/plug.hg                           |    1 +
 gtk/src/socket.ccg                        |    2 +-
 tools/extra_defs_gen/generate_defs_gtk.cc |   13 ++++++++++---
 5 files changed, 23 insertions(+), 5 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 5cd8c86..2de3cd6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2011-01-30  Murray Cumming  <murrayc murrayc com>
+
+	Fix the build with the latest GTK+ from git master.
+	 
+	* tools/extra_defs_gen/generate_defs_gtk.cc: Include gtkx.h and put ifdefs 
+	around the use of GTK_TYPE_PLUG and GTK_TYPE_SOCKET.
+	* gtk/src/plug.ccg:
+	* gtk/src/socket.ccg: Include the new gtkx.h header, because the 
+	declaration have moved.
+
 2011-01-28  Murray Cumming  <murrayc murrayc com>
 
 	Fix make check.
diff --git a/gtk/src/plug.ccg b/gtk/src/plug.ccg
index f6a7236..23c0187 100644
--- a/gtk/src/plug.ccg
+++ b/gtk/src/plug.ccg
@@ -20,7 +20,7 @@
  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
-#include <gtk/gtk.h>
+#include <gtk/gtkx.h>
 
 namespace Gtk
 {
diff --git a/gtk/src/plug.hg b/gtk/src/plug.hg
index 493740e..768b25e 100644
--- a/gtk/src/plug.hg
+++ b/gtk/src/plug.hg
@@ -24,6 +24,7 @@ _PINCLUDE(gtkmm/private/window_p.h)
 namespace Gtk
 {
 
+//TODO: Documentation
 class Plug : public Window
 {
   _CLASS_GTKOBJECT(Plug, GtkPlug, GTK_PLUG, Gtk::Window, GtkWindow)
diff --git a/gtk/src/socket.ccg b/gtk/src/socket.ccg
index 2c974a4..85b7901 100644
--- a/gtk/src/socket.ccg
+++ b/gtk/src/socket.ccg
@@ -18,5 +18,5 @@
  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
-#include <gtk/gtk.h>
+#include <gtk/gtkx.h>
 
diff --git a/tools/extra_defs_gen/generate_defs_gtk.cc b/tools/extra_defs_gen/generate_defs_gtk.cc
index e9a5069..10a97c8 100644
--- a/tools/extra_defs_gen/generate_defs_gtk.cc
+++ b/tools/extra_defs_gen/generate_defs_gtk.cc
@@ -28,6 +28,11 @@
 #include <glibmm_generate_extra_defs/generate_extra_defs.h>
 #include <gdk/gdk.h>
 #include <gtk/gtk.h>
+
+#ifdef GDK_WINDOWING_X11
+#include <gtk/gtkx.h>
+#endif
+
 #ifndef G_OS_WIN32
 # include <gtk/gtkunixprint.h>
 #endif
@@ -133,8 +138,10 @@ int main(int argc, char** argv)
             << get_defs( GTK_TYPE_OFFSCREEN_WINDOW )
             << get_defs( GTK_TYPE_ORIENTABLE )
             << get_defs( GTK_TYPE_PANED )
-#if !defined(G_OS_WIN32)
+#ifdef GDK_WINDOWING_X11
             << get_defs( GTK_TYPE_PLUG )
+#endif
+#if !defined(G_OS_WIN32) 
             << get_defs( GTK_TYPE_PRINTER )
             << get_defs( GTK_TYPE_PRINT_JOB )
 #endif /* G_OS_WIN32 */
@@ -167,9 +174,9 @@ int main(int argc, char** argv)
             << get_defs( GTK_TYPE_SEPARATOR_TOOL_ITEM )
             << get_defs( GTK_TYPE_SETTINGS )
             << get_defs( GTK_TYPE_SIZE_GROUP )
-#if !defined(G_OS_WIN32)
+#ifdef GDK_WINDOWING_X11
             << get_defs( GTK_TYPE_SOCKET )
-#endif /* G_OS_WIN32 */
+#endif
             << get_defs( GTK_TYPE_SPINNER )
             << get_defs( GTK_TYPE_SPIN_BUTTON )
             << get_defs( GTK_TYPE_STATUSBAR )



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]