summaryrefslogtreecommitdiff
path: root/gtk/compat.c
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2015-04-09 11:41:06 +0100
committerVincent Sanders <vince@kyllikki.org>2015-04-09 11:41:06 +0100
commitae98fbe8c81712746073d10e328b02bfb454fda8 (patch)
tree492080c70509972b6ce894ff942007b3fd572d81 /gtk/compat.c
parent5a14a74ab193c1252cac62a94e019747aaad9d99 (diff)
downloadnetsurf-ae98fbe8c81712746073d10e328b02bfb454fda8.tar.gz
netsurf-ae98fbe8c81712746073d10e328b02bfb454fda8.tar.bz2
Only define compatability helpers for sexy icons if required.
The helper nsgtk_widget_get_state is only necessary for sexy icons and introduces unecessary GTK 3 compatability issues otehrwise.
Diffstat (limited to 'gtk/compat.c')
-rw-r--r--gtk/compat.c27
1 files changed, 17 insertions, 10 deletions
diff --git a/gtk/compat.c b/gtk/compat.c
index 0dea5aa31..c41a05e9c 100644
--- a/gtk/compat.c
+++ b/gtk/compat.c
@@ -25,8 +25,24 @@
#include "gtk/compat.h"
-#if !GTK_CHECK_VERSION(2,16,0)
+#ifdef _SEXY_ICON_ENTRY_H_
#include "gtk/sexy_icon_entry.c"
+
+/*
+ * exported interface documented in gtk/compat.h
+ *
+ * Only required for the lib sexy interface before 2.16
+ */
+GtkStateType nsgtk_widget_get_state(GtkWidget *widget)
+{
+#if GTK_CHECK_VERSION(2,18,0)
+ return gtk_widget_get_state(widget);
+#else
+ return GTK_WIDGET_STATE(widget);
+#endif
+}
+
+
#endif
void nsgtk_widget_set_can_focus(GtkWidget *widget, gboolean can_focus)
@@ -86,15 +102,6 @@ gboolean nsgtk_widget_is_drawable(GtkWidget *widget)
#endif
}
-GtkStateType nsgtk_widget_get_state(GtkWidget *widget)
-{
-#if GTK_CHECK_VERSION(2,18,0)
- return gtk_widget_get_state(widget);
-#else
- return GTK_WIDGET_STATE(widget);
-#endif
-}
-
void nsgtk_dialog_set_has_separator(GtkDialog *dialog, gboolean setting)
{
#if GTK_CHECK_VERSION(2,21,8)