summaryrefslogtreecommitdiffstats
path: root/gtk
diff options
context:
space:
mode:
Diffstat (limited to 'gtk')
-rw-r--r--gtk/src/audiohandler.c2
-rw-r--r--gtk/src/callbacks.c4
-rw-r--r--gtk/src/ghbcellrenderertext.c2
-rw-r--r--gtk/src/ghbcompat.h19
-rw-r--r--gtk/src/ghbcompositor.c2
-rw-r--r--gtk/src/hb-backend.c2
-rw-r--r--gtk/src/icons.c2
-rw-r--r--gtk/src/main.c2
-rw-r--r--gtk/src/presets.c2
-rw-r--r--gtk/src/preview.c2
-rw-r--r--gtk/src/queuehandler.c3
-rw-r--r--gtk/src/resources.c2
-rw-r--r--gtk/src/settings.c2
-rw-r--r--gtk/src/subtitlehandler.c2
-rw-r--r--gtk/src/x264handler.c2
15 files changed, 34 insertions, 16 deletions
diff --git a/gtk/src/audiohandler.c b/gtk/src/audiohandler.c
index c52b2cd14..d44960a04 100644
--- a/gtk/src/audiohandler.c
+++ b/gtk/src/audiohandler.c
@@ -11,7 +11,7 @@
* any later version.
*/
-#include <gtk/gtk.h>
+#include "ghbcompat.h"
#include "hb.h"
#include "settings.h"
#include "hb-backend.h"
diff --git a/gtk/src/callbacks.c b/gtk/src/callbacks.c
index 9bc2dd7cc..aead002b3 100644
--- a/gtk/src/callbacks.c
+++ b/gtk/src/callbacks.c
@@ -30,6 +30,8 @@
#include <netinet/in.h>
#include <netdb.h>
+#include "ghbcompat.h"
+
#if !defined(_NO_UPDATE_CHECK)
#if defined(_OLD_WEBKIT)
#include <webkit.h>
@@ -50,8 +52,6 @@
#include <dbt.h>
#endif
-#include <gtk/gtk.h>
-#include <gdk/gdkkeysyms.h>
#include <glib/gstdio.h>
#include <gio/gio.h>
diff --git a/gtk/src/ghbcellrenderertext.c b/gtk/src/ghbcellrenderertext.c
index abaf9694c..6f6329057 100644
--- a/gtk/src/ghbcellrenderertext.c
+++ b/gtk/src/ghbcellrenderertext.c
@@ -19,7 +19,7 @@
#include <config.h>
#include <stdlib.h>
-#include <gtk/gtk.h>
+#include "ghbcompat.h"
#include <glib/gi18n-lib.h>
#include <gtk/gtkmarshal.h>
//#include <gtk/gtkeditable.h>
diff --git a/gtk/src/ghbcompat.h b/gtk/src/ghbcompat.h
new file mode 100644
index 000000000..911f13262
--- /dev/null
+++ b/gtk/src/ghbcompat.h
@@ -0,0 +1,19 @@
+#if !defined(_GHB_COMPAT_H_)
+#define _GHB_COMPAT_H_
+
+#include <gtk/gtk.h>
+#include <gdk/gdk.h>
+
+#if !GTK_CHECK_VERSION(3, 0, 0)
+#include <gdk/gdkkeysyms.h>
+#endif
+
+// Define any keys not defined by older GDK versions
+#if !defined(GDK_KEY_Delete)
+#define GDK_KEY_Delete GDK_Delete
+#define GDK_KEY_Return GDK_Return
+#define GDK_KEY_Down GDK_Down
+#define GDK_KEY_Up GDK_Up
+#endif
+
+#endif // _GHB_COMPAT_H_
diff --git a/gtk/src/ghbcompositor.c b/gtk/src/ghbcompositor.c
index eb46cde50..c67181ebf 100644
--- a/gtk/src/ghbcompositor.c
+++ b/gtk/src/ghbcompositor.c
@@ -27,7 +27,7 @@
#include <config.h>
#include <stdlib.h>
-#include <gtk/gtk.h>
+#include "ghbcompat.h"
#include <gtk/gtkprivate.h>
#include <gtk/gtkmarshal.h>
#include "ghbcompositor.h"
diff --git a/gtk/src/hb-backend.c b/gtk/src/hb-backend.c
index 17f0af853..e0ee19c3b 100644
--- a/gtk/src/hb-backend.c
+++ b/gtk/src/hb-backend.c
@@ -25,7 +25,7 @@
#include <limits.h>
#include <math.h>
#include "hb.h"
-#include <gtk/gtk.h>
+#include "ghbcompat.h"
#include <glib/gstdio.h>
#include "hb-backend.h"
#include "settings.h"
diff --git a/gtk/src/icons.c b/gtk/src/icons.c
index 905497631..2fec1540e 100644
--- a/gtk/src/icons.c
+++ b/gtk/src/icons.c
@@ -1,4 +1,4 @@
-#include <gtk/gtk.h>
+#include "ghbcompat.h"
#include "icon_tools.h"
#include "values.h"
#include "resources.h"
diff --git a/gtk/src/main.c b/gtk/src/main.c
index f55abd348..176f0f489 100644
--- a/gtk/src/main.c
+++ b/gtk/src/main.c
@@ -32,7 +32,7 @@
#include <config.h>
-#include <gtk/gtk.h>
+#include "ghbcompat.h"
#if defined(_ENABLE_GST)
#include <gst/gst.h>
diff --git a/gtk/src/presets.c b/gtk/src/presets.c
index 4d7217f8a..b3815f032 100644
--- a/gtk/src/presets.c
+++ b/gtk/src/presets.c
@@ -19,7 +19,7 @@
#include <glib-object.h>
#include <glib/gstdio.h>
#include <string.h>
-#include <gtk/gtk.h>
+#include "ghbcompat.h"
#include "hb.h"
#include "settings.h"
#include "callbacks.h"
diff --git a/gtk/src/preview.c b/gtk/src/preview.c
index 1023ade6d..e4381d036 100644
--- a/gtk/src/preview.c
+++ b/gtk/src/preview.c
@@ -15,7 +15,7 @@
#include <glib.h>
#include <glib/gstdio.h>
#include <glib-object.h>
-#include <gtk/gtk.h>
+#include "ghbcompat.h"
#if !defined(_WIN32)
#include <gdk/gdkx.h>
diff --git a/gtk/src/queuehandler.c b/gtk/src/queuehandler.c
index dfa0e1738..7fd6a82da 100644
--- a/gtk/src/queuehandler.c
+++ b/gtk/src/queuehandler.c
@@ -11,8 +11,7 @@
* any later version.
*/
-#include <gtk/gtk.h>
-#include <gdk/gdkkeysyms.h>
+#include "ghbcompat.h"
#include <glib/gstdio.h>
#include <gio/gio.h>
#include "hb.h"
diff --git a/gtk/src/resources.c b/gtk/src/resources.c
index e4252140f..c2255013f 100644
--- a/gtk/src/resources.c
+++ b/gtk/src/resources.c
@@ -15,7 +15,7 @@
#include <glib-object.h>
#include <glib/gstdio.h>
#include <string.h>
-#include <gtk/gtk.h>
+#include "ghbcompat.h"
#include "settings.h"
#include "plist.h"
#include "resources.h"
diff --git a/gtk/src/settings.c b/gtk/src/settings.c
index 46e2de941..2fe0b5e6d 100644
--- a/gtk/src/settings.c
+++ b/gtk/src/settings.c
@@ -16,7 +16,7 @@
#include <glib.h>
#include <glib/gstdio.h>
#include <string.h>
-#include <gtk/gtk.h>
+#include "ghbcompat.h"
#include "settings.h"
#include "hb-backend.h"
#include "values.h"
diff --git a/gtk/src/subtitlehandler.c b/gtk/src/subtitlehandler.c
index 0746b2631..14d3da0a0 100644
--- a/gtk/src/subtitlehandler.c
+++ b/gtk/src/subtitlehandler.c
@@ -11,7 +11,7 @@
* any later version.
*/
-#include <gtk/gtk.h>
+#include "ghbcompat.h"
#include "hb.h"
#include "settings.h"
#include "hb-backend.h"
diff --git a/gtk/src/x264handler.c b/gtk/src/x264handler.c
index d7602f768..86bdb4a11 100644
--- a/gtk/src/x264handler.c
+++ b/gtk/src/x264handler.c
@@ -11,7 +11,7 @@
* any later version.
*/
-#include <gtk/gtk.h>
+#include "ghbcompat.h"
#include <string.h>
#include "settings.h"
#include "values.h"