]> asedeno.scripts.mit.edu Git - PuTTY.git/commitdiff
GTK 3 prep: do not include individual GTK/GDK headers.
authorSimon Tatham <anakin@pobox.com>
Sat, 8 Aug 2015 14:06:15 +0000 (15:06 +0100)
committerSimon Tatham <anakin@pobox.com>
Sat, 8 Aug 2015 14:10:43 +0000 (15:10 +0100)
This is the first of several cleanup steps recommended by the GTK 2->3
migration guide.

I intend to begin work towards compatibility with GTK 3, but without
breaking GTK 2 and even GTK 1 compatibility in the process; GTK 2 is
still useful to _me_ (not least because it permits much easier support
of old-style server-side X11 fonts), and I recall hearing a rumour
that at least one kind of strange system can only run GTK 1, so for
the moment I don't intend to stop supporting either.

Including gdkkeysyms.h is not optional in GTK 2, because gdk.h does
not include it. In GTK 3 it does, so we don't explicitly reinclude it
ourselves.

We now build cleanly in GTK2 with -DGTK_DISABLE_SINGLE_INCLUDES. (But
that doesn't say much, because we did already! Apparently gdkkeysyms.h
was a special case which that #define didn't forbid.)

unix/gtkask.c
unix/gtkdlg.c
unix/gtkfont.c
unix/gtkwin.c

index f21ff0a1f08afa4b207223cd60f67122bbc3464a..389468421b4e40a403f9b7c980dd47c152262489 100644 (file)
@@ -9,7 +9,10 @@
 #include <unistd.h>
 
 #include <gtk/gtk.h>
+#include <gdk/gdk.h>
+#if !GTK_CHECK_VERSION(3,0,0)
 #include <gdk/gdkkeysyms.h>
+#endif
 
 #include "gtkcompat.h"
 
index 6c532024c488febf3b6784ad4d064f1a3d5cf00a..282396e692950ad7dda06aa95e283f01bf9043cf 100644 (file)
@@ -7,7 +7,9 @@
 #include <ctype.h>
 #include <time.h>
 #include <gtk/gtk.h>
+#if !GTK_CHECK_VERSION(3,0,0)
 #include <gdk/gdkkeysyms.h>
+#endif
 #include <gdk/gdkx.h>
 #include <X11/Xlib.h>
 #include <X11/Xutil.h>
index d776dfa5b56128c298cf41cf956249cb35ec133c..012dfea1d9598c7dbe5ebc1f891e7a3dfa507929 100644 (file)
@@ -13,7 +13,9 @@
 #include <stdlib.h>
 #include <string.h>
 #include <gtk/gtk.h>
+#if !GTK_CHECK_VERSION(3,0,0)
 #include <gdk/gdkkeysyms.h>
+#endif
 #include <gdk/gdkx.h>
 #include <X11/Xlib.h>
 #include <X11/Xutil.h>
index e8345881cd803d391da8aa1ccf6fdca7433bd99f..6f59f687eada33c8ef41f72671b953809861edf8 100644 (file)
@@ -19,7 +19,9 @@
 #include <sys/types.h>
 #include <sys/wait.h>
 #include <gtk/gtk.h>
+#if !GTK_CHECK_VERSION(3,0,0)
 #include <gdk/gdkkeysyms.h>
+#endif
 #include <gdk/gdkx.h>
 #include <X11/Xlib.h>
 #include <X11/Xutil.h>