--- src/devicewidget.h.orig	2012-09-25 13:02:30.000000000 +0100
+++ src/devicewidget.h	2012-09-25 13:06:29.000000000 +0100
@@ -97,7 +97,11 @@
     Gtk::HBox *portSelect, *offsetSelect;
     Gtk::ComboBox *portList;
     Glib::RefPtr<Gtk::ListStore> treeModel;
+#ifdef HAVE_GTK3
     Glib::RefPtr<Gtk::Adjustment> offsetAdjustment;
+#else
+    Gtk::Adjustment* offsetAdjustment;
+#endif
 
 private:
     Glib::ustring mDeviceType;
--- src/devicewidget.cc.orig	2012-09-25 13:02:25.000000000 +0100
+++ src/devicewidget.cc	2012-09-25 13:06:12.000000000 +0100
@@ -62,8 +62,12 @@
     for (unsigned i = 0; i < PA_CHANNELS_MAX; i++)
         channelWidgets[i] = NULL;
 
+#ifdef HAVE_GTK3
     offsetAdjustment = Gtk::Adjustment::create(0.0, -2000.0, 2000.0, 10.0, 50.0, 0.0);
-    offsetButton->configure(offsetAdjustment, 0, 2);
+#else
+    offsetAdjustment = new Gtk::Adjustment(0.0, -2000.0, 2000.0, 10.0, 50.0, 0.0);
+#endif
+    offsetButton->configure(*offsetAdjustment, 0, 2);
 }
 
 void DeviceWidget::init(MainWindow* mainWindow, Glib::ustring deviceType) {

