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/sourcewidget.cc | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'src/sourcewidget.cc') diff --git a/src/sourcewidget.cc b/src/sourcewidget.cc index c77f4f2..cef0a3e 100644 --- a/src/sourcewidget.cc +++ b/src/sourcewidget.cc @@ -27,15 +27,7 @@ #include "i18n.h" SourceWidget::SourceWidget(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, &SourceWidget::onDefaultToggle)); - menu.append(defaultMenuItem); - menu.show_all(); + DeviceWidget(cobject, x) { } SourceWidget* SourceWidget::create() { @@ -71,9 +63,11 @@ void SourceWidget::onMuteToggleButton() { pa_operation_unref(o); } -void SourceWidget::onDefaultToggle() { +void SourceWidget::onDefaultToggleButton() { pa_operation* o; + DeviceWidget::onDefaultToggleButton(); + if (updating) return; -- cgit