Rebase the sink/source widgets on the device widget

This commit is contained in:
Colin Guthrie 2009-03-16 17:05:53 +00:00
parent 644cfddf39
commit e509205be2
5 changed files with 13 additions and 12 deletions

View File

@ -28,6 +28,7 @@ pavucontrol_SOURCES= \
minimalstreamwidget.h minimalstreamwidget.cc \ minimalstreamwidget.h minimalstreamwidget.cc \
channelwidget.h channelwidget.cc \ channelwidget.h channelwidget.cc \
streamwidget.h streamwidget.cc \ streamwidget.h streamwidget.cc \
devicewidget.h devicewidget.cc \
cardwidget.h cardwidget.cc \ cardwidget.h cardwidget.cc \
sinkwidget.h sinkwidget.cc \ sinkwidget.h sinkwidget.cc \
sourcewidget.h sourcewidget.cc \ sourcewidget.h sourcewidget.cc \

View File

@ -27,7 +27,7 @@
#include "i18n.h" #include "i18n.h"
SinkWidget::SinkWidget(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& x) : SinkWidget::SinkWidget(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& x) :
StreamWidget(cobject, x), DeviceWidget(cobject, x),
defaultMenuItem("_Default", true){ defaultMenuItem("_Default", true){
add_events(Gdk::BUTTON_PRESS_MASK); add_events(Gdk::BUTTON_PRESS_MASK);
@ -40,8 +40,8 @@ SinkWidget::SinkWidget(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade:
SinkWidget* SinkWidget::create() { SinkWidget* SinkWidget::create() {
SinkWidget* w; SinkWidget* w;
Glib::RefPtr<Gnome::Glade::Xml> x = Gnome::Glade::Xml::create(GLADE_FILE, "streamWidget"); Glib::RefPtr<Gnome::Glade::Xml> x = Gnome::Glade::Xml::create(GLADE_FILE, "deviceWidget");
x->get_widget_derived("streamWidget", w); x->get_widget_derived("deviceWidget", w);
return w; return w;
} }
@ -57,7 +57,7 @@ void SinkWidget::executeVolumeUpdate() {
} }
void SinkWidget::onMuteToggleButton() { void SinkWidget::onMuteToggleButton() {
StreamWidget::onMuteToggleButton(); DeviceWidget::onMuteToggleButton();
if (updating) if (updating)
return; return;

View File

@ -23,9 +23,9 @@
#include "pavucontrol.h" #include "pavucontrol.h"
#include "streamwidget.h" #include "devicewidget.h"
class SinkWidget : public StreamWidget { class SinkWidget : public DeviceWidget {
public: public:
SinkWidget(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& x); SinkWidget(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& x);
static SinkWidget* create(); static SinkWidget* create();

View File

@ -27,7 +27,7 @@
#include "i18n.h" #include "i18n.h"
SourceWidget::SourceWidget(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& x) : SourceWidget::SourceWidget(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& x) :
StreamWidget(cobject, x), DeviceWidget(cobject, x),
defaultMenuItem(_("_Default"), true){ defaultMenuItem(_("_Default"), true){
add_events(Gdk::BUTTON_PRESS_MASK); add_events(Gdk::BUTTON_PRESS_MASK);
@ -40,8 +40,8 @@ SourceWidget::SourceWidget(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Gl
SourceWidget* SourceWidget::create() { SourceWidget* SourceWidget::create() {
SourceWidget* w; SourceWidget* w;
Glib::RefPtr<Gnome::Glade::Xml> x = Gnome::Glade::Xml::create(GLADE_FILE, "streamWidget"); Glib::RefPtr<Gnome::Glade::Xml> x = Gnome::Glade::Xml::create(GLADE_FILE, "deviceWidget");
x->get_widget_derived("streamWidget", w); x->get_widget_derived("deviceWidget", w);
return w; return w;
} }
@ -57,7 +57,7 @@ void SourceWidget::executeVolumeUpdate() {
} }
void SourceWidget::onMuteToggleButton() { void SourceWidget::onMuteToggleButton() {
StreamWidget::onMuteToggleButton(); DeviceWidget::onMuteToggleButton();
if (updating) if (updating)
return; return;

View File

@ -23,9 +23,9 @@
#include "pavucontrol.h" #include "pavucontrol.h"
#include "streamwidget.h" #include "devicewidget.h"
class SourceWidget : public StreamWidget { class SourceWidget : public DeviceWidget {
public: public:
SourceWidget(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& x); SourceWidget(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& x);
static SourceWidget* create(); static SourceWidget* create();