summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorGravatar waker <wakeroid@gmail.com>2010-11-05 22:13:31 +0100
committerGravatar waker <wakeroid@gmail.com>2010-11-05 22:13:31 +0100
commit0b1269a7704d0e89f690bddd9b63f6fb596dff33 (patch)
treebd6a949cad043fe40f2299f043714e7fbb490d2a /plugins
parentdf3e33e8a650c1c7f173156875bec73764bdd1f9 (diff)
added fallback gtkui plugin
Diffstat (limited to 'plugins')
-rw-r--r--plugins/gtkui/gtkui.c6
-rw-r--r--plugins/gtkui/gtkui.h14
2 files changed, 14 insertions, 6 deletions
diff --git a/plugins/gtkui/gtkui.c b/plugins/gtkui/gtkui.c
index f468f0c5..8c30f090 100644
--- a/plugins/gtkui/gtkui.c
+++ b/plugins/gtkui/gtkui.c
@@ -223,7 +223,7 @@ update_songinfo (gpointer ctx) {
void
set_tray_tooltip (const char *text) {
if (trayicon) {
-#if (GTK_MINOR_VERSION < 16)
+#if !GTK_CHECK_VERSION(2,16,0) || defined(ULTRA_COMPATIBLE)
gtk_status_icon_set_tooltip (trayicon, text);
#else
gtk_status_icon_set_tooltip_text (trayicon, text);
@@ -292,7 +292,7 @@ mainwin_toggle_visible (void) {
}
}
-#if GTK_MINOR_VERSION<=14
+#if !GTK_CHECK_VERSION(2,14,0) || defined(ULTRA_COMPATIBLE)
gboolean
on_trayicon_activate (GtkWidget *widget,
@@ -588,7 +588,7 @@ gtkui_update_status_icon (gpointer unused) {
g_object_set (trayicon, "visible", FALSE, NULL);
}
-#if GTK_MINOR_VERSION <= 14
+#if !GTK_CHECK_VERSION(2,14,0) || defined(ULTRA_COMPATIBLE)
g_signal_connect ((gpointer)trayicon, "activate", G_CALLBACK (on_trayicon_activate), NULL);
#else
g_signal_connect ((gpointer)trayicon, "scroll_event", G_CALLBACK (on_trayicon_scroll_event), NULL);
diff --git a/plugins/gtkui/gtkui.h b/plugins/gtkui/gtkui.h
index 53db09af..7cb2dff4 100644
--- a/plugins/gtkui/gtkui.h
+++ b/plugins/gtkui/gtkui.h
@@ -25,12 +25,20 @@
#include <gtk/gtk.h>
+#ifdef HAVE_CONFIG_H
+#include "../../config.h"
+#endif
+
+#if defined(ULTRA_COMPATIBLE)
+#warning compiling for compatibility with gtk <2.14
+#endif
+
// workaround to make older gtk compatible with vala codegen
-#if !GTK_CHECK_VERSION(2,14,0)
+#if !GTK_CHECK_VERSION(2,14,0) || defined(ULTRA_COMPATIBLE)
#define gtk_widget_get_window(widget) ((widget)->window)
#endif
-#if !GTK_CHECK_VERSION(2,18,0)
+#if !GTK_CHECK_VERSION(2,18,0) || defined(ULTRA_COMPATIBLE)
#define gtk_widget_set_has_window(widget, has_window) \
if (has_window) GTK_WIDGET_UNSET_FLAGS (widget, GTK_NO_WINDOW); \
else GTK_WIDGET_SET_FLAGS (widget, GTK_NO_WINDOW);
@@ -39,7 +47,7 @@
#define gtk_widget_get_has_window(widget) (!GTK_WIDGET_NO_WINDOW(widget))
#endif
-#if !GTK_CHECK_VERSION(2,20,0)
+#if !GTK_CHECK_VERSION(2,20,0) || defined(ULTRA_COMPATIBLE)
#define gtk_widget_get_realized(widget) (GTK_WIDGET_REALIZED(widget))
#endif