From 02b316fcba8a112e528a0bddfcb93cf6f3179168 Mon Sep 17 00:00:00 2001 From: Colin Guthrie Date: Sat, 13 Jun 2009 19:15:02 +0100 Subject: More changes in the UI to try and make things neater. This abandons the combo box approach an instead partially reverts to the popup. We now display a suffix after the stream title saying " on " or " from " where the part looks like a hyperlink and, when clicked, shows the popup to change the device. If there is only one device available, we suppress the whole thing and thus avoid confusion. --- src/streamwidget.cc | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'src/streamwidget.cc') diff --git a/src/streamwidget.cc b/src/streamwidget.cc index b739676..fd737fd 100644 --- a/src/streamwidget.cc +++ b/src/streamwidget.cc @@ -27,19 +27,18 @@ /*** StreamWidget ***/ StreamWidget::StreamWidget(BaseObjectType* cobject, const Glib::RefPtr& x) : - MinimalStreamWidget(cobject, x), - mSuppressDeviceChange(false) { + MinimalStreamWidget(cobject, x) { x->get_widget("lockToggleButton", lockToggleButton); x->get_widget("muteToggleButton", muteToggleButton); - x->get_widget("deviceCombo", deviceCombo); x->get_widget("terminateButton", terminateButton); x->get_widget("directionLabel", directionLabel); - x->get_widget("streamControlHBox", streamControlHBox); - - deviceCombo->signal_changed().connect( sigc::mem_fun(*this, &StreamWidget::onDeviceChange)); + x->get_widget("deviceButton", deviceButton); + x->get_widget("deviceLabel", deviceLabel); + terminateButton->signal_clicked().connect(sigc::mem_fun(*this, &StreamWidget::onKill)); muteToggleButton->signal_clicked().connect(sigc::mem_fun(*this, &StreamWidget::onMuteToggleButton)); + deviceButton->signal_button_press_event().connect(sigc::mem_fun(*this, &StreamWidget::onDeviceChangePopup)); for (unsigned i = 0; i < PA_CHANNELS_MAX; i++) channelWidgets[i] = NULL; @@ -109,3 +108,7 @@ bool StreamWidget::timeoutEvent() { void StreamWidget::executeVolumeUpdate() { } + +bool StreamWidget::onDeviceChangePopup(GdkEventButton*) { + return false; +} -- cgit