summaryrefslogtreecommitdiffstats
path: root/src/streamwidget.cc
diff options
context:
space:
mode:
authorColin Guthrie <cguthrie@mandriva.org>2009-06-13 19:15:02 +0100
committerColin Guthrie <cguthrie@mandriva.org>2009-06-17 08:54:14 +0100
commit02b316fcba8a112e528a0bddfcb93cf6f3179168 (patch)
tree96471135e9d83af7ebb275d77e71c9d0c0b6033d /src/streamwidget.cc
parente71562619a67fa6823ba5d14c3df411b12fe192b (diff)
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 <device>" or " from <device>" where the <device> 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.
Diffstat (limited to 'src/streamwidget.cc')
-rw-r--r--src/streamwidget.cc15
1 files changed, 9 insertions, 6 deletions
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<Gnome::Glade::Xml>& 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;
+}