[pulseaudio-discuss] A few pulseadio related issues
Rafał Mużyło
galtgendo at gmail.com
Sat Feb 26 15:33:49 PST 2011
Awhile ago, I filed a ticket about pulseaudio crashing on stopping
second copy of xserver if first was 'startx' and second 'startx -- :1'.
Seems it's going to be resolved as WONTFIX, but I want to note something
that suggests it could be at least partially fixed: one day, when I was
switching my session manager to a different one, while first copy of
xserver was still running under the old one, one that was running in the
new one (again, 'startx -- :1') could be ended without crash. That
obviously lasted only till the restart.
Now, as I follow some of the posts on the list, it seems that
pavucontrol will get some updates soon. As libglade was declared
deprecated by its upstream awhile ago, I'm attaching a patch dropping
libglademm dep and a gtkbuilder file (auto-converted by glade).
On that note: module-device-manager isn't present in the config file
from the tarball, yet git of pavucontrol complains if it's not present.
Is that module considered stable by now ?
-------------- next part --------------
diff --git a/configure.ac b/configure.ac
index 96613ba..beb33f3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -39,7 +39,7 @@ AC_PROG_LN_S
AC_TYPE_SIGNAL
AC_HEADER_STDC
-PKG_CHECK_MODULES(GUILIBS, [ gtkmm-2.4 >= 2.16 libglademm-2.4 sigc++-2.0 libcanberra-gtk >= 0.16 ])
+PKG_CHECK_MODULES(GUILIBS, [ gtkmm-2.4 >= 2.16 sigc++-2.0 libcanberra-gtk >= 0.16 ])
AC_SUBST(GUILIBS_CFLAGS)
AC_SUBST(GUILIBS_LIBS)
diff --git a/src/Makefile.am b/src/Makefile.am
index 7257260..7c668fd 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -40,8 +40,8 @@ pavucontrol_SOURCES= \
i18n.h
pavucontrol_LDADD=$(AM_LDADD) $(GUILIBS_LIBS) $(PULSE_LIBS)
-pavucontrol_CXXFLAGS=$(AM_CXXFLAGS) $(GUILIBS_CFLAGS) $(PULSE_CFLAGS) -DLOCALEDIR=\"$(localedir)\"
-pavucontrol_CXXFLAGS+=-DGLADE_FILE=\"$(gladedir)/pavucontrol.glade\"
+pavucontrol_CPPFLAGS=$(AM_CXXFLAGS) $(GUILIBS_CFLAGS) $(PULSE_CFLAGS) -DLOCALEDIR=\"$(localedir)\"
+pavucontrol_CPPFLAGS+=-DGLADE_FILE=\"$(gladedir)/pavucontrol.glade\"
#pavucontrol_CXXFLAGS+=-DGLADE_FILE=\"pavucontrol.glade\"
EXTRA_DIST = $(glade_DATA) $(desktop_in_files)
diff --git a/src/cardwidget.cc b/src/cardwidget.cc
index c8efd31..c79ac6c 100644
--- a/src/cardwidget.cc
+++ b/src/cardwidget.cc
@@ -27,7 +27,7 @@
#include "i18n.h"
/*** CardWidget ***/
-CardWidget::CardWidget(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& x) :
+CardWidget::CardWidget(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>& x) :
Gtk::VBox(cobject) {
x->get_widget("nameLabel", nameLabel);
@@ -43,7 +43,7 @@ CardWidget::CardWidget(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade:
CardWidget* CardWidget::create() {
CardWidget* w;
- Glib::RefPtr<Gnome::Glade::Xml> x = Gnome::Glade::Xml::create(GLADE_FILE, "cardWidget");
+ Glib::RefPtr<Gtk::Builder> x = Gtk::Builder::create_from_file(GLADE_FILE, "cardWidget");
x->get_widget_derived("cardWidget", w);
return w;
}
diff --git a/src/cardwidget.h b/src/cardwidget.h
index ca90273..3837d5b 100644
--- a/src/cardwidget.h
+++ b/src/cardwidget.h
@@ -25,7 +25,7 @@
class CardWidget : public Gtk::VBox {
public:
- CardWidget(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& x);
+ CardWidget(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>& x);
static CardWidget* create();
Gtk::Label *nameLabel;
diff --git a/src/channelwidget.cc b/src/channelwidget.cc
index bcfcd82..21f3afa 100644
--- a/src/channelwidget.cc
+++ b/src/channelwidget.cc
@@ -31,7 +31,7 @@ static bool show_decibel = true;
/*** ChannelWidget ***/
-ChannelWidget::ChannelWidget(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& x) :
+ChannelWidget::ChannelWidget(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>& x) :
Gtk::EventBox(cobject),
volumeScaleEnabled(true) {
@@ -47,7 +47,9 @@ ChannelWidget::ChannelWidget(BaseObjectType* cobject, const Glib::RefPtr<Gnome::
ChannelWidget* ChannelWidget::create() {
ChannelWidget* w;
- Glib::RefPtr<Gnome::Glade::Xml> x = Gnome::Glade::Xml::create(GLADE_FILE, "channelWidget");
+ Glib::RefPtr<Gtk::Builder> x = Gtk::Builder::create();
+ x->add_from_file(GLADE_FILE, "adjustment1");
+ x->add_from_file(GLADE_FILE, "channelWidget");
x->get_widget_derived("channelWidget", w);
return w;
}
diff --git a/src/channelwidget.h b/src/channelwidget.h
index b15fe84..26a880c 100644
--- a/src/channelwidget.h
+++ b/src/channelwidget.h
@@ -27,7 +27,7 @@ class MinimalStreamWidget;
class ChannelWidget : public Gtk::EventBox {
public:
- ChannelWidget(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& x);
+ ChannelWidget(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>& x);
static ChannelWidget* create();
void setVolume(pa_volume_t volume);
diff --git a/src/devicewidget.cc b/src/devicewidget.cc
index 0798e42..9a75970 100644
--- a/src/devicewidget.cc
+++ b/src/devicewidget.cc
@@ -31,7 +31,7 @@
#include "i18n.h"
/*** DeviceWidget ***/
-DeviceWidget::DeviceWidget(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& x) :
+DeviceWidget::DeviceWidget(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>& x) :
MinimalStreamWidget(cobject, x) {
x->get_widget("lockToggleButton", lockToggleButton);
@@ -197,7 +197,7 @@ void DeviceWidget::renamePopup() {
Gtk::Dialog* dialog;
Gtk::Entry* renameText;
- Glib::RefPtr<Gnome::Glade::Xml> x = Gnome::Glade::Xml::create(GLADE_FILE, "renameDialog");
+ Glib::RefPtr<Gtk::Builder> x = Gtk::Builder::create_from_file(GLADE_FILE, "renameDialog");
x->get_widget("renameDialog", dialog);
x->get_widget("renameText", renameText);
diff --git a/src/devicewidget.h b/src/devicewidget.h
index 3170f04..358c708 100644
--- a/src/devicewidget.h
+++ b/src/devicewidget.h
@@ -30,7 +30,7 @@ class ChannelWidget;
class DeviceWidget : public MinimalStreamWidget {
public:
- DeviceWidget(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& x);
+ DeviceWidget(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>& x);
void init(MainWindow* mainWindow, Glib::ustring);
void setChannelMap(const pa_channel_map &m, bool can_decibel);
diff --git a/src/mainwindow.cc b/src/mainwindow.cc
index 4995b53..88539f0 100644
--- a/src/mainwindow.cc
+++ b/src/mainwindow.cc
@@ -66,7 +66,7 @@ struct source_port_prio_compare {
}
};
-MainWindow::MainWindow(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& x) :
+MainWindow::MainWindow(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>& x) :
Gtk::Window(cobject),
showSinkInputType(SINK_INPUT_CLIENT),
showSinkType(SINK_ALL),
@@ -139,7 +139,12 @@ MainWindow::MainWindow(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade:
MainWindow* MainWindow::create() {
MainWindow* w;
- Glib::RefPtr<Gnome::Glade::Xml> x = Gnome::Glade::Xml::create(GLADE_FILE, "mainWindow");
+ Glib::RefPtr<Gtk::Builder> x = Gtk::Builder::create();
+ x->add_from_file(GLADE_FILE, "liststore1");
+ x->add_from_file(GLADE_FILE, "liststore2");
+ x->add_from_file(GLADE_FILE, "liststore3");
+ x->add_from_file(GLADE_FILE, "liststore4");
+ x->add_from_file(GLADE_FILE, "mainWindow");
x->get_widget_derived("mainWindow", w);
return w;
}
diff --git a/src/mainwindow.h b/src/mainwindow.h
index 2b2dc5c..dda741a 100644
--- a/src/mainwindow.h
+++ b/src/mainwindow.h
@@ -34,7 +34,7 @@ class RoleWidget;
class MainWindow : public Gtk::Window {
public:
- MainWindow(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& x);
+ MainWindow(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>& x);
static MainWindow* create();
virtual ~MainWindow();
diff --git a/src/minimalstreamwidget.cc b/src/minimalstreamwidget.cc
index ac665de..562739d 100644
--- a/src/minimalstreamwidget.cc
+++ b/src/minimalstreamwidget.cc
@@ -25,7 +25,7 @@
#include "minimalstreamwidget.h"
/*** MinimalStreamWidget ***/
-MinimalStreamWidget::MinimalStreamWidget(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& x) :
+MinimalStreamWidget::MinimalStreamWidget(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>& x) :
Gtk::VBox(cobject),
peakProgressBar(),
lastPeak(0),
diff --git a/src/minimalstreamwidget.h b/src/minimalstreamwidget.h
index ba7eb1d..7d5ee24 100644
--- a/src/minimalstreamwidget.h
+++ b/src/minimalstreamwidget.h
@@ -25,7 +25,7 @@
class MinimalStreamWidget : public Gtk::VBox {
public:
- MinimalStreamWidget(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& x);
+ MinimalStreamWidget(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>& x);
Gtk::VBox *channelsVBox;
Gtk::Label *nameLabel, *boldNameLabel;
diff --git a/src/pavucontrol.h b/src/pavucontrol.h
index 0e0f6bd..a7eb72a 100644
--- a/src/pavucontrol.h
+++ b/src/pavucontrol.h
@@ -27,12 +27,11 @@
#include <libintl.h>
#include <gtkmm.h>
-#include <libglademm.h>
#include <pulse/pulseaudio.h>
#ifndef GLADE_FILE
-#define GLADE_FILE "pavucontrol.glade"
+#define GLADE_FILE "pavucontrol2.glade"
#endif
enum SinkInputType {
diff --git a/src/rolewidget.cc b/src/rolewidget.cc
index 31be005..fd3196c 100644
--- a/src/rolewidget.cc
+++ b/src/rolewidget.cc
@@ -28,7 +28,7 @@
#include "i18n.h"
-RoleWidget::RoleWidget(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& x) :
+RoleWidget::RoleWidget(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>& x) :
StreamWidget(cobject, x) {
lockToggleButton->hide();
@@ -38,7 +38,7 @@ RoleWidget::RoleWidget(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade:
RoleWidget* RoleWidget::create() {
RoleWidget* w;
- Glib::RefPtr<Gnome::Glade::Xml> x = Gnome::Glade::Xml::create(GLADE_FILE, "streamWidget");
+ Glib::RefPtr<Gtk::Builder> x = Gtk::Builder::create_from_file(GLADE_FILE, "streamWidget");
x->get_widget_derived("streamWidget", w);
return w;
}
diff --git a/src/rolewidget.h b/src/rolewidget.h
index c7b198c..1d008f2 100644
--- a/src/rolewidget.h
+++ b/src/rolewidget.h
@@ -27,7 +27,7 @@
class RoleWidget : public StreamWidget {
public:
- RoleWidget(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& x);
+ RoleWidget(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>& x);
static RoleWidget* create();
Glib::ustring role;
diff --git a/src/sinkinputwidget.cc b/src/sinkinputwidget.cc
index 76d865f..b88b718 100644
--- a/src/sinkinputwidget.cc
+++ b/src/sinkinputwidget.cc
@@ -28,7 +28,7 @@
#include "i18n.h"
-SinkInputWidget::SinkInputWidget(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& x) :
+SinkInputWidget::SinkInputWidget(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>& x) :
StreamWidget(cobject, x) {
gchar *txt;
@@ -40,7 +40,7 @@ SinkInputWidget::SinkInputWidget(BaseObjectType* cobject, const Glib::RefPtr<Gno
SinkInputWidget* SinkInputWidget::create(MainWindow* mainWindow) {
SinkInputWidget* w;
- Glib::RefPtr<Gnome::Glade::Xml> x = Gnome::Glade::Xml::create(GLADE_FILE, "streamWidget");
+ Glib::RefPtr<Gtk::Builder> x = Gtk::Builder::create_from_file(GLADE_FILE, "streamWidget");
x->get_widget_derived("streamWidget", w);
w->init(mainWindow);
return w;
diff --git a/src/sinkinputwidget.h b/src/sinkinputwidget.h
index 11893ff..de3ecb8 100644
--- a/src/sinkinputwidget.h
+++ b/src/sinkinputwidget.h
@@ -29,7 +29,7 @@ class MainWindow;
class SinkInputWidget : public StreamWidget {
public:
- SinkInputWidget(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& x);
+ SinkInputWidget(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>& x);
static SinkInputWidget* create(MainWindow* mainWindow);
~SinkInputWidget(void);
diff --git a/src/sinkwidget.cc b/src/sinkwidget.cc
index 3196dc7..c797e68 100644
--- a/src/sinkwidget.cc
+++ b/src/sinkwidget.cc
@@ -28,13 +28,13 @@
#include "i18n.h"
-SinkWidget::SinkWidget(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& x) :
+SinkWidget::SinkWidget(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>& x) :
DeviceWidget(cobject, x) {
}
SinkWidget* SinkWidget::create(MainWindow* mainWindow) {
SinkWidget* w;
- Glib::RefPtr<Gnome::Glade::Xml> x = Gnome::Glade::Xml::create(GLADE_FILE, "deviceWidget");
+ Glib::RefPtr<Gtk::Builder> x = Gtk::Builder::create_from_file(GLADE_FILE, "deviceWidget");
x->get_widget_derived("deviceWidget", w);
w->init(mainWindow, "sink");
return w;
diff --git a/src/sinkwidget.h b/src/sinkwidget.h
index 84f0d4a..3fbd7aa 100644
--- a/src/sinkwidget.h
+++ b/src/sinkwidget.h
@@ -27,7 +27,7 @@
class SinkWidget : public DeviceWidget {
public:
- SinkWidget(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& x);
+ SinkWidget(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>& x);
static SinkWidget* create(MainWindow* mainWindow);
SinkType type;
diff --git a/src/sourceoutputwidget.cc b/src/sourceoutputwidget.cc
index 7064b38..ce1cbb6 100644
--- a/src/sourceoutputwidget.cc
+++ b/src/sourceoutputwidget.cc
@@ -28,7 +28,7 @@
#include "i18n.h"
-SourceOutputWidget::SourceOutputWidget(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& x) :
+SourceOutputWidget::SourceOutputWidget(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>& x) :
StreamWidget(cobject, x) {
gchar *txt;
@@ -44,7 +44,7 @@ SourceOutputWidget::SourceOutputWidget(BaseObjectType* cobject, const Glib::RefP
SourceOutputWidget* SourceOutputWidget::create(MainWindow* mainWindow) {
SourceOutputWidget* w;
- Glib::RefPtr<Gnome::Glade::Xml> x = Gnome::Glade::Xml::create(GLADE_FILE, "streamWidget");
+ Glib::RefPtr<Gtk::Builder> x = Gtk::Builder::create_from_file(GLADE_FILE, "streamWidget");
x->get_widget_derived("streamWidget", w);
w->init(mainWindow);
return w;
diff --git a/src/sourceoutputwidget.h b/src/sourceoutputwidget.h
index 0b88d06..e9b0dce 100644
--- a/src/sourceoutputwidget.h
+++ b/src/sourceoutputwidget.h
@@ -29,7 +29,7 @@ class MainWindow;
class SourceOutputWidget : public StreamWidget {
public:
- SourceOutputWidget(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& x);
+ SourceOutputWidget(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>& x);
static SourceOutputWidget* create(MainWindow* mainWindow);
~SourceOutputWidget(void);
diff --git a/src/sourcewidget.cc b/src/sourcewidget.cc
index 29980cc..5e4ecf0 100644
--- a/src/sourcewidget.cc
+++ b/src/sourcewidget.cc
@@ -26,13 +26,13 @@
#include "i18n.h"
-SourceWidget::SourceWidget(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& x) :
+SourceWidget::SourceWidget(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>& x) :
DeviceWidget(cobject, x) {
}
SourceWidget* SourceWidget::create(MainWindow* mainWindow) {
SourceWidget* w;
- Glib::RefPtr<Gnome::Glade::Xml> x = Gnome::Glade::Xml::create(GLADE_FILE, "deviceWidget");
+ Glib::RefPtr<Gtk::Builder> x = Gtk::Builder::create_from_file(GLADE_FILE, "deviceWidget");
x->get_widget_derived("deviceWidget", w);
w->init(mainWindow, "source");
return w;
diff --git a/src/sourcewidget.h b/src/sourcewidget.h
index 9a2cca3..ebd92e3 100644
--- a/src/sourcewidget.h
+++ b/src/sourcewidget.h
@@ -27,7 +27,7 @@
class SourceWidget : public DeviceWidget {
public:
- SourceWidget(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& x);
+ SourceWidget(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>& x);
static SourceWidget* create(MainWindow* mainWindow);
SourceType type;
diff --git a/src/streamwidget.cc b/src/streamwidget.cc
index c4ad15f..431e460 100644
--- a/src/streamwidget.cc
+++ b/src/streamwidget.cc
@@ -29,7 +29,7 @@
#include "i18n.h"
/*** StreamWidget ***/
-StreamWidget::StreamWidget(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& x) :
+StreamWidget::StreamWidget(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>& x) :
MinimalStreamWidget(cobject, x),
peak(NULL),
mpMainWindow(NULL) {
diff --git a/src/streamwidget.h b/src/streamwidget.h
index 28a2a47..b797ec5 100644
--- a/src/streamwidget.h
+++ b/src/streamwidget.h
@@ -30,7 +30,7 @@ class ChannelWidget;
class StreamWidget : public MinimalStreamWidget {
public:
- StreamWidget(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& x);
+ StreamWidget(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>& x);
void init(MainWindow* mainWindow);
void setChannelMap(const pa_channel_map &m, bool can_decibel);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pavucontrol2.glade.xz
Type: application/octet-stream
Size: 3056 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/pulseaudio-discuss/attachments/20110227/ce5313ad/attachment.obj>
More information about the pulseaudio-discuss
mailing list