summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2011-05-20 16:39:23 +0000
committerDavid Robillard <d@drobilla.net>2011-05-20 16:39:23 +0000
commitebed51d51b557112de26ed3f3750cb3fa3c3d975 (patch)
tree9b6f964e0a93fadc8a3294265aa9351fa4438aec
parenta8d19d25195f59dd47b398a1e640106cc9012a1d (diff)
downloadsuil-ebed51d51b557112de26ed3f3750cb3fa3c3d975.tar.gz
suil-ebed51d51b557112de26ed3f3750cb3fa3c3d975.tar.bz2
suil-ebed51d51b557112de26ed3f3750cb3fa3c3d975.zip
Fix compilation with ancient versions of Gtk2 (fix ticket #655).
git-svn-id: http://svn.drobilla.net/lad/trunk/suil@3299 a436a847-0d15-0410-975c-d299462d15a1
-rw-r--r--src/gtk2_in_qt4.cpp4
-rw-r--r--wscript7
2 files changed, 10 insertions, 1 deletions
diff --git a/src/gtk2_in_qt4.cpp b/src/gtk2_in_qt4.cpp
index 844e45b..2d18df7 100644
--- a/src/gtk2_in_qt4.cpp
+++ b/src/gtk2_in_qt4.cpp
@@ -51,9 +51,13 @@ suil_wrap(const char* host_type_uri,
QX11EmbedContainer* const wrapper = new QX11EmbedContainer();
wrapper->embedClient(gtk_plug_get_id(GTK_PLUG(plug)));
+#ifdef SUIL_OLD_GTK
+ wrapper->resize(widget->allocation.width, widget->allocation.height);
+#else
GtkAllocation alloc;
gtk_widget_get_allocation(widget, &alloc);
wrapper->resize(alloc.width, alloc.height);
+#endif
instance->host_widget = wrapper;
diff --git a/wscript b/wscript
index 1fed698..b57bc68 100644
--- a/wscript
+++ b/wscript
@@ -39,7 +39,12 @@ def configure(conf):
autowaf.check_header(conf, 'lv2/lv2plug.in/ns/extensions/ui/ui.h')
autowaf.check_pkg(conf, 'gtk+-2.0', uselib_store='GTK2',
- atleast_version='2.0.0', mandatory=False)
+ atleast_version='2.18.0', mandatory=False)
+ if not conf.env['HAVE_GTK2']:
+ autowaf.check_pkg(conf, 'gtk+-2.0', uselib_store='GTK2',
+ atleast_version='2.0.0', mandatory=False)
+ if conf.env['HAVE_GTK']:
+ autowaf.define('SUIL_OLD_GTK', 1)
autowaf.check_pkg(conf, 'QtGui', uselib_store='QT4',
atleast_version='4.0.0', mandatory=False)