[pulseaudio-commits] src/devicewidget.cc src/devicewidget.h

Tanu Kaskinen tanuk at kemper.freedesktop.org
Mon Mar 11 04:25:37 PDT 2013


 src/devicewidget.cc |    5 +++++
 src/devicewidget.h  |    4 ++++
 2 files changed, 9 insertions(+)

New commits:
commit 0d7cbc57a01ecb2f6e86c183fbba22c30ca06a06
Author: Alam Arias <alam.gbc at gmail.com>
Date:   Fri Mar 8 14:27:02 2013 -0500

    added back support for gtkmm-2.4 builds

diff --git a/src/devicewidget.cc b/src/devicewidget.cc
index 1c34ea6..1a148ee 100644
--- a/src/devicewidget.cc
+++ b/src/devicewidget.cc
@@ -63,8 +63,13 @@ DeviceWidget::DeviceWidget(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Buil
     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);
+    offsetButton->configure(*offsetAdjustment, 0.0, 2);
+#endif  /* HAVE_GTK3 */
 }
 
 void DeviceWidget::init(MainWindow* mainWindow, Glib::ustring deviceType) {
diff --git a/src/devicewidget.h b/src/devicewidget.h
index d2dff51..586c2cf 100644
--- a/src/devicewidget.h
+++ b/src/devicewidget.h
@@ -98,7 +98,11 @@ protected:
     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 /* HAVE_GTK3 */
 
 private:
     Glib::ustring mDeviceType;



More information about the pulseaudio-commits mailing list