summaryrefslogtreecommitdiffstats
path: root/src/mainwindow.cc
diff options
context:
space:
mode:
authorColin Guthrie <cguthrie@mandriva.org>2009-06-17 22:44:02 +0100
committerColin Guthrie <cguthrie@mandriva.org>2009-06-17 22:44:02 +0100
commit514a66e0c8570f9706bcfcf93cec124094931b6e (patch)
tree0c6b51a14dfff8a476cbfa773c3115706cc06a8e /src/mainwindow.cc
parent7a7c1fc7f2a94fea91c66e9be35e8d6d81c0c7fe (diff)
Do not disable the default button when it's set.
I reworked the way this was done so we can easily re-enable this as I think it's clearer when it's inactive (the difference between toggled and not toggled is pretty minor). With this abstraction we could reset the tooltip etc. too.
Diffstat (limited to 'src/mainwindow.cc')
-rw-r--r--src/mainwindow.cc12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/mainwindow.cc b/src/mainwindow.cc
index 5e6b464..5e86a41 100644
--- a/src/mainwindow.cc
+++ b/src/mainwindow.cc
@@ -214,8 +214,7 @@ void MainWindow::updateSink(const pa_sink_info &info) {
w->setVolume(info.volume);
w->muteToggleButton->set_active(info.mute);
- w->defaultToggleButton->set_active(w->name == defaultSinkName);
- w->defaultToggleButton->set_sensitive(w->name != defaultSinkName);
+ w->setDefault(w->name == defaultSinkName);
w->updating = false;
@@ -363,8 +362,7 @@ void MainWindow::updateSource(const pa_source_info &info) {
w->setVolume(info.volume);
w->muteToggleButton->set_active(info.mute);
- w->defaultToggleButton->set_active(w->name == defaultSourceName);
- w->defaultToggleButton->set_sensitive(w->name != defaultSourceName);
+ w->setDefault(w->name == defaultSourceName);
w->updating = false;
@@ -533,8 +531,7 @@ void MainWindow::updateServer(const pa_server_info &info) {
continue;
w->updating = true;
- w->defaultToggleButton->set_active(w->name == defaultSinkName);
- w->defaultToggleButton->set_sensitive(w->name != defaultSinkName);
+ w->setDefault(w->name == defaultSinkName);
w->updating = false;
}
@@ -546,8 +543,7 @@ void MainWindow::updateServer(const pa_server_info &info) {
continue;
w->updating = true;
- w->defaultToggleButton->set_active(w->name == defaultSourceName);
- w->defaultToggleButton->set_sensitive(w->name != defaultSourceName);
+ w->setDefault(w->name == defaultSourceName);
w->updating = false;
}
}