pavucontrol-gtk2.patch 1.3 KB

123456789101112131415161718192021222324252627282930313233
  1. diff -u -r pavucontrol-2.0.orig/src/devicewidget.cc pavucontrol-2.0/src/devicewidget.cc
  2. --- pavucontrol-2.0.orig/src/devicewidget.cc 2014-11-10 10:30:36.273878918 +0900
  3. +++ pavucontrol-2.0/src/devicewidget.cc 2014-11-10 10:39:18.554891364 +0900
  4. @@ -63,8 +63,13 @@
  5. for (unsigned i = 0; i < PA_CHANNELS_MAX; i++)
  6. channelWidgets[i] = NULL;
  7. +#ifdef HAVE_GTK3
  8. offsetAdjustment = Gtk::Adjustment::create(0.0, -2000.0, 2000.0, 10.0, 50.0, 0.0);
  9. offsetButton->configure(offsetAdjustment, 0, 2);
  10. +#else
  11. + offsetAdjustment = new Gtk::Adjustment(0.0, -2000.0, 2000.0, 10.0, 50.0, 0.0);
  12. + offsetButton->configure(*offsetAdjustment, 0, 2);
  13. +#endif
  14. }
  15. void DeviceWidget::init(MainWindow* mainWindow, Glib::ustring deviceType) {
  16. diff -u -r pavucontrol-2.0.orig/src/devicewidget.h pavucontrol-2.0/src/devicewidget.h
  17. --- pavucontrol-2.0.orig/src/devicewidget.h 2014-11-10 10:30:36.273878918 +0900
  18. +++ pavucontrol-2.0/src/devicewidget.h 2014-11-10 10:39:12.869891228 +0900
  19. @@ -98,7 +98,11 @@
  20. Gtk::HBox *portSelect, *offsetSelect;
  21. Gtk::ComboBox *portList;
  22. Glib::RefPtr<Gtk::ListStore> treeModel;
  23. +#ifdef HAVE_GTK3
  24. Glib::RefPtr<Gtk::Adjustment> offsetAdjustment;
  25. +#else
  26. + Gtk::Adjustment *offsetAdjustment;
  27. +#endif
  28. private:
  29. Glib::ustring mDeviceType;