From 4bd94fa2b86fb8464829c806ae517db113924bd2 Mon Sep 17 00:00:00 2001 From: Colin Guthrie Date: Mon, 16 Mar 2009 23:21:40 +0000 Subject: Wire up all the new UI code. This makes the default button work on sinks/sources, allows the drop down to actually change the sink/source and removes the old menu code. Some names and such are fixed in the glade file too. --- src/sinkwidget.cc | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'src/sinkwidget.cc') diff --git a/src/sinkwidget.cc b/src/sinkwidget.cc index fa90a75..e0fcdde 100644 --- a/src/sinkwidget.cc +++ b/src/sinkwidget.cc @@ -27,15 +27,7 @@ #include "i18n.h" SinkWidget::SinkWidget(BaseObjectType* cobject, const Glib::RefPtr& x) : - DeviceWidget(cobject, x), - defaultMenuItem("_Default", true){ - - add_events(Gdk::BUTTON_PRESS_MASK); - - defaultMenuItem.set_active(false); - defaultMenuItem.signal_toggled().connect(sigc::mem_fun(*this, &SinkWidget::onDefaultToggle)); - menu.append(defaultMenuItem); - menu.show_all(); + DeviceWidget(cobject, x) { } SinkWidget* SinkWidget::create() { @@ -71,9 +63,11 @@ void SinkWidget::onMuteToggleButton() { pa_operation_unref(o); } -void SinkWidget::onDefaultToggle() { +void SinkWidget::onDefaultToggleButton() { pa_operation* o; + DeviceWidget::onDefaultToggleButton(); + if (updating) return; -- cgit